@verdocs/web-sdk 1.11.0 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +5 -1
  4. package/dist/cjs/verdocs-field-date.cjs.entry.js +5 -1
  5. package/dist/cjs/verdocs-field-initial.cjs.entry.js +5 -1
  6. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +5 -1
  7. package/dist/cjs/verdocs-field-signature.cjs.entry.js +5 -1
  8. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +5 -1
  9. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +5 -1
  10. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +5 -1
  11. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +3 -0
  12. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +23 -15
  13. package/dist/cjs/verdocs-template-name.cjs.entry.js +5 -4
  14. package/dist/cjs/verdocs-template-recipients.cjs.entry.js +42 -8
  15. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  17. package/dist/collection/components/elements/verdocs-component-error/verdocs-component-error.css +2 -0
  18. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +1 -1
  19. package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +5 -1
  20. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +5 -1
  21. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +5 -1
  22. package/dist/collection/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.js +5 -1
  23. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +5 -1
  24. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +5 -1
  25. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +5 -1
  26. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +5 -1
  27. package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.js +3 -0
  28. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.css +14 -0
  29. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +14 -9
  30. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +9 -5
  31. package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.js +5 -4
  32. package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.css +16 -0
  33. package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.js +41 -7
  34. package/dist/components/verdocs-component-error2.js +1 -1
  35. package/dist/components/verdocs-field-checkbox.js +5 -1
  36. package/dist/components/verdocs-field-date.js +5 -1
  37. package/dist/components/verdocs-field-initial.js +5 -1
  38. package/dist/components/verdocs-field-radio-button.js +5 -1
  39. package/dist/components/verdocs-field-signature.js +5 -1
  40. package/dist/components/verdocs-field-textarea.js +5 -1
  41. package/dist/components/verdocs-field-textbox.js +5 -1
  42. package/dist/components/verdocs-field-timestamp.js +5 -1
  43. package/dist/components/verdocs-template-attachments.js +10 -1
  44. package/dist/components/verdocs-template-create2.js +26 -15
  45. package/dist/components/verdocs-template-fields2.js +9 -5
  46. package/dist/components/verdocs-template-name.js +13 -6
  47. package/dist/components/verdocs-template-recipients.js +52 -12
  48. package/dist/components/verdocs-view2.js +1 -1
  49. package/dist/docs.json +26 -1
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
  52. package/dist/esm/verdocs-field-checkbox.entry.js +5 -1
  53. package/dist/esm/verdocs-field-date.entry.js +5 -1
  54. package/dist/esm/verdocs-field-initial.entry.js +5 -1
  55. package/dist/esm/verdocs-field-radio-button.entry.js +5 -1
  56. package/dist/esm/verdocs-field-signature.entry.js +5 -1
  57. package/dist/esm/verdocs-field-textarea.entry.js +5 -1
  58. package/dist/esm/verdocs-field-textbox.entry.js +5 -1
  59. package/dist/esm/verdocs-field-timestamp.entry.js +5 -1
  60. package/dist/esm/verdocs-template-attachments.entry.js +3 -0
  61. package/dist/esm/verdocs-template-create_2.entry.js +23 -15
  62. package/dist/esm/verdocs-template-name.entry.js +5 -4
  63. package/dist/esm/verdocs-template-recipients.entry.js +43 -9
  64. package/dist/esm/verdocs-view.entry.js +1 -1
  65. package/dist/esm/verdocs-web-sdk.js +1 -1
  66. package/dist/esm-es5/loader.js +1 -1
  67. package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-template-recipients.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  82. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +1 -0
  83. package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.d.ts +2 -0
  84. package/dist/verdocs-web-sdk/{p-64f197a8.system.entry.js → p-0c393c2b.system.entry.js} +1 -1
  85. package/dist/verdocs-web-sdk/{p-af2957cc.system.entry.js → p-0d7db907.system.entry.js} +1 -1
  86. package/dist/verdocs-web-sdk/p-113a45d3.entry.js +1 -0
  87. package/dist/verdocs-web-sdk/{p-2faa3f2e.system.entry.js → p-127a569c.system.entry.js} +1 -1
  88. package/dist/verdocs-web-sdk/{p-caaf2702.system.entry.js → p-1fe9560f.system.entry.js} +1 -1
  89. package/dist/verdocs-web-sdk/p-28620067.system.entry.js +1 -0
  90. package/dist/verdocs-web-sdk/p-4086a15a.entry.js +1 -0
  91. package/dist/verdocs-web-sdk/{p-6d295ee1.system.entry.js → p-41122f38.system.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/p-56196fad.entry.js +1 -0
  93. package/dist/verdocs-web-sdk/{p-e58ab5ca.entry.js → p-5dc58d34.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-7149f974.system.entry.js → p-5fda1fe8.system.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-7a26ed4a.entry.js → p-68eb0ad8.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-9dfcc6d4.system.entry.js → p-6c231fe6.system.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/p-70ad917b.entry.js +1 -0
  98. package/dist/verdocs-web-sdk/{p-32f9b201.system.entry.js → p-7d8de5d6.system.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/p-80d98971.entry.js +1 -0
  100. package/dist/verdocs-web-sdk/{p-cdff8cba.system.entry.js → p-8644dd0f.system.entry.js} +1 -1
  101. package/dist/verdocs-web-sdk/p-8e5065af.entry.js +1 -0
  102. package/dist/verdocs-web-sdk/p-8ff15619.entry.js +1 -0
  103. package/dist/verdocs-web-sdk/{p-695c2ea8.entry.js → p-b225dcfb.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/p-bde3d383.system.entry.js +1 -0
  105. package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
  106. package/dist/verdocs-web-sdk/p-c95c8e1f.system.entry.js +1 -0
  107. package/dist/verdocs-web-sdk/{p-19763c4d.system.entry.js → p-cf27d3ce.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-6d84b99c.entry.js → p-d78594bb.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-cb006a7e.entry.js → p-e079768b.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-5ced004c.entry.js → p-e53a7969.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/p-e65ec569.system.entry.js +1 -0
  112. package/dist/verdocs-web-sdk/{p-68743993.entry.js → p-ec913a97.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  114. package/package.json +2 -2
  115. package/dist/custom-elements.json +0 -1361
  116. package/dist/verdocs-web-sdk/p-00307be5.system.entry.js +0 -1
  117. package/dist/verdocs-web-sdk/p-29df733a.system.entry.js +0 -1
  118. package/dist/verdocs-web-sdk/p-3bed244c.system.entry.js +0 -1
  119. package/dist/verdocs-web-sdk/p-4e521971.entry.js +0 -1
  120. package/dist/verdocs-web-sdk/p-587f4405.entry.js +0 -1
  121. package/dist/verdocs-web-sdk/p-5d29152f.entry.js +0 -1
  122. package/dist/verdocs-web-sdk/p-b3fd9575.entry.js +0 -1
  123. package/dist/verdocs-web-sdk/p-bea9fe06.system.entry.js +0 -1
  124. package/dist/verdocs-web-sdk/p-c9eb3771.entry.js +0 -1
  125. package/dist/verdocs-web-sdk/p-d06946ca.entry.js +0 -1
  126. package/dist/verdocs-web-sdk/p-dd06fb2a.entry.js +0 -1
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,s){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function o(t){try{c(s.next(t))}catch(t){i(t)}}function a(t){try{c(s["throw"](t))}catch(t){i(t)}}function c(t){t.done?n(t.value):r(t.value).then(o,a)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,r,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,r&&(i=o[0]&2?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;if(r=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;r=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){n.label=o[1];break}if(o[0]===6&&n.label<i[1]){n.label=i[1];i=o;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(o);break}if(i[2])n.ops.pop();n.trys.pop();continue}o=e.call(t,n)}catch(t){o=[6,t];r=0}finally{s=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-261dcea1.system.js","./p-5b62f239.system.js","./p-45a4da16.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js"],(function(t){"use strict";var e,n,s,r,i,o,a,c;return{setters:[function(t){e=t.r;n=t.c;s=t.h;r=t.H},function(t){i=t.V},function(t){o=t.s},function(t){a=t.l},function(t){c=t.S},function(){},function(){},function(){},function(){}],execute:function(){var l='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#4c56cb}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b;border:1px solid #cccccc}verdocs-template-attachments svg{width:24px;height:24px;fill:#5c6575;margin:2px 10px 0 0}';var u='<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 f=t("verdocs_template_attachments",function(){function t(t){e(this,t);this.close=n(this,"close",7);this.sdkError=n(this,"sdkError",7);this.endpoint=i.getDefault();this.templateId="";this.loading=true}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n,s;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.endpoint.loadSession();return[4,a(this.endpoint,this.templateId)];case 1:r.sent();this.loading=false;return[3,3];case 2:s=r.sent();console.log("[TEMPLATE NAME] Error loading template",s);this.loading=false;(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(s.message,(e=s.response)===null||e===void 0?void 0:e.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};t.prototype.render=function(){if(this.loading){return s(r,{class:"loading"},s("verdocs-loader",null))}if(!this.endpoint.session||!o.template){return s(r,{class:"empty"})}return s(r,null,s("h5",null,"Attachments"),o.template.template_documents.map((function(t){return s("div",{class:"attachment"},s("span",{innerHTML:u}),t.name," (",t.page_numbers," page",t.page_numbers>1?"s":"",")")})))};return t}());f.style=l}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-97329951.system.js","./p-e12b7fbc.system.js"],(function(e){"use strict";var t,o,i,n;return{setters:[function(e){t=e.r;o=e.h;i=e.H},function(e){n=e.c}],execute:function(){var r='@charset "UTF-8";verdocs-checkbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;line-height:18px}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';var c=e("verdocs_checkbox",function(){function e(e){t(this,e);this.checked=false;this.name="";this.label="";this.value="";this.theme="light";this.disabled=false}e.prototype.render=function(){var e;return o(i,{class:(e={disabled:this.disabled},e[this.theme]=true,e)},o("label",null,o("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),o("span",null,this.label)))};return e}());c.style=r;var l='verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';var s=e("verdocs_component_error",function(){function e(e){t(this,e);this.message=""}e.prototype.render=function(){return o(i,null,o("div",{class:"inner"},this.message))};return e}());s.style=l;var a='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:relative;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';var p='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';var d=e("verdocs_help_icon",function(){function e(e){t(this,e);this.text="";this.containerId="verdocs-help-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=n(this.icon,this.tooltip,{})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(i,{class:{}},o("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:p,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.icon=t}}),o("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:function(t){return e.tooltip=t}},this.text,o("div",{"data-popper-arrow":"true",class:"arrow"})))};return e}());d.style=a;var h='verdocs-text-input{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';var u=e("verdocs_text_input",function(){function e(e){t(this,e);this.value="";this.label="";this.placeholder="";this.autocomplete="";this.helpText="";this.type="text";this.disabled=false}e.prototype.render=function(){return o(i,{class:"input-field"},o("label",null,this.label?o("div",{class:"input-label"},this.label+":"):o("div",null),o("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&o("verdocs-help-icon",{text:this.helpText})))};return e}());u.style=h}}}));
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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(n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-80fe8ac3.system.js","./p-fbc81799.system.js","./p-261dcea1.system.js","./p-05eb4fed.system.js","./p-5b62f239.system.js","./p-45a4da16.system.js","./p-38d00c38.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,r,o,i,s,a,l,c,p,d,u,f,m,g,h;return{setters:[function(e){t=e.r;n=e.c;r=e.h;o=e.F;i=e.H;s=e.a},function(e){a=e.i},function(e){l=e.u;c=e.c},function(e){p=e.V;d=e.T},function(e){u=e.g},function(e){f=e.s},function(e){m=e.l},function(e){g=e.a},function(e){h=e.S},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var v;var x='verdocs-template-recipients{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-recipients>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-recipients>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-recipients>form .participants{position:relative}verdocs-template-recipients>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-recipients>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-recipients>form .row .row-recipients{-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-recipients>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-recipients>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 5px 0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-recipients>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-recipients>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-recipients>form .row .settings-button{margin:4px 0 0 9px;cursor:pointer}verdocs-template-recipients>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:4px 12px 0 0}verdocs-template-recipients>form .row .recipient.dragging{position:absolute}verdocs-template-recipients>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-recipients>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-recipients>form .row .dropzone svg{fill:#cccccc}verdocs-template-recipients>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-recipients>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-recipients>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-recipients>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-recipients>form input:focus{outline:none}verdocs-template-recipients .row.add-sequence{display:none}verdocs-template-recipients .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-role:hover{opacity:1}verdocs-template-recipients .add-role svg{width:32px;height:32px}verdocs-template-recipients.dragging .add-role{display:none}verdocs-template-recipients.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-recipients.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-recipients.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-recipients .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-recipients .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-recipients .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-recipients ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-moz-placeholder{color:#aaaaaa}verdocs-template-recipients :-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::placeholder{color:#aaaaaa}';var b=(v={},v[d.EVERYONE]="Everyone",v[d.EVERYONE_AS_CREATOR]="Everyone as Me",v[d.ORGANIZATION_MEMBER]="Organization member",v[d.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",v[d.CREATOR]="Me",v);var w='<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 y='<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 q='<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 R='<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 z='<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 E='<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 L='<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 T=e("verdocs_template_recipients",function(){function e(e){t(this,e);this.next=n(this,"next",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.templateUpdated=n(this,"templateUpdated",7);this.sequences=[];this.endpoint=p.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null;this.forceRerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,o,i,s,a;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[RECIPIENTS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[RECIPIENTS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,m(this.endpoint,this.templateId,true)];case 2:l.sent();return[3,4];case 3:s=l.sent();console.log("[RECIPIENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:this.sortTemplateRoles();this.renumberTemplateRoles();return[3,6];case 5:a=l.sent();console.log("[FIELDS] Error with preview session",a);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new h(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var n=+(t.target.getAttribute("posX")||0);var r=+(t.target.getAttribute("posY")||0);var o=t.dx+n;var i=t.dy+r;t.target.setAttribute("posX",o);t.target.setAttribute("posy",i);t.target.style.transform="translate(".concat(o+100,"px, ").concat(i-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)}});a(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var n=this;t.target.classList.remove("active");var r=t.relatedTarget.dataset.rolename;var o=+t.target.dataset.sequence;var i=+t.target.dataset.order;var s=f.template.roles.find((function(e){return e.name===r}));if(s){s.sequence=o;s.order=i;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all(f.template.roles.map((function(e){return l(n.endpoint,n.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){return console.log("[RECIPIENTS] Updated roles")})).catch((function(e){return console.log("[RECIPIENTS] 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(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit()};e.prototype.sortTemplateRoles=function(){f.template.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;this.sequences=[];f.template.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){this.extractSequenceNumbers();var e=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(t,n){f.template.roles.filter((function(e){return e.sequence===t})).forEach((function(t,r){if(!e.includes(t.name)){t.sequence=n+1;t.order=r+1;e.push(t.name)}}))}));this.extractSequenceNumbers()};e.prototype.handleAddRole=function(e,t){var n=this;e.stopPropagation();var r=f.template.roles.filter((function(e){return e.sequence===t})).length+1;var o="";var i=f.template.roles.length;do{i++;o="Recipient ".concat(i)}while(!o||f.template.roles.some((function(e){return e.name===o})));console.log("Will create",o,t,r);c(this.endpoint,this.templateId,{template_id:this.templateId,name:o,full_name:"",email:"",phone:"",sequence:t,order:r,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);f.template.roles.push(e);n.renumberTemplateRoles();n.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.render=function(){var e=this;var t=f.template.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":this.forceRerender},r("h5",null,"Roles"),r("div",{class:"participants"},r("div",{class:"left-line"}),r("div",{class:"row"},r("div",{class:"icon",innerHTML:y}),r("div",{class:"row-recipients"},r("div",{class:"sender"},r("span",{class:"label"},"Sender:")," ",b[f.template.sender]," ",r("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),r("div",{class:"row add-sequence","data-sequence":0},r("div",{class:"icon",innerHTML:z}),r("div",{class:"row-recipients"},r("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(n){return r(o,null,r("div",{class:"row"},r("div",{class:"icon",innerHTML:q}),r("div",{class:"row-recipients"},r("div",{class:"dropzone","data-order":.5,"data-sequence":n}),f.template.roles.filter((function(e){return e.sequence===n})).map((function(i){return r(o,null,r("div",{class:"recipient",style:{backgroundColor:u(g(t,i.name))},"data-rolename":i.name},r("span",{class:"type-icon",innerHTML:i.type==="signer"?k:i.type==="cc"?L:E}),i.name," ",r("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingRoleDialog=i.name},"aria-role":"button"})),r("div",{class:"dropzone","data-order":i.order+.5,"data-sequence":n}))})),r("button",{class:"add-role",innerHTML:z,onClick:function(t){return e.handleAddRole(t,n)}}))),r("div",{class:"row add-sequence","data-sequence":n},r("div",{class:"row-recipients"},r("div",{class:"icon",innerHTML:z}),r("div",{class:"dropzone","data-sequence":n+1,"data-order":1},"Add Step"))))})),this.sequences.length<1&&r(o,null,r("div",{class:"row"},r("div",{class:"icon",innerHTML:q}),r("div",{class:"row-recipients"},r("button",{class:"add-role",innerHTML:z,onClick:function(t){return e.handleAddRole(t,1)}})))),r("div",{class:"row"},r("div",{class:"icon",innerHTML:R}),r("div",{class:"row-recipients"},r("div",{class:"complete"},"Document Complete")))),t.length<1&&r("div",{class:"empty"},"You must add at least one Role before proceeding.",r("br",null)," Click the ",r("span",{innerHTML:z})," 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(t){return e.handleCancel(t)}}),r("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:t.length<1}))),this.showingRoleDialog&&r("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null;e.forceRerender++},onDelete:function(t){console.log("deleted",t.detail);e.renumberTemplateRoles();e.showingRoleDialog=null;e.forceRerender++}}),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}());T.style=x}}}));
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i,H as e}from"./p-ff1278ed.js";import{g as o}from"./p-6de76553.js";import{g as n}from"./p-25fa36d7.js";import{s as r}from"./p-3cb8a7f4.js";import"./p-388b771c.js";import"./p-21603661.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-5ea05a1d.js";import"./p-7291906c.js";const l=class{constructor(i){t(this,i),this.fieldChange=s(this,"fieldChange",7),this.settingsPress=s(this,"settingsPress",7),this.settingsChanged=s(this,"settingsChanged",7),this.field=null,this.name="",this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.tempSignature=""}async focusField(){this.handleShow(),console.log("focused",this)}hideDialog(){var t;null===(t=this.dialog)||void 0===t||t.remove(),this.dialog=null}handleAdopt(t){var s;console.log("[SIGNATURE] Adopted signature"),this.tempSignature=t.detail,null===(s=this.fieldChange)||void 0===s||s.emit(this.tempSignature),this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-signature-dialog"),this.dialog.setAttribute("name",this.name),this.dialog.setAttribute("roleindex",this.roleindex),this.dialog.addEventListener("cancel",(()=>this.hideDialog())),this.dialog.addEventListener("next",(t=>this.handleAdopt(t))),document.body.append(this.dialog)}async showSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.showPanel&&t.showPanel()}async hideSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.hidePanel&&t.hidePanel(),r.updateCount++}render(){var t,s,l;const a=n(this.field),d=a.base64||this.tempSignature,h=null!==(s=null!==(t=this.disabled)&&void 0!==t?t:a.disabled)&&void 0!==s&&s,c=this.field.rgba||o(this.roleindex);return this.done?i(e,{class:{done:this.done}},d&&i("img",{src:d,alt:"Signature"})):i(e,{class:{required:null===(l=this.field)||void 0===l?void 0:l.required,disabled:h},style:{backgroundColor:c}},d?i("img",{src:d,alt:"Signature"}):i("button",{onClick:()=>!h&&this.handleShow()},"Signature"),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("h6",null,"Field Settings"),i("verdocs-template-field-properties",{templateId:r.templateId,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onSettingsChanged:t=>{var s;return null===(s=this.settingsChanged)||void 0===s||s.emit(t.detail),this.hideSettingsPanel()}})))}};l.style='verdocs-field-signature{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;position:relative;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-signature.disabled{opacity:0.5}verdocs-field-signature.done{border:none;opacity:1}verdocs-field-signature img{display:block;max-width:100%;max-height:100%}verdocs-field-signature button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-signature button.hide{display:none}verdocs-field-signature.required{border:1px solid #cc0000}verdocs-field-signature.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-signature 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-signature verdocs-button-panel[data-active],verdocs-field-signature verdocs-button-panel:hover{opacity:1}verdocs-field-signature verdocs-button-panel .icon svg{fill:#333333}verdocs-field-signature verdocs-button-panel .icon:hover svg{fill:#000000}';export{l as verdocs_field_signature}
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as o}from"./p-ff1278ed.js";import{c as i}from"./p-ec26fc38.js";const s=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(o,{class:{disabled:this.disabled,[this.theme]:!0}},t("label",null,t("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",null,this.label)))}};s.style='@charset "UTF-8";verdocs-checkbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;line-height:18px}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const r=class{constructor(t){e(this,t),this.message=""}render(){return t(o,null,t("div",{class:"inner"},this.message))}};r.style='verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const c=class{constructor(t){e(this,t),this.text="",this.containerId=`verdocs-help-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=i(this.icon,this.tooltip,{})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var e,t;null===(e=this.tooltip)||void 0===e||e.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var e;null===(e=this.tooltip)||void 0===e||e.removeAttribute("data-show")}render(){return t(o,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.icon=e}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:e=>this.tooltip=e},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};c.style='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:relative;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';const l=class{constructor(t){e(this,t),this.value="",this.label="",this.placeholder="",this.autocomplete="",this.helpText="",this.type="text",this.disabled=!1}render(){return t(o,{class:"input-field"},t("label",null,this.label?t("div",{class:"input-label"},this.label+":"):t("div",null),t("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&t("verdocs-help-icon",{text:this.helpText})))}};l.style='verdocs-text-input{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';export{s as verdocs_checkbox,r as verdocs_component_error,c as verdocs_help_icon,l as verdocs_text_input}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,F as o,H as s,a as r}from"./p-ff1278ed.js";import{i as a}from"./p-a892d5b4.js";import{u as l,c as n}from"./p-ffe60abd.js";import{V as p,T as d}from"./p-2d4712ea.js";import{g as c}from"./p-6de76553.js";import{s as m}from"./p-3cb8a7f4.js";import{l as f}from"./p-ad6cc9f4.js";import{a as h}from"./p-25fa36d7.js";import{S as x}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-5ea05a1d.js";import"./p-7291906c.js";import"./p-b28ef4bb.js";import"./p-388b771c.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const v={[d.EVERYONE]:"Everyone",[d.EVERYONE_AS_CREATOR]:"Everyone as Me",[d.ORGANIZATION_MEMBER]:"Organization member",[d.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[d.CREATOR]:"Me"},g='<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>',u='<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>',b='<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>',w=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.cancel=t(this,"cancel",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.sequences=[],this.endpoint=p.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null,this.forceRerender=1}async componentWillLoad(){var e,t,i,o,s,r;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[RECIPIENTS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");try{console.log(`[RECIPIENTS] Loading template ${this.templateId}`,this.endpoint.session),await f(this.endpoint,this.templateId,!0)}catch(o){console.log("[RECIPIENTS] Error loading template",o),null===(e=this.sdkError)||void 0===e||e.emit(new x(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(e){console.log("[FIELDS] Error with preview session",e),null===(o=this.sdkError)||void 0===o||o.emit(new x(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(r=e.response)||void 0===r?void 0:r.data))}}componentDidRender(){a.dynamicDrop(!0),a(".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),i=+(e.target.getAttribute("posY")||0),o=e.dx+t,s=e.dy+i;e.target.setAttribute("posX",o),e.target.setAttribute("posy",s),e.target.style.transform=`translate(${o+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)}}),a(".dropzone").dropzone({overlap:.05,ondrop:function(e){e.target.classList.remove("active");const t=e.relatedTarget.dataset.rolename,i=+e.target.dataset.sequence,o=+e.target.dataset.order,s=m.template.roles.find((e=>e.name===t));s&&(s.sequence=i,s.order=o,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(m.template.roles.map((e=>l(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>console.log("[RECIPIENTS] Updated roles"))).catch((e=>console.log("[RECIPIENTS] 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(e){var t;e.stopPropagation(),null===(t=this.cancel)||void 0===t||t.emit()}handleSubmit(e){var t;e.stopPropagation(),null===(t=this.next)||void 0===t||t.emit()}sortTemplateRoles(){m.template.roles.sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}extractSequenceNumbers(){this.sequences=[],m.template.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,i)=>{m.template.roles.filter((e=>e.sequence===t)).forEach(((t,o)=>{e.includes(t.name)||(t.sequence=i+1,t.order=o+1,e.push(t.name))}))})),this.extractSequenceNumbers()}handleAddRole(e,t){e.stopPropagation();const i=m.template.roles.filter((e=>e.sequence===t)).length+1;let o="",s=m.template.roles.length;do{s++,o=`Recipient ${s}`}while(!o||m.template.roles.some((e=>e.name===o)));console.log("Will create",o,t,i),n(this.endpoint,this.templateId,{template_id:this.templateId,name:o,full_name:"",email:"",phone:"",sequence:t,order:i,type:"signer",delegator:!1}).then((e=>{console.log("Created role",e),m.template.roles.push(e),this.renumberTemplateRoles(),this.forceRerender++})).catch((e=>{console.log("Error creating role",e)}))}render(){const e=m.template.roles.map((e=>e.name));return i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":this.forceRerender},i("h5",null,"Roles"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("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>'}),i("div",{class:"row-recipients"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",v[m.template.sender]," ",i("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:b}),i("div",{class:"row-recipients"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((t=>i(o,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:u}),i("div",{class:"row-recipients"},i("div",{class:"dropzone","data-order":.5,"data-sequence":t}),m.template.roles.filter((e=>e.sequence===t)).map((s=>i(o,null,i("div",{class:"recipient",style:{backgroundColor:c(h(e,s.name))},"data-rolename":s.name},i("span",{class:"type-icon",innerHTML:"signer"===s.type?'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>':"cc"===s.type?'<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>':'<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>'}),s.name," ",i("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingRoleDialog=s.name,"aria-role":"button"})),i("div",{class:"dropzone","data-order":s.order+.5,"data-sequence":t})))),i("button",{class:"add-role",innerHTML:b,onClick:e=>this.handleAddRole(e,t)}))),i("div",{class:"row add-sequence","data-sequence":t},i("div",{class:"row-recipients"},i("div",{class:"icon",innerHTML:b}),i("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step")))))),this.sequences.length<1&&i(o,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:u}),i("div",{class:"row-recipients"},i("button",{class:"add-role",innerHTML:b,onClick:e=>this.handleAddRole(e,1)})))),i("div",{class:"row"},i("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>'}),i("div",{class:"row-recipients"},i("div",{class:"complete"},"Document Complete")))),e.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:b})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e),disabled:e.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null,this.forceRerender++},onDelete:e=>{console.log("deleted",e.detail),this.renumberTemplateRoles(),this.showingRoleDialog=null,this.forceRerender++}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return r(this)}};w.style='verdocs-template-recipients{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-recipients>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-recipients>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-recipients>form .participants{position:relative}verdocs-template-recipients>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-recipients>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-recipients>form .row .row-recipients{-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-recipients>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-recipients>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 5px 0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-recipients>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-recipients>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-recipients>form .row .settings-button{margin:4px 0 0 9px;cursor:pointer}verdocs-template-recipients>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:4px 12px 0 0}verdocs-template-recipients>form .row .recipient.dragging{position:absolute}verdocs-template-recipients>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-recipients>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-recipients>form .row .dropzone svg{fill:#cccccc}verdocs-template-recipients>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-recipients>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-recipients>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-recipients>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-recipients>form input:focus{outline:none}verdocs-template-recipients .row.add-sequence{display:none}verdocs-template-recipients .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-role:hover{opacity:1}verdocs-template-recipients .add-role svg{width:32px;height:32px}verdocs-template-recipients.dragging .add-role{display:none}verdocs-template-recipients.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-recipients.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-recipients.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-recipients .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-recipients .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-recipients .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-recipients ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-moz-placeholder{color:#aaaaaa}verdocs-template-recipients :-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::placeholder{color:#aaaaaa}';export{w as verdocs_template_recipients}
@@ -1 +0,0 @@
1
- import{r as e,c as o,h as i,H as t,F as n,a as s}from"./p-ff1278ed.js";import{V as l}from"./p-2d4712ea.js";import{i as a,j as d,s as r}from"./p-25fa36d7.js";import{g as p,s as c}from"./p-6619bc62.js";import{S as v}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-388b771c.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-5ea05a1d.js";import"./p-b28ef4bb.js";const x=class{constructor(i){e(this,i),this.sdkError=o(this,"sdkError",7),this.envelopeUpdated=o(this,"envelopeUpdated",7),this.endpoint=l.getDefault(),this.envelopeId=""}componentWillLoad(){this.endpoint.loadSession()}async componentDidLoad(){var e,o,i;if(this.envelopeId)try{await p(this.endpoint,this.envelopeId)}catch(t){null===(e=this.sdkError)||void 0===e||e.emit(new v(t.message,null===(o=t.response)||void 0===o?void 0:o.status,null===(i=t.response)||void 0===i?void 0:i.data))}else console.error("[VIEW] Missing required envelopeId")}handlePageRendered(e){console.log("[VIEW] Page rendered",e.detail)}async handleOptionSelected(e){var o;switch(e.detail.id){case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:c.envelope,event:"printed"});break;case"download-attachments":r(this.endpoint,c.envelope,c.envelope.envelope_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:c.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-certificate":d(this.endpoint,c.envelope,c.envelope.certificate_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:c.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-all":a(this.endpoint,[c.envelope]).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:c.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}))}}render(){var e;if(console.log("[VIEW] Rendering",c.error,c.loading,c.envelope),c.loading||!c.envelope)return i(t,null,i("verdocs-loader",null));if(c.error)return i(t,null,i("div",null,c.error));const o=[{id:"print",label:"Print"}],s=c.envelope.documents.length>0,l=!!c.envelope.certificate;return(s||l)&&o.push({label:""}),s&&o.push({id:"download-attachments",label:"Download Attachment(s)"}),l&&o.push({id:"download-certificate",label:"Download Certificate"}),s&&l&&o.push({id:"download-all",label:"Download All Files"}),i(t,{"data-r":c.updateCount},i("div",{class:"header"},i(n,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},c.envelope.name),i("div",{style:{flex:"1"}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:o,onOptionSelected:e=>this.handleOptionSelected(e)}))),i("div",{class:"document"},((null===(e=c.envelope)||void 0===e?void 0:e.documents)||[]).filter((e=>"certificate"!==e.type)).map((e=>{const o=[...(null==e?void 0:e.pages)||[]];return o.sort(((e,o)=>e.sequence-o.sequence)),i(n,null,o.map((e=>i("verdocs-document-page",{pageImageUri:e.display_uri,virtualWidth:612,virtualHeight:792,pageNumber:e.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))))}get component(){return s(this)}};x.style='verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-view .document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-view .document .inner{width:100%;max-width:1028px}';export{x as verdocs_view}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,a){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(a.next(e))}catch(e){o(e)}}function s(e){try{l(a["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):n(e.value).then(r,s)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,n,o,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,n&&(o=r[0]&2?n["return"]:r[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;if(n=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;n=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){i.label=r[1];break}if(r[0]===6&&i.label<o[1]){i.label=o[1];o=r;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(r);break}if(o[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];n=0}finally{a=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var a=0,n=t.length,o;a<n;a++){if(o||!(a in t)){if(!o)o=Array.prototype.slice.call(t,0,a);o[a]=t[a]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-97329951.system.js","./p-69912cbf.system.js","./p-261dcea1.system.js","./p-187b20b7.system.js","./p-80fe8ac3.system.js","./p-b1288daf.system.js","./p-38d00c38.system.js","./p-5b62f239.system.js","./p-45a4da16.system.js","./p-af2c2f79.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,a,n,o,r,s,l,d,c,p,h,u,g,m,v,f,x;return{setters:[function(e){t=e.r;i=e.c;a=e.h;n=e.H},function(e){o=e.c;r=e.g},function(e){s=e.V},function(e){l=e.S},function(e){d=e.i},function(e){c=e.u;p=e.c},function(e){h=e.a;u=e.r;g=e.e;m=e.f;v=e.h},function(e){f=e.s},function(e){x=e.l},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w=function(e,t,i,a){var n=new FormData;n.append("document",i,i.name);return e.api.post("/templates/".concat(t,"/documents"),n,{timeout:1e4,onUploadProgress:function(e){var t=e.total||1;var i=e.loaded||0;a===null||a===void 0?void 0:a(Math.floor(i*100/(t||1)),i,t||1)}}).then((function(e){return e.data}))};var b='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{max-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 .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 y=" ";var q='<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 Z=e("verdocs_template_create",function(){function e(e){t(this,e);this.cancel=i(this,"cancel",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=s.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;console.log("files",e.target.files);this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("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){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,a,n,s,d,c,p;return __generator(this,(function(h){switch(h.label){case 0:e.stopPropagation();if(!this.file){return[2]}h.label=1;case 1:h.trys.push([1,5,,6]);return[4,o(this.endpoint,{name:this.file.name})];case 2:s=h.sent();console.log("created template",s);return[4,w(this.endpoint,s.id,this.file)];case 3:d=h.sent();console.log("created document",d);return[4,r(this.endpoint,s.id)];case 4:c=h.sent();console.log("[CREATE] Created template",c);(t=this.next)===null||t===void 0?void 0:t.emit(c);return[3,6];case 5:p=h.sent();console.log("[TEMPLATE-CREATE] Error creating template",p);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new l(p.message,(a=p.response)===null||a===void 0?void 0:a.status,(n=p.response)===null||n===void 0?void 0:n.data));return[3,6];case 6:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return a(n,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return a("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},a("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),a("div",{class:"upload-box"},a("div",null,a("span",{innerHTML:q})),a("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold"}},this.file?this.file.name:"Drag a file here"),a("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),a("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),a("div",{class:"buttons"},a("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),a("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file})))};return e}());Z.style=b;var C="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}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.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath 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-dropdown{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-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z'/%3E%3C/svg%3E\") 16 16, 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 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}";var E='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var _='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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 k='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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 V='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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 S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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 L='<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 I='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var H=[{id:"attachment",tooltip:"Attachment",icon:"A"},{id:"checkbox",tooltip:"Check Box",icon:k},{id:"date",tooltip:"Date",icon:S},{id:"dropdown",tooltip:"Dropdown",icon:"O"},{id:"initial",tooltip:"Initials",icon:I},{id:"payment",tooltip:"Payment",icon:"P"},{id:"radio",tooltip:"Radio Button",icon:V},{id:"signature",tooltip:"Signature",icon:L},{id:"textarea",tooltip:"Text Area",icon:_},{id:"textbox",tooltip:"Text Box",icon:E},{id:"timestamp",tooltip:"Timestamp",icon:"X"}];var A=e("verdocs_template_fields",function(){function e(e){t(this,e);this.next=i(this,"next",7);this.cancel=i(this,"cancel",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=s.getDefault();this.templateId=null;this.placing=null;this.selectedRoleName=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,a,n,o,r,s;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}d.label=1;case 1:d.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,x(this.endpoint,this.templateId,true)];case 2:d.sent();this.selectedRoleName=f.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=d.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=d.sent();console.log("[FIELDS] Error with preview session",s);(a=this.sdkError)===null||a===void 0?void 0:a.emit(new l(s.message,(n=s.response)===null||n===void 0?void 0:n.status,(o=s.response)===null||o===void 0?void 0:o.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){d.dynamicDrop(true)};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){console.log("[FIELDS] handleFieldChange",e,t,i);return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,a){var n=this;a.addEventListener("input",(function(e){return n.handleFieldChange(t,e)}));a.addEventListener("settingsChanged",(function(){var e;a.setAttribute("roleindex",h(f.roleNames,t.role_name));(e=n.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:n.endpoint,template:f.template,event:"updated-field"})}));a.setAttribute("roleindex",i);a.setAttribute("pageNumber",e.pageNumber);a.setAttribute("xScale",e.xScale);a.setAttribute("yScale",e.yScale);a.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;console.log("[FIELDS] Page rendered",i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var a=f.fields.filter((function(e){return e.page_sequence===i.pageNumber}));console.log("[FIELDS] Fields on page",a);a.forEach((function(e){var a=h(f.roleNames,e.role_name);var n=u(e,i,a,{disabled:true,editable:true,draggable:true});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,a,n)}))}else{t.attachFieldAttributes(i,e,a,n)}d(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 i=+(e.target.getAttribute("posY")||0);var a=+(e.target.getAttribute("xScale")||1);var n=+(e.target.getAttribute("yScale")||1);var o=e.dx/a+t;var r=e.dy/n+i;e.target.setAttribute("posX",o);e.target.setAttribute("posy",r);g(e.target,"translate","".concat(o,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,a,n,o,r,s,l,d,p,h,u,g,m,v,x,w,b;return __generator(this,(function(y){switch(y.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],a=i.naturalWidth,n=a===void 0?612:a,o=i.naturalHeight,r=o===void 0?792:o,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();p=e.target.parentElement;h=p.getBoundingClientRect();u=Math.max(d.left-h.left,0);g=Math.max(l-(h.bottom-d.bottom),0);m=this.viewCoordinatesToPageCoordinates(u,g,t,n-e.rect.width,r-e.rect.height),v=m.x,x=m.y;w=e.target.getAttribute("name");b=f.fields.find((function(e){return e.name===w}));if(!b)return[3,2];b.setting.x=v;b.setting.y=x;return[4,c(this.endpoint,this.templateId,w,b)];case 1:y.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});y.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i;var a=(i=f.template.pages)===null||i===void 0?void 0:i[t-1];var n=(a===null||a===void 0?void 0:a.fields)||[];return"".concat(e,"P").concat(t,"-").concat(n.length)};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,a,n){var o=this.cachedPageInfo[i],r=o.xScale,s=r===void 0?1:r,l=o.yScale,d=l===void 0?1:l,c=o.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,a));var u=Math.floor(Math.min(Math.max(p-t,0)/d,n));return{x:h,y:u}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,a,n,o,r,s,l,d,c,h,u,g,x,w,b,y;return __generator(this,(function(q){switch(q.label){case 0:if(!this.placing)return[3,2];a=t.sequence;n=e.offsetX;o=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[a],d=l.naturalWidth,c=d===void 0?612:d,h=l.naturalHeight,u=h===void 0?792:h;g=this.viewCoordinatesToPageCoordinates(n,o,a,c-r,u-s),x=g.x,w=g.y;b={name:this.generateFieldName(this.placing,a),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:a,validator:null,setting:{x:x,y:w}};switch(b.type){case"attachment":case"payment":b.setting={x:x,y:w};break;case"initial":case"signature":b.setting={x:x,y:w,result:""};break;case"checkbox_group":b.setting={x:x,y:w,minimum_checked:0,maximum_checked:1e3};break;case"date":b.setting={x:x,y:w,width:r,height:s,result:""};break;case"dropdown":b.setting={x:x,y:w,width:r,height:s,value:"",placeholder:"Select a value"};break;case"radio_button_group":b.setting={x:x,y:w};break;case"textbox":b.setting={x:x,y:w,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":b.setting={x:x,y:w,width:r,height:s};break}return[4,p(this.endpoint,this.templateId,b)];case 1:y=q.sent();console.log("Saved field",y);f.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:f.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[a]});q.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;console.log("rendering",f.updateCount);if(!this.endpoint.session){return a(n,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(f.loading||!f.template){return a(n,null,a("verdocs-loader",null))}var i=__spreadArray([],f.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return a(n,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":f.updateCount,onSubmit:function(){console.log("onSubmit")}},a("div",{class:"pages"},i.map((function(e){return a("verdocs-document-page",{pageImageUri:e.display_uri,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},pageNumber:e.sequence,onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))),a("verdocs-floating-menu",{options:H,onOptionSelected:function(e){t.placing=e.detail.id}}))};return e}());A.style=C}}}));
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e,H as a}from"./p-ff1278ed.js";import{V as o}from"./p-2d4712ea.js";import{s as i}from"./p-3cb8a7f4.js";import{l as r}from"./p-ad6cc9f4.js";import{S as c}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-5ea05a1d.js";import"./p-7291906c.js";import"./p-b28ef4bb.js";const l=class{constructor(e){t(this,e),this.close=s(this,"close",7),this.sdkError=s(this,"sdkError",7),this.endpoint=o.getDefault(),this.templateId="",this.loading=!0}async componentWillLoad(){var t,s,e;try{this.endpoint.loadSession(),await r(this.endpoint,this.templateId),this.loading=!1}catch(a){console.log("[TEMPLATE NAME] Error loading template",a),this.loading=!1,null===(t=this.sdkError)||void 0===t||t.emit(new c(a.message,null===(s=a.response)||void 0===s?void 0:s.status,null===(e=a.response)||void 0===e?void 0:e.data))}}render(){return this.loading?e(a,{class:"loading"},e("verdocs-loader",null)):this.endpoint.session&&i.template?e(a,null,e("h5",null,"Attachments"),i.template.template_documents.map((t=>e("div",{class:"attachment"},e("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>'}),t.name," (",t.page_numbers," page",t.page_numbers>1?"s":"",")")))):e(a,{class:"empty"})}};l.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#4c56cb}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b;border:1px solid #cccccc}verdocs-template-attachments svg{width:24px;height:24px;fill:#5c6575;margin:2px 10px 0 0}';export{l as verdocs_template_attachments}
@@ -1 +0,0 @@
1
- import{r as e,c as a,h as t,H as o}from"./p-ff1278ed.js";import{u as s}from"./p-b28ef4bb.js";import{V as l}from"./p-2d4712ea.js";import{s as i}from"./p-3cb8a7f4.js";import{l as r}from"./p-ad6cc9f4.js";import{S as n}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-5ea05a1d.js";import"./p-7291906c.js";const m=class{constructor(t){e(this,t),this.close=a(this,"close",7),this.sdkError=a(this,"sdkError",7),this.endpoint=l.getDefault(),this.templateId="",this.name="",this.dirty=!1,this.loading=!0}async componentWillLoad(){var e,a,t;try{this.endpoint.loadSession(),await r(this.endpoint,this.templateId),this.loading=!1,this.name=i.template.name,this.dirty=!1}catch(o){console.log("[TEMPLATE NAME] Error loading template",o),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new n(o.message,null===(a=o.response)||void 0===a?void 0:a.status,null===(t=o.response)||void 0===t?void 0:t.data))}}handleCancel(e){var a;e.stopPropagation(),this.name=i.template.name,this.dirty=!1,null===(a=this.close)||void 0===a||a.emit()}async handleSave(e){var a;e.stopPropagation(),await s(this.endpoint,this.templateId,{name:this.name}),i.template.name=this.name,this.dirty=!1,null===(a=this.close)||void 0===a||a.emit()}render(){return this.loading?t(o,{class:"loading"},t("verdocs-loader",null)):this.endpoint.session&&i.template?t(o,null,t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("label",{htmlFor:"verdocs-template-name"},"Template Name"),t("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=this.name!==i.template.name}}),t("div",{class:"buttons"},t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(o,{class:"empty"})}};m.style='verdocs-template-name{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-name.loading{min-height:300px;position:relative;display:block}verdocs-template-name.empty{display:none}verdocs-template-name form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-name form label{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-name form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-name form input:focus{outline:none}verdocs-template-name .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-name ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-name ::-moz-placeholder{color:#aaaaaa}verdocs-template-name :-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::placeholder{color:#aaaaaa}';export{m as verdocs_template_name}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-ff1278ed.js";import{c as a,g as o}from"./p-b28ef4bb.js";import{V as l}from"./p-2d4712ea.js";import{S as r}from"./p-7a1b2643.js";import{i as n}from"./p-a892d5b4.js";import{u as d,c as h}from"./p-feb442b1.js";import{a as p,r as c,e as m,f as g,h as v}from"./p-25fa36d7.js";import{s as u}from"./p-3cb8a7f4.js";import{l as x}from"./p-ad6cc9f4.js";import"./p-21603661.js";import"./p-388b771c.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-5ea05a1d.js";import"./p-7291906c.js";const w=class{constructor(i){e(this,i),this.cancel=t(this,"cancel",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=l.getDefault(),this.file=void 0,this.creating=!1}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;console.log("files",e.target.files),this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){var t;e.stopPropagation(),null===(t=this.cancel)||void 0===t||t.emit()}async handleSubmit(e){var t,i,s,l,n,d,h,p;if(e.stopPropagation(),this.file)try{const e=await a(this.endpoint,{name:this.file.name});console.log("created template",e);const i=await(n=this.endpoint,d=e.id,h=this.file,p=new FormData,p.append("document",h,h.name),n.api.post("/templates/".concat(d,"/documents"),p,{timeout:1e4,onUploadProgress:function(){}}).then((function(e){return e.data})));console.log("created document",i);const s=await o(this.endpoint,e.id);console.log("[CREATE] Created template",s),null===(t=this.next)||void 0===t||t.emit(s)}catch(e){console.log("[TEMPLATE-CREATE] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new r(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(l=e.response)||void 0===l?void 0:l.data))}}render(){return this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),i("div",{class:"upload-box"},i("div",null,i("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>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file}))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};w.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{max-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 .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 f=[{id:"attachment",tooltip:"Attachment",icon:"A"},{id:"checkbox",tooltip:"Check Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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:"date",tooltip:"Date",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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:"dropdown",tooltip:"Dropdown",icon:"O"},{id:"initial",tooltip:"Initials",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>'},{id:"payment",tooltip:"Payment",icon:"P"},{id:"radio",tooltip:"Radio Button",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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:"signature",tooltip:"Signature",icon:'<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>'},{id:"textarea",tooltip:"Text Area",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path 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:"textbox",tooltip:"Text Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>'},{id:"timestamp",tooltip:"Timestamp",icon:"X"}],b=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.cancel=t(this,"cancel",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.pageHeights={},this.cachedPageInfo={},this.endpoint=l.getDefault(),this.templateId=null,this.placing=null,this.selectedRoleName=""}async componentWillLoad(){var e,t,i,s,a,o;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("[BUILD] Unable to start builder session, must be authenticated");try{console.log(`[FIELDS] Loading template ${this.templateId}`,this.endpoint.session),await x(this.endpoint,this.templateId,!0),this.selectedRoleName=u.roleNames[0],console.log("Starting with role",this.selectedRoleName)}catch(s){console.log("[FIELDS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new r(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new r(e.message,null===(a=e.response)||void 0===a?void 0:a.status,null===(o=e.response)||void 0===o?void 0:o.data))}}componentDidRender(){n.dynamicDrop(!0)}async handleFieldChange(e,t,i){console.log("[FIELDS] handleFieldChange",e,t,i)}attachFieldAttributes(e,t,i,s){s.addEventListener("input",(e=>this.handleFieldChange(t,e))),s.addEventListener("settingsChanged",(()=>{var e;s.setAttribute("roleindex",p(u.roleNames,t.role_name)),null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:u.template,event:"updated-field"})})),s.setAttribute("roleindex",i),s.setAttribute("pageNumber",e.pageNumber),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("name",t.name)}handlePageRendered(e){const t=e.detail;console.log("[FIELDS] Page rendered",t),this.cachedPageInfo[t.pageNumber]=t,this.pageHeights[t.pageNumber]=t.naturalHeight;const i=u.fields.filter((e=>e.page_sequence===t.pageNumber));console.log("[FIELDS] Fields on page",i),i.forEach((e=>{const i=p(u.roleNames,e.role_name),s=c(e,t,i,{disabled:!0,editable:!0,draggable:!0});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(t,e,i,s))):this.attachFieldAttributes(t,e,i,s),n(s).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),s=+(e.target.getAttribute("xScale")||1),a=+(e.target.getAttribute("yScale")||1),o=e.dx/s+t,l=e.dy/a+i;e.target.setAttribute("posX",o),e.target.setAttribute("posy",l),m(e.target,"translate",`${o}px, ${l}px`)},end:this.handleMoveField.bind(this)}}))}))}async handleMoveField(e){const t=e.target.getAttribute("pageNumber"),{naturalWidth:i=612,naturalHeight:s=792,renderedHeight:a=792}=this.cachedPageInfo[t];console.log("[FIELDS] Drag ended",t,e.target);const o=e.target.getBoundingClientRect(),l=e.target.parentElement.getBoundingClientRect(),r=Math.max(o.left-l.left,0),n=Math.max(a-(l.bottom-o.bottom),0),{x:h,y:p}=this.viewCoordinatesToPageCoordinates(r,n,t,i-e.rect.width,s-e.rect.height),c=e.target.getAttribute("name"),m=u.fields.find((e=>e.name===c));m&&(m.setting.x=h,m.setting.y=p,await d(this.endpoint,this.templateId,c,m),this.handlePageRendered({detail:this.cachedPageInfo[t]}))}generateFieldName(e,t){var i;const s=null===(i=u.template.pages)||void 0===i?void 0:i[t-1];return`${e}P${t}-${((null==s?void 0:s.fields)||[]).length}`}viewCoordinatesToPageCoordinates(e,t,i,s,a){const{xScale:o=1,yScale:l=1,renderedHeight:r=792}=this.cachedPageInfo[i];return{x:Math.floor(Math.min(e/o,s)),y:Math.floor(Math.min(Math.max(r-t,0)/l,a))}}async handleClickPage(e,t){var i;if(this.placing){const s=t.sequence,a=e.offsetX,o=e.offsetY,l=g(this.placing),r=v(this.placing),{naturalWidth:n=612,naturalHeight:d=792}=this.cachedPageInfo[s],{x:p,y:c}=this.viewCoordinatesToPageCoordinates(a,o,s,n-l,d-r),m={name:this.generateFieldName(this.placing,s),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:!0,page_sequence:s,validator:null,setting:{x:p,y:c}};switch(m.type){case"attachment":case"payment":m.setting={x:p,y:c};break;case"initial":case"signature":m.setting={x:p,y:c,result:""};break;case"checkbox_group":m.setting={x:p,y:c,minimum_checked:0,maximum_checked:1e3};break;case"date":m.setting={x:p,y:c,width:l,height:r,result:""};break;case"dropdown":m.setting={x:p,y:c,width:l,height:r,value:"",placeholder:"Select a value"};break;case"radio_button_group":m.setting={x:p,y:c};break;case"textbox":m.setting={x:p,y:c,width:l,height:r,result:"",leading:0,alignment:0,upperCase:!1};break;case"timestamp":m.setting={x:p,y:c,width:l,height:r}}const x=await h(this.endpoint,this.templateId,m);console.log("Saved field",x),u.fields.push(x),this.placing=null,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:u.template,event:"added-field"}),this.handlePageRendered({detail:this.cachedPageInfo[s]})}}render(){if(console.log("rendering",u.updateCount),!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(u.loading||!u.template)return i(s,null,i("verdocs-loader",null));const e=[...u.template.pages];return e.sort(((e,t)=>e.sequence-t.sequence)),i(s,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},"data-r":u.updateCount,onSubmit:()=>{console.log("onSubmit")}},i("div",{class:"pages"},e.map((e=>i("verdocs-document-page",{pageImageUri:e.display_uri,virtualWidth:612,virtualHeight:792,onClick:t=>this.handleClickPage(t,e),pageNumber:e.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))),i("verdocs-floating-menu",{options:f,onOptionSelected:e=>{this.placing=e.detail.id}}))}};b.style="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}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.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath 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-dropdown{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-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z'/%3E%3C/svg%3E\") 16 16, 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 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}";export{w as verdocs_template_create,b as verdocs_template_fields}