@verdocs/web-sdk 2.3.76 → 2.3.79

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 (137) hide show
  1. package/dist/cjs/{TemplateStore-ae59084b.js → TemplateStore-9a87282d.js} +1 -1
  2. package/dist/cjs/{VerdocsEndpoint-f4ef9333.js → VerdocsEndpoint-38bcb409.js} +1 -1
  3. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  4. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-auth.cjs.entry.js +4 -4
  6. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-preview_8.cjs.entry.js +3 -3
  16. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -3
  22. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  25. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +3 -3
  26. package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +1 -1
  27. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +0 -1
  28. package/dist/components/VerdocsEndpoint.js +1 -1
  29. package/dist/components/verdocs-auth.js +3 -3
  30. package/dist/components/verdocs-preview2.js +1 -1
  31. package/dist/components/verdocs-template-fields2.js +0 -1
  32. package/dist/custom-elements.json +2147 -0
  33. package/dist/docs.json +1 -1
  34. package/dist/esm/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
  35. package/dist/esm/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
  36. package/dist/esm/ipc-test.entry.js +2 -2
  37. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  38. package/dist/esm/verdocs-auth.entry.js +4 -4
  39. package/dist/esm/verdocs-build.entry.js +2 -2
  40. package/dist/esm/verdocs-checkbox_5.entry.js +2 -2
  41. package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
  42. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  43. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  44. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  45. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  46. package/dist/esm/verdocs-field-attachment_15.entry.js +1 -1
  47. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  48. package/dist/esm/verdocs-preview_8.entry.js +3 -3
  49. package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
  50. package/dist/esm/verdocs-search.entry.js +1 -1
  51. package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
  52. package/dist/esm/verdocs-settings.entry.js +1 -1
  53. package/dist/esm/verdocs-sign.entry.js +1 -1
  54. package/dist/esm/verdocs-template-fields_4.entry.js +2 -3
  55. package/dist/esm/verdocs-template-star.entry.js +1 -1
  56. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  57. package/dist/esm/verdocs-view.entry.js +1 -1
  58. package/dist/esm-es5/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
  59. package/dist/esm-es5/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
  60. package/dist/esm-es5/ipc-test.entry.js +1 -1
  61. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  62. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  63. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  64. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  65. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  66. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  82. package/dist/verdocs-web-sdk/{p-f246348c.system.js → p-034bd59e.system.js} +1 -1
  83. package/dist/verdocs-web-sdk/{p-b0e0084b.system.entry.js → p-05026d67.system.entry.js} +1 -1
  84. package/dist/verdocs-web-sdk/{p-bbf52926.entry.js → p-07cf78e3.entry.js} +1 -1
  85. package/dist/verdocs-web-sdk/{p-e7d7bcae.system.entry.js → p-094ea4ba.system.entry.js} +1 -1
  86. package/dist/verdocs-web-sdk/{p-15c88a05.system.entry.js → p-0d1f4272.system.entry.js} +1 -1
  87. package/dist/verdocs-web-sdk/p-1978c7bd.system.entry.js +1 -0
  88. package/dist/verdocs-web-sdk/{p-58e85310.system.entry.js → p-1a29b57f.system.entry.js} +1 -1
  89. package/dist/verdocs-web-sdk/{p-a12b2c26.system.entry.js → p-24742737.system.entry.js} +1 -1
  90. package/dist/verdocs-web-sdk/{p-6a93295c.entry.js → p-283d935e.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-ef99042b.entry.js → p-2bcd953d.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-8f36c42a.system.entry.js → p-337466c7.system.entry.js} +1 -1
  93. package/dist/verdocs-web-sdk/{p-ea2211d7.system.entry.js → p-340d2daa.system.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-d61bf72b.system.entry.js → p-4618665e.system.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-7e5a1766.system.entry.js → p-48c14014.system.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-d0d9ac6d.system.js → p-49139f23.system.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-8a7324b6.entry.js → p-5059ff08.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-159aeaf2.entry.js → p-55403539.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-a7907ccf.entry.js → p-6dad60bb.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/{p-a9da16c6.entry.js → p-6ec51b4b.entry.js} +1 -1
  101. package/dist/verdocs-web-sdk/{p-1d5f10f4.entry.js → p-70137c9e.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-e3623a0c.system.entry.js → p-786725d0.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-91e94910.entry.js → p-812d7568.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-06618569.entry.js → p-8b46dcc3.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/{p-baf16d17.system.entry.js → p-8b78ee37.system.entry.js} +1 -1
  106. package/dist/verdocs-web-sdk/{p-7b3dfc4b.system.entry.js → p-90734d54.system.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/p-92a6f625.entry.js +1 -0
  108. package/dist/verdocs-web-sdk/p-9b306355.system.entry.js +1 -0
  109. package/dist/verdocs-web-sdk/{p-40f5b1c5.entry.js → p-a15e1a57.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-9d748d04.entry.js → p-a87f2e56.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-bf8e6ba1.system.entry.js → p-b1e92d11.system.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-77c145b3.system.entry.js → p-b293e7d0.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-c73e78c8.system.entry.js → p-b9376079.system.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/p-bc6ce10f.entry.js +1 -0
  115. package/dist/verdocs-web-sdk/{p-9a816526.system.entry.js → p-bf2fd0eb.system.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-a9b80271.system.entry.js → p-cb48d6b9.system.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/p-ccac4998.entry.js +1 -0
  118. package/dist/verdocs-web-sdk/{p-45ecd6eb.js → p-cda8b816.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-84679597.entry.js → p-d075b6e8.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-c179b3e4.entry.js → p-d522f008.entry.js} +1 -1
  121. package/dist/verdocs-web-sdk/{p-28c93a3a.system.entry.js → p-d524266d.system.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/{p-e04d8f5d.js → p-d77962af.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-ac042888.entry.js → p-daebba0a.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-de5b9b23.system.entry.js → p-e3bfe2de.system.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-d1c52218.entry.js → p-e93796e2.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-b8063124.entry.js → p-ed319550.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-ac07d476.entry.js → p-ee9336c4.entry.js} +1 -1
  128. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  129. package/dist/verdocs-web-sdk/{p-5e8e5761.system.entry.js → p-f15263ff.system.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-d11ffc76.entry.js → p-f6b75e4c.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  132. package/package.json +2 -2
  133. package/dist/verdocs-web-sdk/p-30492f83.system.entry.js +0 -1
  134. package/dist/verdocs-web-sdk/p-332141f2.entry.js +0 -1
  135. package/dist/verdocs-web-sdk/p-7519fe6e.system.entry.js +0 -1
  136. package/dist/verdocs-web-sdk/p-755b5223.entry.js +0 -1
  137. package/dist/verdocs-web-sdk/p-b2d3ac44.entry.js +0 -1
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,o){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function l(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?i(e.value):n(e.value).then(l,s)}a((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return a([e,t])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,n&&(r=l[0]&2?n["return"]:l[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;if(n=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;n=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e];n=0}finally{o=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,n=t.length,r;o<n;o++){if(r||!(o in t)){if(!r)r=Array.prototype.slice.call(t,0,o);r[o]=t[o]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-bbee73c8.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-b1288daf.system.js","./p-95080569.system.js","./p-8324a7a3.system.js","./p-d0d9ac6d.system.js","./p-187b20b7.system.js","./p-3af6b910.system.js"],(function(e){"use strict";var t,i,o,n,r,l,s,a,d,p,c,u,f,h;return{setters:[function(e){t=e.r;i=e.h;o=e.H;n=e.c;r=e.a},function(e){l=e.a},function(){},function(e){s=e.V},function(e){a=e.u;d=e.d},function(e){p=e.g;c=e.u},function(e){u=e.g},function(e){f=e.g},function(e){h=e.S},function(){}],execute:function(){var v='@charset "UTF-8";verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;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 m=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 i(o,{class:(e={disabled:this.disabled},e[this.theme]=true,e)},i("label",null,i("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),i("span",null,this.label)))};return e}());m.style=v;var g='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;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';var b=e("verdocs_component_error",function(){function e(e){t(this,e);this.message=""}e.prototype.render=function(){return i(o,null,i("div",{class:"inner"},this.message))};return e}());b.style=g;var x="";var y="10001";var w=e("verdocs_portal",function(){function e(e){t(this,e);this.clickAway=n(this,"clickAway",7);this.moved=false;this.anchor=undefined;this.voffset=0;this.align="left"}e.prototype.handleScroll=function(){this.calculatePosition()};e.prototype.handleResize=function(){this.calculatePosition()};e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){(t=this.clickAway)===null||t===void 0?void 0:t.emit()}};e.prototype.calculateLeft=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();if(this.align==="left"){return Math.max(t.left,0)}if(this.align==="right"){return Math.max(t.left+t.width-this.portal.offsetWidth,0)}return Math.max(t.left-this.portal.offsetWidth/2+t.width/2,0)};e.prototype.calculateTop=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();return t.bottom+this.voffset};e.prototype.calculatePosition=function(){this.portal.style.top="".concat(this.calculateTop(),"px");this.portal.style.left="".concat(this.calculateLeft(),"px")};e.prototype.componentWillLoad=function(){var e;var t="".concat(this.anchor,"-portal");(e=document.getElementById(t))===null||e===void 0?void 0:e.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",t);this.portal.style.zIndex=y;this.portal.style.position="absolute";document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element);this.calculatePosition()};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.render=function(){var e=this;return i(o,{ref:function(t){return e.element=t}},i("slot",null))};return e}());w.style=x;var k='verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var _=e("verdocs_select_input",function(){function e(e){t(this,e);this.value="";this.label="";this.options=undefined;this.disabled=false}e.prototype.render=function(){var e=this;return i(o,{class:"input-field"},i("label",null,this.label?i("div",{class:"input-label"},this.label+":"):i("div",null),i("select",{class:"input-element",disabled:this.disabled},this.options.map((function(t){return i("option",{value:t.value,selected:t.value===e.value},t.label)})))))};return e}());_.style=k;var I;var S=typeof l!=="undefined"&&(l.crypto||l.msCrypto);if(S&&S.getRandomValues){var q=new Uint8Array(16);I=function e(){S.getRandomValues(q);return q}}if(!I){var E=new Array(16);I=function(){for(var e=0,t;e<16;e++){if((e&3)===0)t=Math.random()*4294967296;E[e]=t>>>((e&3)<<3)&255}return E}}var N=I;var T=[];for(var P=0;P<256;++P){T[P]=(P+256).toString(16).substr(1)}function C(e,t){var i=t||0;var o=T;return o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]}var L=C;var R=N();var z=[R[0]|1,R[1],R[2],R[3],R[4],R[5]];var A=(R[6]<<8|R[7])&16383;var j=0,O=0;function D(e,t,i){var o=t&&i||0;var n=t||[];e=e||{};var r=e.clockseq!==undefined?e.clockseq:A;var l=e.msecs!==undefined?e.msecs:(new Date).getTime();var s=e.nsecs!==undefined?e.nsecs:O+1;var a=l-j+(s-O)/1e4;if(a<0&&e.clockseq===undefined){r=r+1&16383}if((a<0||l>j)&&e.nsecs===undefined){s=0}if(s>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}j=l;O=s;A=r;l+=122192928e5;var d=((l&268435455)*1e4+s)%4294967296;n[o++]=d>>>24&255;n[o++]=d>>>16&255;n[o++]=d>>>8&255;n[o++]=d&255;var p=l/4294967296*1e4&268435455;n[o++]=p>>>8&255;n[o++]=p&255;n[o++]=p>>>24&15|16;n[o++]=p>>>16&255;n[o++]=r>>>8|128;n[o++]=r&255;var c=e.node||z;for(var u=0;u<6;++u){n[o+u]=c[u]}return t?t:L(n)}var M=D;function B(e,t,i){var o=t&&i||0;if(typeof e=="string"){t=e=="binary"?new Array(16):null;e=null}e=e||{};var n=e.random||(e.rng||N)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(t){for(var r=0;r<16;++r){t[o+r]=n[r]}}return t||L(n)}var H=B;var F=H;F.v1=M;F.v4=H;var U=F;var W='verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0px #0000001f;box-shadow:2px 2px 10px 0px #0000001f}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:#a50021}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';var Q=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};var Z='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var V='<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 G=e("verdocs_template_field_properties",function(){function e(e){t(this,e);this.close=n(this,"close",7);this.delete=n(this,"delete",7);this.settingsChanged=n(this,"settingsChanged",7);this.sdkError=n(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=s.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.loading=true;this.setting=null;this.label="";this.type="textbox";this.name="";this.required=false;this.roleName="";this.group="";this.fieldType="";this.options=[];this.placeholder="";this.value="";this.leading=0;this.showingHelp=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,n,r,l,s,a,d,c,v;var m=this;return __generator(this,(function(g){switch(g.label){case 0:g.trys.push([0,4,,5]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELD PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.fieldName){console.error("[FIELD PROPERTIES] Missing required field name");return[2]}if(!this.endpoint.session){console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");return[2]}s=this;return[4,f(this.endpoint,this.templateId)];case 1:s.templateStore=g.sent();a=this;return[4,p(this.templateId)];case 2:a.fieldStore=g.sent();d=this;return[4,u(this.templateId)];case 3:d.roleStore=g.sent();c=this.fieldStore.get("fields").find((function(e){return e.name===m.fieldName}));if(!c){console.log('[FIELD PROPERTIES] Unable to find field "'.concat(this.fieldName,'" in fields'))}else{console.log("props",c)}this.type=c.type;this.name=c.name;this.label=c.label;this.group=c.name;this.roleName=c.role_name;this.required=c.required;this.fieldType=c.type;this.placeholder=((e=c.setting)===null||e===void 0?void 0:e.placeholder)||"";this.value=((t=c.setting)===null||t===void 0?void 0:t.result)||"";this.leading=((i=c.setting)===null||i===void 0?void 0:i.leading)||0;this.setting=c.setting||{};this.options=((o=c.setting)===null||o===void 0?void 0:o.options)||[];this.dirty=false;this.loading=false;console.log("Displaying settings for",this.setting);return[3,5];case 4:v=g.sent();console.log("[FIELD PROPERTIES] Error loading template",v);this.loading=false;(n=this.sdkError)===null||n===void 0?void 0:n.emit(new h(v.message,(r=v.response)===null||r===void 0?void 0:r.status,(l=v.response)===null||l===void 0?void 0:l.data));return[3,5];case 5:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var i,o,n,r,l;e.stopPropagation();var s=this.fieldStore.get("fields").find((function(e){return e.name===t.fieldName}));if(s){this.name=s.name;this.label=s.label;this.roleName=s.role_name;this.required=s.required;this.placeholder=((i=s.setting)===null||i===void 0?void 0:i.placeholder)||"";this.value=((o=s.setting)===null||o===void 0?void 0:o.result)||"";this.leading=((n=s.setting)===null||n===void 0?void 0:n.leading)||0}this.dirty=false;(r=this.close)===null||r===void 0?void 0:r.emit();(l=document.getElementById("verdocs-template-field-properties"))===null||l===void 0?void 0:l.remove()};e.prototype.handleSave=function(e){var t=this;e.stopPropagation();var i={name:this.name,label:this.label||null,required:this.required,role_name:this.roleName};if(this.type==="checkbox_group"||this.type==="radio_button_group"){i.setting=this.setting;i.setting.options=this.options}else if(this.type==="textarea"||this.type==="textbox"){i.setting=__assign({},this.setting);i.setting.result=(this.value||"").trim()}else if(this.type==="dropdown"){i.setting={x:this.setting.x,y:this.setting.y,options:this.options}}console.log("FP: Will update",this.fieldName,i);a(this.endpoint,this.templateId,this.fieldName,i).then((function(e){var o,n,r;t.dirty=false;c(t.fieldStore,t.fieldName,e);(o=t.settingsChanged)===null||o===void 0?void 0:o.emit({fieldName:t.fieldName,settings:i,field:e});(n=t.close)===null||n===void 0?void 0:n.emit();(r=document.getElementById("verdocs-template-field-properties"))===null||r===void 0?void 0:r.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleAddOption=function(e){var t=this;e.stopPropagation();var i={name:this.name,required:this.required,role_name:this.roleName};this.options.push(this.type==="radio_button_group"?{id:U(),value:"Option ".concat(this.options.length+1),selected:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:U(),value:"Option ".concat(this.options.length+1),checked:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20});i.setting=__assign({},this.setting);delete i.setting.result;i.setting.options=__spreadArray([],this.options,true);a(this.endpoint,this.templateId,this.fieldName,i).then((function(e){var o,n,r;t.dirty=false;c(t.fieldStore,t.fieldName,e);t.fieldName=e.name;(o=t.settingsChanged)===null||o===void 0?void 0:o.emit({fieldName:t.fieldName,settings:i,field:e});(n=t.close)===null||n===void 0?void 0:n.emit();(r=document.getElementById("verdocs-template-field-properties"))===null||r===void 0?void 0:r.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")){d(this.endpoint,this.templateId,this.fieldName).then((function(){var e,i;t.fieldStore.set("fields",t.fieldStore.get("fields").filter((function(e){return e.name!==t.fieldName})));(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(i=document.getElementById("verdocs-template-field-properties"))===null||i===void 0?void 0:i.remove()})).catch((function(e){console.log("[FIELD PROPERTIES] Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;if(!this.endpoint.session){return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!this.fieldStore.get("fields").some((function(t){return t.name===e.fieldName}))){return i(o,{class:"empty"})}if(this.helpText&&this.showingHelp){return i(o,null,i("h6",null,Q(this.fieldType)," Settings ",i("div",{style:{flex:"1"}}),i("div",{class:"help-icon",innerHTML:V,onClick:function(){return e.showingHelp=false}})),i("p",{class:"instructions",innerHTML:this.helpText}))}return i(o,{id:"verdocs-template-field-properties"},i("h6",null,Q(this.fieldType.replace(/_/g," "))," Settings ",i("div",{style:{flex:"1"}}),this.helpText&&i("div",{class:"help-icon",innerHTML:V,onClick:function(){return e.showingHelp=true}})),i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("div",{class:"row"},i("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}})),i("div",{class:"row"},i("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:function(t){e.label=t.target.value;e.dirty=true}})),i("div",{class:"row"},i("div",{class:"input-label"},"Role:"),i("verdocs-select-input",{value:this.roleName,options:(t=this.roleStore.state)===null||t===void 0?void 0:t.roles.map((function(e){return{label:e.name,value:e.name}})),onInput:function(t){e.roleName=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&i("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},i("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:function(t){e.value=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&i("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},i("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:function(t){e.placeholder=t.target.value;e.dirty=true}})),i("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},i("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),i("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:function(t){e.required=t.target.checked;e.dirty=true}})),["checkbox_group","radio_button_group"].includes(this.type)&&i("verdocs-button",{size:"small",onClick:function(t){return e.handleAddOption(t)},label:"Add Option"}),["dropdown"].includes(this.type)&&i("div",{class:"options"},i("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),i("div",{class:"row-header"},i("h6",null,"ID"),i("h6",null,"Label"),i("div",{style:{width:"34px"}})),this.options.map((function(t,o){return i("div",{class:"row option-row",key:o},i("verdocs-text-input",{id:"verdocs-option-id-".concat(t.id),value:t.id,placeholder:"Unique ID",onInput:function(t){e.options[o].id=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-option-value-".concat(t.id),value:t.value,placeholder:"Display value",onInput:function(t){e.options[o].value=t.target.value;e.dirty=true}}),i("button",{innerHTML:Z,class:"remove-button",onClick:function(){e.options=e.options.filter((function(e){return e.id!==t.id}));e.dirty=true}}))})),i("div",{class:"row-header"},i("button",{class:"add-option-button",onClick:function(){e.options=__spreadArray(__spreadArray([],e.options,true),[{id:"option-".concat(e.options.length+1),value:"Option ".concat(e.options.length+1)}],false);e.dirty=true}},"Add Option"))),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:Z}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());G.style=W}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,o){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function l(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?i(e.value):n(e.value).then(l,s)}a((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return a([e,t])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,n&&(r=l[0]&2?n["return"]:l[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;if(n=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;n=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e];n=0}finally{o=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,n=t.length,r;o<n;o++){if(r||!(o in t)){if(!r)r=Array.prototype.slice.call(t,0,o);r[o]=t[o]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-bbee73c8.system.js","./p-54498887.system.js","./p-034bd59e.system.js","./p-b1288daf.system.js","./p-95080569.system.js","./p-8324a7a3.system.js","./p-49139f23.system.js","./p-187b20b7.system.js","./p-3af6b910.system.js"],(function(e){"use strict";var t,i,o,n,r,l,s,a,d,p,c,u,f,h;return{setters:[function(e){t=e.r;i=e.h;o=e.H;n=e.c;r=e.a},function(e){l=e.a},function(){},function(e){s=e.V},function(e){a=e.u;d=e.d},function(e){p=e.g;c=e.u},function(e){u=e.g},function(e){f=e.g},function(e){h=e.S},function(){}],execute:function(){var v='@charset "UTF-8";verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;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 m=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 i(o,{class:(e={disabled:this.disabled},e[this.theme]=true,e)},i("label",null,i("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),i("span",null,this.label)))};return e}());m.style=v;var g='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;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';var b=e("verdocs_component_error",function(){function e(e){t(this,e);this.message=""}e.prototype.render=function(){return i(o,null,i("div",{class:"inner"},this.message))};return e}());b.style=g;var x="";var y="10001";var w=e("verdocs_portal",function(){function e(e){t(this,e);this.clickAway=n(this,"clickAway",7);this.moved=false;this.anchor=undefined;this.voffset=0;this.align="left"}e.prototype.handleScroll=function(){this.calculatePosition()};e.prototype.handleResize=function(){this.calculatePosition()};e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){(t=this.clickAway)===null||t===void 0?void 0:t.emit()}};e.prototype.calculateLeft=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();if(this.align==="left"){return Math.max(t.left,0)}if(this.align==="right"){return Math.max(t.left+t.width-this.portal.offsetWidth,0)}return Math.max(t.left-this.portal.offsetWidth/2+t.width/2,0)};e.prototype.calculateTop=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();return t.bottom+this.voffset};e.prototype.calculatePosition=function(){this.portal.style.top="".concat(this.calculateTop(),"px");this.portal.style.left="".concat(this.calculateLeft(),"px")};e.prototype.componentWillLoad=function(){var e;var t="".concat(this.anchor,"-portal");(e=document.getElementById(t))===null||e===void 0?void 0:e.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",t);this.portal.style.zIndex=y;this.portal.style.position="absolute";document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element);this.calculatePosition()};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.render=function(){var e=this;return i(o,{ref:function(t){return e.element=t}},i("slot",null))};return e}());w.style=x;var k='verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var _=e("verdocs_select_input",function(){function e(e){t(this,e);this.value="";this.label="";this.options=undefined;this.disabled=false}e.prototype.render=function(){var e=this;return i(o,{class:"input-field"},i("label",null,this.label?i("div",{class:"input-label"},this.label+":"):i("div",null),i("select",{class:"input-element",disabled:this.disabled},this.options.map((function(t){return i("option",{value:t.value,selected:t.value===e.value},t.label)})))))};return e}());_.style=k;var I;var S=typeof l!=="undefined"&&(l.crypto||l.msCrypto);if(S&&S.getRandomValues){var q=new Uint8Array(16);I=function e(){S.getRandomValues(q);return q}}if(!I){var E=new Array(16);I=function(){for(var e=0,t;e<16;e++){if((e&3)===0)t=Math.random()*4294967296;E[e]=t>>>((e&3)<<3)&255}return E}}var N=I;var T=[];for(var P=0;P<256;++P){T[P]=(P+256).toString(16).substr(1)}function C(e,t){var i=t||0;var o=T;return o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]}var L=C;var R=N();var z=[R[0]|1,R[1],R[2],R[3],R[4],R[5]];var A=(R[6]<<8|R[7])&16383;var j=0,O=0;function D(e,t,i){var o=t&&i||0;var n=t||[];e=e||{};var r=e.clockseq!==undefined?e.clockseq:A;var l=e.msecs!==undefined?e.msecs:(new Date).getTime();var s=e.nsecs!==undefined?e.nsecs:O+1;var a=l-j+(s-O)/1e4;if(a<0&&e.clockseq===undefined){r=r+1&16383}if((a<0||l>j)&&e.nsecs===undefined){s=0}if(s>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}j=l;O=s;A=r;l+=122192928e5;var d=((l&268435455)*1e4+s)%4294967296;n[o++]=d>>>24&255;n[o++]=d>>>16&255;n[o++]=d>>>8&255;n[o++]=d&255;var p=l/4294967296*1e4&268435455;n[o++]=p>>>8&255;n[o++]=p&255;n[o++]=p>>>24&15|16;n[o++]=p>>>16&255;n[o++]=r>>>8|128;n[o++]=r&255;var c=e.node||z;for(var u=0;u<6;++u){n[o+u]=c[u]}return t?t:L(n)}var M=D;function B(e,t,i){var o=t&&i||0;if(typeof e=="string"){t=e=="binary"?new Array(16):null;e=null}e=e||{};var n=e.random||(e.rng||N)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(t){for(var r=0;r<16;++r){t[o+r]=n[r]}}return t||L(n)}var H=B;var F=H;F.v1=M;F.v4=H;var U=F;var W='verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0px #0000001f;box-shadow:2px 2px 10px 0px #0000001f}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:#a50021}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';var Q=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};var Z='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var V='<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 G=e("verdocs_template_field_properties",function(){function e(e){t(this,e);this.close=n(this,"close",7);this.delete=n(this,"delete",7);this.settingsChanged=n(this,"settingsChanged",7);this.sdkError=n(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=s.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.loading=true;this.setting=null;this.label="";this.type="textbox";this.name="";this.required=false;this.roleName="";this.group="";this.fieldType="";this.options=[];this.placeholder="";this.value="";this.leading=0;this.showingHelp=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,n,r,l,s,a,d,c,v;var m=this;return __generator(this,(function(g){switch(g.label){case 0:g.trys.push([0,4,,5]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELD PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.fieldName){console.error("[FIELD PROPERTIES] Missing required field name");return[2]}if(!this.endpoint.session){console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");return[2]}s=this;return[4,f(this.endpoint,this.templateId)];case 1:s.templateStore=g.sent();a=this;return[4,p(this.templateId)];case 2:a.fieldStore=g.sent();d=this;return[4,u(this.templateId)];case 3:d.roleStore=g.sent();c=this.fieldStore.get("fields").find((function(e){return e.name===m.fieldName}));if(!c){console.log('[FIELD PROPERTIES] Unable to find field "'.concat(this.fieldName,'" in fields'))}else{console.log("props",c)}this.type=c.type;this.name=c.name;this.label=c.label;this.group=c.name;this.roleName=c.role_name;this.required=c.required;this.fieldType=c.type;this.placeholder=((e=c.setting)===null||e===void 0?void 0:e.placeholder)||"";this.value=((t=c.setting)===null||t===void 0?void 0:t.result)||"";this.leading=((i=c.setting)===null||i===void 0?void 0:i.leading)||0;this.setting=c.setting||{};this.options=((o=c.setting)===null||o===void 0?void 0:o.options)||[];this.dirty=false;this.loading=false;console.log("Displaying settings for",this.setting);return[3,5];case 4:v=g.sent();console.log("[FIELD PROPERTIES] Error loading template",v);this.loading=false;(n=this.sdkError)===null||n===void 0?void 0:n.emit(new h(v.message,(r=v.response)===null||r===void 0?void 0:r.status,(l=v.response)===null||l===void 0?void 0:l.data));return[3,5];case 5:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var i,o,n,r,l;e.stopPropagation();var s=this.fieldStore.get("fields").find((function(e){return e.name===t.fieldName}));if(s){this.name=s.name;this.label=s.label;this.roleName=s.role_name;this.required=s.required;this.placeholder=((i=s.setting)===null||i===void 0?void 0:i.placeholder)||"";this.value=((o=s.setting)===null||o===void 0?void 0:o.result)||"";this.leading=((n=s.setting)===null||n===void 0?void 0:n.leading)||0}this.dirty=false;(r=this.close)===null||r===void 0?void 0:r.emit();(l=document.getElementById("verdocs-template-field-properties"))===null||l===void 0?void 0:l.remove()};e.prototype.handleSave=function(e){var t=this;e.stopPropagation();var i={name:this.name,label:this.label||null,required:this.required,role_name:this.roleName};if(this.type==="checkbox_group"||this.type==="radio_button_group"){i.setting=this.setting;i.setting.options=this.options}else if(this.type==="textarea"||this.type==="textbox"){i.setting=__assign({},this.setting);i.setting.result=(this.value||"").trim()}else if(this.type==="dropdown"){i.setting={x:this.setting.x,y:this.setting.y,options:this.options}}console.log("FP: Will update",this.fieldName,i);a(this.endpoint,this.templateId,this.fieldName,i).then((function(e){var o,n,r;t.dirty=false;c(t.fieldStore,t.fieldName,e);(o=t.settingsChanged)===null||o===void 0?void 0:o.emit({fieldName:t.fieldName,settings:i,field:e});(n=t.close)===null||n===void 0?void 0:n.emit();(r=document.getElementById("verdocs-template-field-properties"))===null||r===void 0?void 0:r.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleAddOption=function(e){var t=this;e.stopPropagation();var i={name:this.name,required:this.required,role_name:this.roleName};this.options.push(this.type==="radio_button_group"?{id:U(),value:"Option ".concat(this.options.length+1),selected:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:U(),value:"Option ".concat(this.options.length+1),checked:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20});i.setting=__assign({},this.setting);delete i.setting.result;i.setting.options=__spreadArray([],this.options,true);a(this.endpoint,this.templateId,this.fieldName,i).then((function(e){var o,n,r;t.dirty=false;c(t.fieldStore,t.fieldName,e);t.fieldName=e.name;(o=t.settingsChanged)===null||o===void 0?void 0:o.emit({fieldName:t.fieldName,settings:i,field:e});(n=t.close)===null||n===void 0?void 0:n.emit();(r=document.getElementById("verdocs-template-field-properties"))===null||r===void 0?void 0:r.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")){d(this.endpoint,this.templateId,this.fieldName).then((function(){var e,i;t.fieldStore.set("fields",t.fieldStore.get("fields").filter((function(e){return e.name!==t.fieldName})));(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(i=document.getElementById("verdocs-template-field-properties"))===null||i===void 0?void 0:i.remove()})).catch((function(e){console.log("[FIELD PROPERTIES] Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;if(!this.endpoint.session){return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!this.fieldStore.get("fields").some((function(t){return t.name===e.fieldName}))){return i(o,{class:"empty"})}if(this.helpText&&this.showingHelp){return i(o,null,i("h6",null,Q(this.fieldType)," Settings ",i("div",{style:{flex:"1"}}),i("div",{class:"help-icon",innerHTML:V,onClick:function(){return e.showingHelp=false}})),i("p",{class:"instructions",innerHTML:this.helpText}))}return i(o,{id:"verdocs-template-field-properties"},i("h6",null,Q(this.fieldType.replace(/_/g," "))," Settings ",i("div",{style:{flex:"1"}}),this.helpText&&i("div",{class:"help-icon",innerHTML:V,onClick:function(){return e.showingHelp=true}})),i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("div",{class:"row"},i("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}})),i("div",{class:"row"},i("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:function(t){e.label=t.target.value;e.dirty=true}})),i("div",{class:"row"},i("div",{class:"input-label"},"Role:"),i("verdocs-select-input",{value:this.roleName,options:(t=this.roleStore.state)===null||t===void 0?void 0:t.roles.map((function(e){return{label:e.name,value:e.name}})),onInput:function(t){e.roleName=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&i("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},i("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:function(t){e.value=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&i("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},i("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:function(t){e.placeholder=t.target.value;e.dirty=true}})),i("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},i("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),i("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:function(t){e.required=t.target.checked;e.dirty=true}})),["checkbox_group","radio_button_group"].includes(this.type)&&i("verdocs-button",{size:"small",onClick:function(t){return e.handleAddOption(t)},label:"Add Option"}),["dropdown"].includes(this.type)&&i("div",{class:"options"},i("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),i("div",{class:"row-header"},i("h6",null,"ID"),i("h6",null,"Label"),i("div",{style:{width:"34px"}})),this.options.map((function(t,o){return i("div",{class:"row option-row",key:o},i("verdocs-text-input",{id:"verdocs-option-id-".concat(t.id),value:t.id,placeholder:"Unique ID",onInput:function(t){e.options[o].id=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-option-value-".concat(t.id),value:t.value,placeholder:"Display value",onInput:function(t){e.options[o].value=t.target.value;e.dirty=true}}),i("button",{innerHTML:Z,class:"remove-button",onClick:function(){e.options=e.options.filter((function(e){return e.id!==t.id}));e.dirty=true}}))})),i("div",{class:"row-header"},i("button",{class:"add-option-button",onClick:function(){e.options=__spreadArray(__spreadArray([],e.options,true),[{id:"option-".concat(e.options.length+1),value:"Option ".concat(e.options.length+1)}],false);e.dirty=true}},"Add Option"))),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:Z}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());G.style=W}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,l){function a(e){try{o(s.next(e))}catch(e){l(e)}}function r(e){try{o(s["throw"](e))}catch(e){l(e)}}function o(e){e.done?n(e.value):i(e.value).then(a,r)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},s,i,l,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(t){return o([e,t])}}function o(a){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,i&&(l=a[0]&2?i["return"]:a[0]?i["throw"]||((l=i["return"])&&l.call(i),0):i.next)&&!(l=l.call(i,a[1])).done)return l;if(i=0,l)a=[a[0]&2,l.value];switch(a[0]){case 0:case 1:l=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(l=n.trys,l=l.length>0&&l[l.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!l||a[1]>l[0]&&a[1]<l[3])){n.label=a[1];break}if(a[0]===6&&n.label<l[1]){n.label=l[1];l=a;break}if(l&&n.label<l[2]){n.label=l[2];n.ops.push(a);break}if(l[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{s=l=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-3bcd86ea.system.js","./p-187b20b7.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,n,s,i,l,a,r,o,c,d,p,h;return{setters:[function(e){t=e.r;n=e.c;s=e.h;i=e.H},function(){},function(e){l=e.V;a=e.l;r=e.d;o=e.c;c=e.a},function(e){d=e.i},function(e){p=e.S},function(e){h=e.f}],execute:function(){var u='verdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var x='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var b='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var y=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var z=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var M=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var S=e("verdocs_templates_list",function(){function e(e){var s=this;t(this,e);this.sdkError=n(this,"sdkError",7);this.viewTemplate=n(this,"viewTemplate",7);this.signNow=n(this,"signNow",7);this.submittedData=n(this,"submittedData",7);this.editTemplate=n(this,"editTemplate",7);this.templateDeleted=n(this,"templateDeleted",7);this.changeSort=n(this,"changeSort",7);this.changeSharing=n(this,"changeSharing",7);this.changeStarred=n(this,"changeStarred",7);this.changeName=n(this,"changeName",7);this.handleOptionSelected=function(e,t){var n,i,l,a;if(e==="send"){(n=s.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:s.endpoint,template:t})}else if(e==="signnow"){(i=s.signNow)===null||i===void 0?void 0:i.emit({endpoint:s.endpoint,template:t})}else if(e==="submitted"){(l=s.submittedData)===null||l===void 0?void 0:l.emit({endpoint:s.endpoint,template:t})}else if(e==="edit"){(a=s.editTemplate)===null||a===void 0?void 0:a.emit({endpoint:s.endpoint,template:t})}else if(e==="delete"){s.confirmDelete=t}};this.endpoint=l.getDefault();this.sharing="all";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter=""}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,l;return __generator(this,(function(r){switch(r.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;r.label=1;case 1:r.trys.push([1,3,,4]);s={page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,a(this.endpoint,s)];case 2:i=r.sent();this.templates=i.templates;this.count=i.total;this.loading=false;return[3,4];case 3:l=r.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",l);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(l.message,(t=l.response)===null||t===void 0?void 0:t.status,(n=l.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;r(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,l;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new p(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(l=n.response)===null||l===void 0?void 0:l.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return s(i,null,s("div",{class:"header"},s("div",{class:"filter"},s("verdocs-text-input",{id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),s("verdocs-quick-filter",{label:"Sharing",value:this.sharing,options:y,onOptionSelected:function(t){var n;e.sharing=t.detail.value;(n=e.changeSharing)===null||n===void 0?void 0:n.emit(e.sharing)}}),s("verdocs-quick-filter",{label:"Starred",value:this.starred,options:z,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),s("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:M,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&s("verdocs-spinner",{mode:"dark",size:24}),s("div",{style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var i=t[n];var l=[];var a=[];if(e.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!a.includes(c.WRITE)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!a.includes(c.DELETE)})}}return s("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},s("div",{class:"inner"},s("verdocs-template-star",{template:t,endpoint:e.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},t.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:g,title:"Usage Counter"}),t.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},n==="created_at"&&s("span",{innerHTML:w,title:"Created"}),n==="updated_at"&&s("span",{innerHTML:b,title:"Last Updated"}),n==="last_used_at"&&s("span",{innerHTML:x,title:"Last Used"}),i?h(new Date(i),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),t.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:m})," Public"),!t.is_public&&!t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Private"),!t.is_public&&t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:f})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&s("div",null,d(0,this.rowsPerPage).map((function(){return s("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&s("div",{class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());S.style=u}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,l){function a(e){try{o(s.next(e))}catch(e){l(e)}}function r(e){try{o(s["throw"](e))}catch(e){l(e)}}function o(e){e.done?n(e.value):i(e.value).then(a,r)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},s,i,l,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(t){return o([e,t])}}function o(a){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,i&&(l=a[0]&2?i["return"]:a[0]?i["throw"]||((l=i["return"])&&l.call(i),0):i.next)&&!(l=l.call(i,a[1])).done)return l;if(i=0,l)a=[a[0]&2,l.value];switch(a[0]){case 0:case 1:l=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(l=n.trys,l=l.length>0&&l[l.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!l||a[1]>l[0]&&a[1]<l[3])){n.label=a[1];break}if(a[0]===6&&n.label<l[1]){n.label=l[1];l=a;break}if(l&&n.label<l[2]){n.label=l[2];n.ops.push(a);break}if(l[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{s=l=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-034bd59e.system.js","./p-3bcd86ea.system.js","./p-187b20b7.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,n,s,i,l,a,r,o,c,d,p,h;return{setters:[function(e){t=e.r;n=e.c;s=e.h;i=e.H},function(){},function(e){l=e.V;a=e.l;r=e.d;o=e.c;c=e.a},function(e){d=e.i},function(e){p=e.S},function(e){h=e.f}],execute:function(){var u='verdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var x='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var b='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var y=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var z=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var M=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var S=e("verdocs_templates_list",function(){function e(e){var s=this;t(this,e);this.sdkError=n(this,"sdkError",7);this.viewTemplate=n(this,"viewTemplate",7);this.signNow=n(this,"signNow",7);this.submittedData=n(this,"submittedData",7);this.editTemplate=n(this,"editTemplate",7);this.templateDeleted=n(this,"templateDeleted",7);this.changeSort=n(this,"changeSort",7);this.changeSharing=n(this,"changeSharing",7);this.changeStarred=n(this,"changeStarred",7);this.changeName=n(this,"changeName",7);this.handleOptionSelected=function(e,t){var n,i,l,a;if(e==="send"){(n=s.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:s.endpoint,template:t})}else if(e==="signnow"){(i=s.signNow)===null||i===void 0?void 0:i.emit({endpoint:s.endpoint,template:t})}else if(e==="submitted"){(l=s.submittedData)===null||l===void 0?void 0:l.emit({endpoint:s.endpoint,template:t})}else if(e==="edit"){(a=s.editTemplate)===null||a===void 0?void 0:a.emit({endpoint:s.endpoint,template:t})}else if(e==="delete"){s.confirmDelete=t}};this.endpoint=l.getDefault();this.sharing="all";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter=""}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,l;return __generator(this,(function(r){switch(r.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;r.label=1;case 1:r.trys.push([1,3,,4]);s={page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,a(this.endpoint,s)];case 2:i=r.sent();this.templates=i.templates;this.count=i.total;this.loading=false;return[3,4];case 3:l=r.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",l);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(l.message,(t=l.response)===null||t===void 0?void 0:t.status,(n=l.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;r(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,l;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new p(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(l=n.response)===null||l===void 0?void 0:l.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return s(i,null,s("div",{class:"header"},s("div",{class:"filter"},s("verdocs-text-input",{id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),s("verdocs-quick-filter",{label:"Sharing",value:this.sharing,options:y,onOptionSelected:function(t){var n;e.sharing=t.detail.value;(n=e.changeSharing)===null||n===void 0?void 0:n.emit(e.sharing)}}),s("verdocs-quick-filter",{label:"Starred",value:this.starred,options:z,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),s("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:M,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&s("verdocs-spinner",{mode:"dark",size:24}),s("div",{style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var i=t[n];var l=[];var a=[];if(e.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!a.includes(c.WRITE)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!a.includes(c.DELETE)})}}return s("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},s("div",{class:"inner"},s("verdocs-template-star",{template:t,endpoint:e.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},t.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:g,title:"Usage Counter"}),t.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},n==="created_at"&&s("span",{innerHTML:w,title:"Created"}),n==="updated_at"&&s("span",{innerHTML:b,title:"Last Updated"}),n==="last_used_at"&&s("span",{innerHTML:x,title:"Last Used"}),i?h(new Date(i),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),t.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:m})," Public"),!t.is_public&&!t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Private"),!t.is_public&&t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:f})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&s("div",null,d(0,this.rowsPerPage).map((function(){return s("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&s("div",{class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());S.style=u}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{l(n.next(t))}catch(t){r(t)}}function s(t){try{l(n["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):o(t.value).then(a,s)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-8aae8d16.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-3bcd86ea.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,i,n,o,r,a,s,l;return{setters:[function(t){e=t.r;i=t.c;n=t.h;o=t.H},function(t){r=t.g},function(){},function(t){a=t.V},function(t){s=t.i},function(t){l=t.S}],execute:function(){var c=365*24*60*60;var d=7*24*60*60;var f=24*60*60;var p=60*60;var u=60;var h=function(t){if(t===undefined||t===null){return""}var e;if(typeof t==="string"||typeof t==="number"){e=new Date(t)}else if(typeof t==="object"){e=t}else{return""}var i=Math.floor(((new Date).getTime()-e.getTime())/1e3);if(i>=c){return Math.floor(i/c)+"Y"}if(i>=d){return Math.floor(i/d)+"W"}if(i>=f){return Math.floor(i/f)+"D"}if(i>=p){return Math.floor(i/p)+"H"}if(i>=u){return Math.floor(i/u)+"M"}return"".concat(i,"S")};var x='verdocs-activity-box{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:18px;min-width:300px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#33364b;-ms-flex-align:center;align-items:center;border:1px solid #ccc;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif;background:#ffffff;padding:20px 20px 8px 20px}verdocs-activity-box .box-title{width:100%;display:-ms-flexbox;display:flex;color:#33364b;font-size:20px;font-weight:600;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin:0 0 20px 0;-ms-flex-align:center;align-items:center}verdocs-activity-box .box-title .count{margin:0 0 0 6px;font-weight:300}verdocs-activity-box .box-title verdocs-loader{margin:0 0 20px 0}@media screen and (max-width: 1200px){verdocs-activity-box .box-title{font-size:18px}verdocs-activity-box .box-title .count{display:none}}verdocs-activity-box .spacer{-ms-flex:1;flex:1}verdocs-activity-box .loading-placeholder{width:100%;height:62px;display:block;-ms-flex:0 0 62px;flex:0 0 62px;margin:0 0 10px 0;border-radius:6px;background-color:#f5f8f9}verdocs-activity-box .loading-placeholder .loading-placeholder-bg{height:62px;position:relative;background:#f5f8f9;-webkit-animation-duration:1.25s;animation-duration:1.25s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:loadingPlaceholderSwoop;animation-name:loadingPlaceholderSwoop;background:-webkit-gradient(linear, left top, right top, color-stop(10%, #f5f8f9), color-stop(18%, #eeeeee), color-stop(33%, #f5f8f9));background:linear-gradient(to right, #f5f8f9 10%, #eeeeee 18%, #f5f8f9 33%);background-size:800px 62px}verdocs-activity-box .activity-entry{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 62px;flex:0 0 62px;border-radius:6px;margin-bottom:10px;-ms-flex-direction:row;flex-direction:row;padding:0 16px 0 0;background:#f5f8f9;-ms-flex-align:center;align-items:center;border:1px solid #f5f8f9}verdocs-activity-box .activity-entry:hover{cursor:pointer;background:#f2f4f5;border:1px solid #ddd}verdocs-activity-box .activity-entry svg{width:32px;height:32px;margin-right:20px}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry svg{width:24px;height:24px;margin-right:15px}}verdocs-activity-box .activity-entry .title{-ms-flex:1;flex:1;color:black;font-size:16px;font-weight:500;margin-left:12px}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry .title{font-size:14px}}verdocs-activity-box .activity-entry .time-ago{height:24px;display:-ms-flexbox;display:flex;-ms-flex:0 0 24px;flex:0 0 24px;color:#7f8e92;font-size:16px;font-weight:500;padding-left:14px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-left:1px solid #d8e3e6}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry .time-ago{font-size:14px}}@-webkit-keyframes loadingPlaceholderSwoop{0%{background-position:-468px 0}100%{background-position:468px 0}}@keyframes loadingPlaceholderSwoop{0%{background-position:-468px 0}100%{background-position:468px 0}}';var v="https://verdocs-public-assets.s3.amazonaws.com/no-verdocs.png";var m=t("verdocs_activity_box",function(){function t(t){e(this,t);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.viewAll=i(this,"viewAll",7);this.endpoint=a.getDefault();this.items=5;this.view=undefined;this.header=undefined;this.title="";this.count=0;this.loading=true;this.entries=[]}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(n){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[ACTIVITIES] Must be authenticated");return[2]}this.loadActivity()}catch(n){console.log("[ACTIVITIES] Error with preview session",n);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new l(n.message,(e=n.response)===null||e===void 0?void 0:e.status,(i=n.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};t.prototype.handleItemsUpdated=function(){return this.loadActivity()};t.prototype.handleViewUpdated=function(){return this.loadActivity()};t.prototype.loadActivity=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:this.loading=true;return[4,r(this.endpoint,0)];case 1:t=i.sent();if(this.view==="action"){e="Action Required";this.entries=t.action_required.result;this.count=t.action_required.total}else if(this.view==="waiting"){e="Waiting on Others";this.entries=t.waiting_others.result;this.count=t.waiting_others.total}else if(this.view==="completed"){e="Completed";this.entries=t.completed.result;this.count=t.completed.total}this.title=this.header!==undefined?this.header:e;this.loading=false;return[2]}}))}))};t.prototype.render=function(){var t=this;if(this.loading){return n(o,{style:{minHeight:"300px"}},this.title&&n("div",{class:"box-title"},this.title," ",n("span",{class:"count"},"(0)")),s(0,this.items).map((function(){return n("div",{class:"loading-placeholder"},n("div",{class:"loading-placeholder-bg"}))})))}return n(o,null,this.title&&n("div",{class:"box-title"},this.title," ",n("span",{class:"count"},"(",this.count,")"),n("div",{class:"spacer"}),n("verdocs-button",{label:"View All",size:"small",onClick:function(){var e;return(e=t.viewAll)===null||e===void 0?void 0:e.emit({endpoint:t.endpoint,view:t.view})}})),this.count>0?this.entries.slice(0,Math.max(this.items,1)).map((function(e){return n("div",{class:"activity-entry",onClick:function(){var i;(i=t.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:t.endpoint,entry:e})}},n("div",{class:"title"},e.name,n("br",null)," ",n("strong",null,e.recipient.name)),n("div",{class:"time-ago"},h(e.updated_at)))})):n("img",{src:v,alt:"No documents to show",style:{width:"190px",margin:"0 auto"}}))};Object.defineProperty(t,"watchers",{get:function(){return{items:["handleItemsUpdated"],view:["handleViewUpdated"]}},enumerable:false,configurable:true});return t}());m.style=x}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{l(n.next(t))}catch(t){r(t)}}function s(t){try{l(n["throw"](t))}catch(t){r(t)}}function l(t){t.done?i(t.value):o(t.value).then(a,s)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-8aae8d16.system.js","./p-54498887.system.js","./p-034bd59e.system.js","./p-3bcd86ea.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,i,n,o,r,a,s,l;return{setters:[function(t){e=t.r;i=t.c;n=t.h;o=t.H},function(t){r=t.g},function(){},function(t){a=t.V},function(t){s=t.i},function(t){l=t.S}],execute:function(){var c=365*24*60*60;var d=7*24*60*60;var f=24*60*60;var p=60*60;var u=60;var h=function(t){if(t===undefined||t===null){return""}var e;if(typeof t==="string"||typeof t==="number"){e=new Date(t)}else if(typeof t==="object"){e=t}else{return""}var i=Math.floor(((new Date).getTime()-e.getTime())/1e3);if(i>=c){return Math.floor(i/c)+"Y"}if(i>=d){return Math.floor(i/d)+"W"}if(i>=f){return Math.floor(i/f)+"D"}if(i>=p){return Math.floor(i/p)+"H"}if(i>=u){return Math.floor(i/u)+"M"}return"".concat(i,"S")};var x='verdocs-activity-box{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:18px;min-width:300px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#33364b;-ms-flex-align:center;align-items:center;border:1px solid #ccc;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif;background:#ffffff;padding:20px 20px 8px 20px}verdocs-activity-box .box-title{width:100%;display:-ms-flexbox;display:flex;color:#33364b;font-size:20px;font-weight:600;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin:0 0 20px 0;-ms-flex-align:center;align-items:center}verdocs-activity-box .box-title .count{margin:0 0 0 6px;font-weight:300}verdocs-activity-box .box-title verdocs-loader{margin:0 0 20px 0}@media screen and (max-width: 1200px){verdocs-activity-box .box-title{font-size:18px}verdocs-activity-box .box-title .count{display:none}}verdocs-activity-box .spacer{-ms-flex:1;flex:1}verdocs-activity-box .loading-placeholder{width:100%;height:62px;display:block;-ms-flex:0 0 62px;flex:0 0 62px;margin:0 0 10px 0;border-radius:6px;background-color:#f5f8f9}verdocs-activity-box .loading-placeholder .loading-placeholder-bg{height:62px;position:relative;background:#f5f8f9;-webkit-animation-duration:1.25s;animation-duration:1.25s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:loadingPlaceholderSwoop;animation-name:loadingPlaceholderSwoop;background:-webkit-gradient(linear, left top, right top, color-stop(10%, #f5f8f9), color-stop(18%, #eeeeee), color-stop(33%, #f5f8f9));background:linear-gradient(to right, #f5f8f9 10%, #eeeeee 18%, #f5f8f9 33%);background-size:800px 62px}verdocs-activity-box .activity-entry{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 62px;flex:0 0 62px;border-radius:6px;margin-bottom:10px;-ms-flex-direction:row;flex-direction:row;padding:0 16px 0 0;background:#f5f8f9;-ms-flex-align:center;align-items:center;border:1px solid #f5f8f9}verdocs-activity-box .activity-entry:hover{cursor:pointer;background:#f2f4f5;border:1px solid #ddd}verdocs-activity-box .activity-entry svg{width:32px;height:32px;margin-right:20px}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry svg{width:24px;height:24px;margin-right:15px}}verdocs-activity-box .activity-entry .title{-ms-flex:1;flex:1;color:black;font-size:16px;font-weight:500;margin-left:12px}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry .title{font-size:14px}}verdocs-activity-box .activity-entry .time-ago{height:24px;display:-ms-flexbox;display:flex;-ms-flex:0 0 24px;flex:0 0 24px;color:#7f8e92;font-size:16px;font-weight:500;padding-left:14px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-left:1px solid #d8e3e6}@media screen and (max-width: 1300px){verdocs-activity-box .activity-entry .time-ago{font-size:14px}}@-webkit-keyframes loadingPlaceholderSwoop{0%{background-position:-468px 0}100%{background-position:468px 0}}@keyframes loadingPlaceholderSwoop{0%{background-position:-468px 0}100%{background-position:468px 0}}';var v="https://verdocs-public-assets.s3.amazonaws.com/no-verdocs.png";var m=t("verdocs_activity_box",function(){function t(t){e(this,t);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.viewAll=i(this,"viewAll",7);this.endpoint=a.getDefault();this.items=5;this.view=undefined;this.header=undefined;this.title="";this.count=0;this.loading=true;this.entries=[]}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(n){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[ACTIVITIES] Must be authenticated");return[2]}this.loadActivity()}catch(n){console.log("[ACTIVITIES] Error with preview session",n);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new l(n.message,(e=n.response)===null||e===void 0?void 0:e.status,(i=n.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};t.prototype.handleItemsUpdated=function(){return this.loadActivity()};t.prototype.handleViewUpdated=function(){return this.loadActivity()};t.prototype.loadActivity=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:this.loading=true;return[4,r(this.endpoint,0)];case 1:t=i.sent();if(this.view==="action"){e="Action Required";this.entries=t.action_required.result;this.count=t.action_required.total}else if(this.view==="waiting"){e="Waiting on Others";this.entries=t.waiting_others.result;this.count=t.waiting_others.total}else if(this.view==="completed"){e="Completed";this.entries=t.completed.result;this.count=t.completed.total}this.title=this.header!==undefined?this.header:e;this.loading=false;return[2]}}))}))};t.prototype.render=function(){var t=this;if(this.loading){return n(o,{style:{minHeight:"300px"}},this.title&&n("div",{class:"box-title"},this.title," ",n("span",{class:"count"},"(0)")),s(0,this.items).map((function(){return n("div",{class:"loading-placeholder"},n("div",{class:"loading-placeholder-bg"}))})))}return n(o,null,this.title&&n("div",{class:"box-title"},this.title," ",n("span",{class:"count"},"(",this.count,")"),n("div",{class:"spacer"}),n("verdocs-button",{label:"View All",size:"small",onClick:function(){var e;return(e=t.viewAll)===null||e===void 0?void 0:e.emit({endpoint:t.endpoint,view:t.view})}})),this.count>0?this.entries.slice(0,Math.max(this.items,1)).map((function(e){return n("div",{class:"activity-entry",onClick:function(){var i;(i=t.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:t.endpoint,entry:e})}},n("div",{class:"title"},e.name,n("br",null)," ",n("strong",null,e.recipient.name)),n("div",{class:"time-ago"},h(e.updated_at)))})):n("img",{src:v,alt:"No documents to show",style:{width:"190px",margin:"0 auto"}}))};Object.defineProperty(t,"watchers",{get:function(){return{items:["handleItemsUpdated"],view:["handleViewUpdated"]}},enumerable:false,configurable:true});return t}());m.style=x}}}));
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as e,H as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as s}from"./p-d77962af.js";import{c as a}from"./p-b72328af.js";import"./p-eab67c09.js";import"./p-dc2ad047.js";import"./p-1b4e7078.js";import"./p-c220af42.js";const c=class{constructor(e){t(this,e),this.searchContacts=o(this,"searchContacts",7),this.exit=o(this,"exit",7),this.next=o(this,"next",7),this.endpoint=s.getDefault(),this.templateRole=null,this.contactSuggestions=[],this.name=void 0,this.email=void 0,this.phone=void 0,this.message=void 0,this.showSuggestions=!1,this.showMessage=!1,this.delegator=!1,this.nameFieldId=`verdocs-contact-picker-name-${Math.random().toString(36).substring(2,11)}`,this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`,this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){this.templateRole&&(this.name=this.templateRole.full_name||"",this.email=this.templateRole.email||"",this.phone=this.templateRole.phone||"",this.delegator=this.templateRole.delegator||!1,this.message=this.templateRole.message||"",this.showMessage=""!==this.message)}handleNameChange(t){var o;this.name=t.target.value,null===(o=this.searchContacts)||void 0===o||o.emit({query:this.name})}handleEmailChange(t){this.email=t.target.value}handlePhoneChange(t){this.phone=a(t.target.value)}handleMessageChange(t){this.message=t.target.value}handleCancel(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.exit)||void 0===o||o.emit()}handleSubmit(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.next)||void 0===o||o.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})}handleSelectSuggestion(t,o){t.stopPropagation(),this.name=o.name,this.email=o.email,this.phone=o.phone,this.showSuggestions=!1}render(){return e("form",{onSubmit:t=>t.preventDefault(),onClick:t=>t.stopPropagation(),autocomplete:"off"},e("div",{class:"row"},e("label",{htmlFor:this.nameFieldId},"Name:"),e("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:()=>{var t;return this.showSuggestions=(null===(t=this.contactSuggestions)||void 0===t?void 0:t.length)>0},onInput:t=>this.handleNameChange(t)}),this.showSuggestions&&e("div",{class:"dropdown"},this.contactSuggestions.map((t=>{var o;return e("div",{key:null!==(o=t.id)&&void 0!==o?o:t.name,class:"suggestion",onClick:o=>this.handleSelectSuggestion(o,t)},t.avatar?e("img",{alt:"Avatar",class:"avatar",src:t.avatar}):e("div",{class:"avatar",innerHTML:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>'}),e("div",{class:"details"},e("div",{class:"name"},t.name),t.email&&e("div",{class:"destination"},t.email),t.phone&&e("div",{class:"destination"},t.phone)))})))),e("div",{class:"row"},e("label",{htmlFor:this.emailFieldId},"Email:"),e("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleEmailChange(t)})),e("div",{class:"row"},e("label",{htmlFor:this.phoneFieldId},"Phone:"),e("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handlePhoneChange(t)})),this.showMessage&&e("div",{class:"row"},e("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),e("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleMessageChange(t)})),e("div",{class:"buttons"},e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>',size:"small",active:this.showMessage,onToggle:t=>{this.showMessage=t.detail.active,this.showSuggestions=!1}}),e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>',size:"small",active:this.delegator,onToggle:t=>{this.delegator=t.detail.active,this.showSuggestions=!1}}),e("div",{class:"flex-fill"}),e("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:t=>this.handleCancel(t)}),e("verdocs-button",{label:"OK",size:"small",onClick:t=>this.handleSubmit(t)})))}};c.style='verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .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-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';const n=class{constructor(e){t(this,e),this.toggle=o(this,"toggle",7),this.active=!1,this.icon=null,this.label=null,this.size="normal",this._active=!1}componentWillLoad(){this._active=this.active}handleToggle(t){var o;t.stopPropagation();const e=!this._active;this._active=e,null===(o=this.toggle)||void 0===o||o.emit({active:e})}render(){return e(i,{class:`size-${this.size}`},this.icon?e("button",{innerHTML:this.icon,class:{active:this._active},onClick:t=>this.handleToggle(t)}):e("button",{class:{active:this._active},onClick:t=>this.handleToggle(t)},this.label))}};n.style='verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';export{c as verdocs_contact_picker,n as verdocs_toggle_button}
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-f246348c.system.js","./p-4098a4a2.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-8aae8d16.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-034bd59e.system.js","./p-4098a4a2.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-8aae8d16.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function r(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):o(t.value).then(r,a)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return c([t,e])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(r[0]===6&&n.label<s[1]){n.label=s[1];s=r;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(r);break}if(s[2])n.ops.pop();n.trys.pop();continue}r=e.call(t,n)}catch(t){r=[6,t];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,n,i,o,s,r;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.H},function(){},function(t){s=t.V},function(t){r=t.S}],execute:function(){var a='verdocs-settings{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-settings .tabs{gap:4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #654dcb}verdocs-settings .tabs .tab{cursor:pointer;padding:5px 10px;color:#ffffff;background-color:#777777}verdocs-settings .tabs .tab.active{color:#ffffff;background-color:#654dcb}';var c=t("verdocs_settings",function(){function t(t){e(this,t);this.sdkError=n(this,"sdkError",7);this.endpoint=s.getDefault();this.tab="profile"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Unable to start session, must be authenticated");return[2]}}catch(i){console.log("[SETTINGS] Error with session",i);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new r(i.message,(e=i.response)===null||e===void 0?void 0:e.status,(n=i.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};t.prototype.render=function(){var t=this;console.log("sess",this.endpoint.session);if(!this.endpoint.session){return i(o,null,i("verdocs-loader",null))}return i(o,null,i("div",{class:"tabs"},i("div",{class:"tab ".concat(this.tab==="profile"?"active":""),onClick:function(){return t.tab="profile"}},"Profile"),i("div",{class:"tab ".concat(this.tab==="organization"?"active":""),onClick:function(){return t.tab="organization"}},"Organization"),i("div",{class:"tab ".concat(this.tab==="members"?"active":""),onClick:function(){return t.tab="members"}},"Members"),i("div",{class:"tab ".concat(this.tab==="apikeys"?"active":""),onClick:function(){return t.tab="apikeys"}},"API Keys")),this.tab==="profile"&&i("verdocs-settings-profile",{endpoint:this.endpoint}),this.tab==="organization"&&i("verdocs-settings-organization",{endpoint:this.endpoint}),this.tab==="members"&&i("verdocs-settings-members",{endpoint:this.endpoint}),this.tab==="apikeys"&&i("verdocs-settings-api-keys",{endpoint:this.endpoint}))};return t}());c.style=a}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function r(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i["throw"](t))}catch(t){s(t)}}function c(t){t.done?n(t.value):o(t.value).then(r,a)}c((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return c([t,e])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(r[0]===6&&n.label<s[1]){n.label=s[1];s=r;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(r);break}if(s[2])n.ops.pop();n.trys.pop();continue}r=e.call(t,n)}catch(t){r=[6,t];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-034bd59e.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,n,i,o,s,r;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.H},function(){},function(t){s=t.V},function(t){r=t.S}],execute:function(){var a='verdocs-settings{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-settings .tabs{gap:4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #654dcb}verdocs-settings .tabs .tab{cursor:pointer;padding:5px 10px;color:#ffffff;background-color:#777777}verdocs-settings .tabs .tab.active{color:#ffffff;background-color:#654dcb}';var c=t("verdocs_settings",function(){function t(t){e(this,t);this.sdkError=n(this,"sdkError",7);this.endpoint=s.getDefault();this.tab="profile"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Unable to start session, must be authenticated");return[2]}}catch(i){console.log("[SETTINGS] Error with session",i);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new r(i.message,(e=i.response)===null||e===void 0?void 0:e.status,(n=i.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};t.prototype.render=function(){var t=this;console.log("sess",this.endpoint.session);if(!this.endpoint.session){return i(o,null,i("verdocs-loader",null))}return i(o,null,i("div",{class:"tabs"},i("div",{class:"tab ".concat(this.tab==="profile"?"active":""),onClick:function(){return t.tab="profile"}},"Profile"),i("div",{class:"tab ".concat(this.tab==="organization"?"active":""),onClick:function(){return t.tab="organization"}},"Organization"),i("div",{class:"tab ".concat(this.tab==="members"?"active":""),onClick:function(){return t.tab="members"}},"Members"),i("div",{class:"tab ".concat(this.tab==="apikeys"?"active":""),onClick:function(){return t.tab="apikeys"}},"API Keys")),this.tab==="profile"&&i("verdocs-settings-profile",{endpoint:this.endpoint}),this.tab==="organization"&&i("verdocs-settings-organization",{endpoint:this.endpoint}),this.tab==="members"&&i("verdocs-settings-members",{endpoint:this.endpoint}),this.tab==="apikeys"&&i("verdocs-settings-api-keys",{endpoint:this.endpoint}))};return t}());c.style=a}}}));
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as i,H as s}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as o,b as l,u as a}from"./p-d77962af.js";import{g as n}from"./p-ef20cb50.js";import{g as r,b as d,a as c}from"./p-b086f9be.js";import{g as h}from"./p-cda8b816.js";import{r as p}from"./p-b72328af.js";import{S as m}from"./p-7a1b2643.js";import{j as v}from"./p-dc2ad047.js";import{a as u,i as x}from"./p-e8ce0b6f.js";import{g as f}from"./p-6de76553.js";import{c as b,d as g}from"./p-567a6e7c.js";import{D as y,P as w,J as k,a as S,F as E,b as z,T as C}from"./p-029ae656.js";import{V as T}from"./p-ed416acf.js";import"./p-7648c449.js";import"./p-eab67c09.js";import"./p-1b4e7078.js";import"./p-c220af42.js";const I=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.templateStore=null,this.fieldStore=null,this.roleStore=null,this.endpoint=o.getDefault(),this.templateId=null,this.loading=!0}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[PREVIEW] Unable to start builder session, must be authenticated");h(this.endpoint,this.templateId,!0).then((e=>{var t,i;this.templateStore=e,console.log("[PREVIEW] Loaded Template Store",e.state),this.fieldStore=n(this.templateId),this.roleStore=r(this.templateId),console.log("RS",null===(t=this.roleStore)||void 0===t?void 0:t.state),console.log("FS",null===(i=this.fieldStore)||void 0===i?void 0:i.state),console.log("[PREVIEW] Loaded template",this.templateStore.state,this.roleStore.get("roles"),this.fieldStore.get("fields")),this.loading=!1})).catch((e=>{console.log(e)}))}catch(s){console.log("[PREVIEW] Error with preview session",s),null===(e=this.sdkError)||void 0===e||e.emit(new m(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){var t,i;const s=e.detail,o=null===(i=null===(t=this.templateStore)||void 0===t?void 0:t.state)||void 0===i?void 0:i.fields.filter((e=>e.page_sequence===s.pageNumber));console.log("[PREVIEW] Page rendered",s,o),o.forEach((e=>p(e,s,{disabled:!0,editable:!1,draggable:!1})))}render(){var e,t;if(this.loading)return i(s,null,i("verdocs-loader",null));const o=[...null===(t=null===(e=this.templateStore)||void 0===e?void 0:e.state)||void 0===t?void 0:t.pages];return o.sort(((e,t)=>e.sequence-t.sequence)),i(s,null,o.map((e=>i("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,disabled:!0,editable:!0,done:!1,virtualWidth:612,virtualHeight:792,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}};I.style='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const L='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>',R=class{constructor(i){e(this,i),this.sendingEnvelope=t(this,"sendingEnvelope",7),this.send=t(this,"send",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.searchContacts=t(this,"searchContacts",7),this.levels=[],this.templateStore=null,this.roleStore=null,this.endpoint=o.getDefault(),this.templateId=null,this.environment="web",this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.sending=!1,this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,t,i,s,o,l;try{const s=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.templateStore=await h(this.endpoint,this.templateId,!1),this.roleStore=r(this.templateId),(null===(t=null===(e=this.templateStore)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),this.roleStore.get("roles")){const e={};this.rolesCompleted={},this.roleStore.get("roles").forEach((t=>{const i=t.sequence-1;e[i]||(e[i]=[]);const s=`r-${i}-${e[i].length}`;e[i].push({...t,id:s}),t.full_name&&(t.email||t.phone)&&(this.rolesCompleted[s]={...t,id:s})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,t)=>e-t))}(null===(i=null==s?void 0:s.session)||void 0===i?void 0:i.profile)&&this.sessionContacts.push({id:s.session.profile.id,name:`${s.session.profile.first_name} ${s.session.profile.last_name}`,email:s.session.profile.email,phone:s.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new m(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data))}}getLevelIcon(e){return i("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,t){e.preventDefault(),this.rolesCompleted[t.id]={...t,...e.detail},this.showPickerForId=""}handleClickRole(e,t){e.stopPropagation(),this.showPickerForId=t.id}handleSend(e){var t,i,s;if(this.sending)return void console.log("Skipping duplicate send",e);console.log("Sending",e),e.preventDefault(),e.stopPropagation(),this.sending=!0,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!0});const o={template_id:this.templateId,name:null===(s=null===(i=this.templateStore)||void 0===i?void 0:i.state)||void 0===s?void 0:s.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",o),v(this.endpoint,o).then((e=>{var t,i;console.log("[SEND] Send envelope",e),this.reset().catch((e=>console.log("Unknown Error",e))),this.sending=!1,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!1}),null===(i=this.send)||void 0===i||i.emit({...o,envelope_id:e.id,envelope:e})})).catch((e=>{var t;console.log("Send error",e),this.sending=!1,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!1})}))}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}render(){var e,t;const o=d(this.roleStore),l=Object.values(this.rolesCompleted).filter((e=>u(e.email)||x(e.phone))).length>=o.length;return i(s,{class:{sendable:null===(t=null===(e=this.templateStore)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var t,s,o,l,a,n;const r=`verdocs-send-recipient-${e.name}`;return e.email?i("div",{class:"recipient",style:{borderColor:f(c(this.roleStore,e.name))},onClick:t=>this.handleClickRole(t,e),id:r},null!==(a=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==a?a:e.full_name,i("div",{class:"icon",innerHTML:L}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:r,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(n=this.rolesCompleted[e.id])&&void 0!==n?n:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}}))):i("div",{class:"recipient",style:{backgroundColor:f(c(this.roleStore,e.name))},onClick:t=>this.handleClickRole(t,e),id:r},null!==(s=null===(t=this.rolesCompleted[e.id])||void 0===t?void 0:t.full_name)&&void 0!==s?s:e.name,i("div",{class:"icon",innerHTML:L}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:r,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(o=this.rolesCompleted[e.id])&&void 0!==o?o:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})))}))))),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e),disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!l||this.sending,onClick:e=>this.handleSend(e)}),this.sending&&i("verdocs-spinner",null)))}};R.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const U=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdated=t(this,"templateUpdated",7),this.sdkError=t(this,"sdkError",7),this.endpoint=o.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await h(this.endpoint,this.templateId,!1)}catch(s){console.log("[TEMPLATE ATTACHMENTS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new m(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,s,o;e.stopPropagation();const l=e.detail.file;if(l){console.log("[ATTACHMENTS] Uploading...",l),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await b(this.endpoint,this.templateId,l,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await h(this.endpoint,this.templateId,!1),console.log("[ATTACHMENTS] Updated template",this.store.state),null===(t=this.templateUpdated)||void 0===t||t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"}),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new m(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await g(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await h(this.endpoint,this.templateId,!1),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return S;case"image/jpeg":return k;case"image/png":return w;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return y}return E}render(){var e,t,o;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const l=null===(e=this.store)||void 0===e?void 0:e.state;return l.isLoaded?this.endpoint.session&&l.profile_id?i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.page_numbers),i("div",{class:"pages-icon",innerHTML:z})),i("div",{class:"trash-icon",innerHTML:C,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(o=this.store)||void 0===o?void 0:o.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(s,{class:"empty"}):i(s,{class:"loading"},i("verdocs-loader",null))}};U.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:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const M=["attachments","roles","settings","fields","preview"],N=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.endpoint=o.getDefault(),this.templateId=null,this.step="preview",this.store=null}onStepChanged(){console.log("Step changed",this.step,this.templateId),this.loadTemplate().catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");if(!this.templateId)return void(this.step="preview");this.loadTemplate().catch((e=>console.log("[BUILD_TABS] Unable to load template",e)))}catch(s){console.log("[BUILD_TABS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new m(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}async loadTemplate(){this.templateId&&(this.store=await h(this.endpoint,this.templateId,!1))}setStep(e){var t;console.log("Selected step",e.detail.tab.id),e.stopPropagation(),e.preventDefault(),this.step=e.detail.tab.id,null===(t=this.stepChanged)||void 0===t||t.emit(e.detail.tab.id)}render(){var e,t,o,l,a,n,r,d,c;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));let h=!1,p=!1,m=!1;console.log("[BUILD_TABS] Rendering tabs",this.templateId,this.step),this.templateId&&this.store&&this.store.state&&(m=(null===(o=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.template_documents)||void 0===o?void 0:o.length)>0,p=m&&(null===(n=null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.roles)||void 0===n?void 0:n.length)>0,h=p&&(null===(c=null===(d=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===d?void 0:d.fields)||void 0===c?void 0:c.length)>0);let v=Math.max(M.indexOf(this.step),0);return!h&&v>=4&&(v=3),!p&&v>=3&&(v=1),!m&&v>=1&&(v=0),console.log({selectedStepIndex:v,canPreview:h,canEditFields:p,canEditRoles:m}),i(s,null,i("verdocs-tabs",{onSelectTab:e=>this.setStep(e),selectedTab:v,tabs:[{id:"attachments",disabled:!1,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!m,label:"Roles"},{id:"settings",disabled:!p,label:"Settings"},{id:"fields",disabled:!p,label:"Fields"},{id:"preview",disabled:!h,label:"Preview/Send"}]}))}static get watchers(){return{step:["onStepChanged"]}}};N.style='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';const A=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.templateCreated=t(this,"templateCreated",7),this.endpoint=o.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,i,s;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await l(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),h(this.endpoint,e.id,!0).then((()=>{var t,i;null===(t=this.templateCreated)||void 0===t||t.emit({endpoint:this.endpoint,template:e,templateId:e.id}),null===(i=this.next)||void 0===i||i.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0})).catch((e=>{console.log(e)}))}catch(e){console.log("[CREATE] Error creating template",e),null===(t=this.sdkError)||void 0===t||t.emit(new m(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.creating=!1}}}render(){return i(s,null,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)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:e=>{e.preventDefault(),e.target.classList.remove("drag-over"),this.file=e.dataTransfer.files[0]},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDragEnter:e=>e.target.classList.add("drag-over"),onDragLeave:e=>e.target.classList.remove("drag-over")},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",overflowWrap:"anywhere"}},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),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};A.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const D=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.name="",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await h(this.endpoint,this.templateId,!1),this.name=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.name,this.dirty=!1}catch(e){console.log("[TEMPLATE NAME] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new m(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,console.log("Closing"),null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{name:this.name}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.name=this.name),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoading)?i(s,{class:"loading"},i("verdocs-loader",null)):i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{var t,i;this.name=e.target.value,this.dirty=this.name!==(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name)}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};D.style="";const j=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await h(this.endpoint,this.templateId,!1),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new m(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,o,l,a,n,r,d,c,p,v;e.stopPropagation();try{if(this.sendReminders){const e={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?(await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e),this.store=await h(this.endpoint,this.templateId,!1)):(await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e),this.store=await h(this.endpoint,this.templateId,!1))}else await(c=this.endpoint,p=this.templateId,v=null===(o=this.store)||void 0===o?void 0:o.state.reminder_id,c.api.delete("/templates/".concat(p,"/reminder/").concat(v)).then((function(e){return e.data}))),this.store=await h(this.endpoint,this.templateId,!1);null===(l=this.templateUpdated)||void 0===l||l.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"})}catch(e){console.log("[TEMPLATE REMINDERS] Unable to update reminders",e),T(e.message),null===(a=this.sdkError)||void 0===a||a.emit(new m(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(r=e.response)||void 0===r?void 0:r.data))}this.dirty=!1,null===(d=this.close)||void 0===d||d.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.sendReminders=e.target.checked,this.dirty=!0}})),i("p",null,i("strong",null,"NOTE:")," Reminders will only be sent for up to 14 days."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>{this.firstReminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>{this.reminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};j.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .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-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';const H=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.dirty=!1,this.personal=!1,this.public=!1}async componentWillLoad(){var e,t,i,s,o,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[VISIBILITY] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[VISIBILITY] Unable to start builder session, must be authenticated");this.store=await h(this.endpoint,this.templateId,!1),this.personal=(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_personal)||!0,this.public=(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.is_public)||!1,this.dirty=!1}catch(e){console.log("[TEMPLATE VISIBILITY] Error loading template",e),null===(o=this.sdkError)||void 0===o||o.emit(new m(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}handleCancel(e){var t,i,s,o,l;e.stopPropagation(),this.personal=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.is_personal,this.public=null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.is_public,this.dirty=!1,null===(l=this.close)||void 0===l||l.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await a(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.is_personal=this.personal,this.store.state.is_public=this.public),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:e=>{this.personal=!e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:e=>{this.public=e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};H.style='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';export{I as verdocs_preview,R as verdocs_send,U as verdocs_template_attachments,N as verdocs_template_build_tabs,A as verdocs_template_create,D as verdocs_template_name,j as verdocs_template_reminders,H as verdocs_template_visibility}
@@ -1 +1 @@
1
- import{c as e}from"./p-7648c449.js";import{g as o,T as t}from"./p-e04d8f5d.js";import{c as r,g as a}from"./p-b086f9be.js";import{c as s,g as i}from"./p-ef20cb50.js";const n={},d=async(d,c,l=!1)=>{let p=!1;n[c]||(console.debug("[TEMPLATES] No template store found for ID, creating",c),n[c]=(o=>{const r=(new Date).toISOString();return e({isLoading:!0,isLoaded:!1,isError:!1,error:null,roleNames:[],id:o,name:"",description:"",sender:t.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:!1,is_personal:!0,is_public:!1,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:void 0,processed:!1,organization:void 0,roles:[],pages:[],template_document:void 0,template_documents:[]})})(c),p=!0);const m=n[c];if(p||l){console.debug("[TEMPLATES] Loading template",{templateId:c,created:p,forceReload:l}),m.state.isLoading=!0,m.state.isLoaded=!1,m.state.isError=!1,m.state.error=void 0;try{const e=await o(d,c);console.debug("[TEMPLATES] Got template",e),Object.assign(m.state,e),m.state.isLoaded=!0,m.state.isError=!1,m.state.error=void 0,r(e),s(e)}catch(e){throw console.error("[TEMPLATES] Error loading template",e),m.state.isLoaded=!1,m.state.isError=!0,m.state.error=e,e}m.state.isLoading=!1}else a(c),i(c);return m};export{d as g}
1
+ import{c as e}from"./p-7648c449.js";import{g as o,T as t}from"./p-d77962af.js";import{c as r,g as a}from"./p-b086f9be.js";import{c as s,g as i}from"./p-ef20cb50.js";const n={},d=async(d,c,l=!1)=>{let p=!1;n[c]||(console.debug("[TEMPLATES] No template store found for ID, creating",c),n[c]=(o=>{const r=(new Date).toISOString();return e({isLoading:!0,isLoaded:!1,isError:!1,error:null,roleNames:[],id:o,name:"",description:"",sender:t.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:!1,is_personal:!0,is_public:!1,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:void 0,processed:!1,organization:void 0,roles:[],pages:[],template_document:void 0,template_documents:[]})})(c),p=!0);const m=n[c];if(p||l){console.debug("[TEMPLATES] Loading template",{templateId:c,created:p,forceReload:l}),m.state.isLoading=!0,m.state.isLoaded=!1,m.state.isError=!1,m.state.error=void 0;try{const e=await o(d,c);console.debug("[TEMPLATES] Got template",e),Object.assign(m.state,e),m.state.isLoaded=!0,m.state.isError=!1,m.state.error=void 0,r(e),s(e)}catch(e){throw console.error("[TEMPLATES] Error loading template",e),m.state.isLoaded=!1,m.state.isError=!0,m.state.error=e,e}m.state.isLoading=!1}else a(c),i(c);return m};export{d as g}
@@ -1 +1 @@
1
- import{r as t,h as s,H as e}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-e04d8f5d.js";import{g as o}from"./p-45ecd6eb.js";import"./p-7648c449.js";import"./p-b086f9be.js";import"./p-ef20cb50.js";const l=class{constructor(s){t(this,s),this.store=null,this.endpoint=i.getDefault(),this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}async componentWillLoad(){try{this.endpoint.loadSession(),this.store=await o(this.endpoint,this.templateId,!1)}catch(t){console.log("[TEMPLATE VISIBILITY] Error loading template",t)}}render(){return console.log("[IPC] Rendering"),s(e,null,s("div",null,s("pre",null,s("code",null,JSON.stringify(this.store.state,null,2)))),s("verdocs-template-roles",{templateId:this.templateId}),s("verdocs-template-fields",{templateId:this.templateId}))}};l.style="ipc-test{max-width:800px;display:block}";export{l as ipc_test}
1
+ import{r as t,h as s,H as e}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-d77962af.js";import{g as o}from"./p-cda8b816.js";import"./p-7648c449.js";import"./p-b086f9be.js";import"./p-ef20cb50.js";const l=class{constructor(s){t(this,s),this.store=null,this.endpoint=i.getDefault(),this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}async componentWillLoad(){try{this.endpoint.loadSession(),this.store=await o(this.endpoint,this.templateId,!1)}catch(t){console.log("[TEMPLATE VISIBILITY] Error loading template",t)}}render(){return console.log("[IPC] Rendering"),s(e,null,s("div",null,s("pre",null,s("code",null,JSON.stringify(this.store.state,null,2)))),s("verdocs-template-roles",{templateId:this.templateId}),s("verdocs-template-fields",{templateId:this.templateId}))}};l.style="ipc-test{max-width:800px;display:block}";export{l as ipc_test}