@verdocs/web-sdk 2.3.70 → 2.3.72

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 (144) hide show
  1. package/dist/cjs/{TemplateStore-89072ea0.js → TemplateStore-ae59084b.js} +1 -1
  2. package/dist/cjs/{VerdocsEndpoint-8f298664.js → VerdocsEndpoint-f4ef9333.js} +5 -2
  3. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  8. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +6 -1
  15. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
  17. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +3 -3
  23. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  27. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +5 -4
  28. package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +4 -0
  29. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
  30. package/dist/components/VerdocsEndpoint.js +5 -2
  31. package/dist/components/verdocs-field-textbox2.js +5 -4
  32. package/dist/components/verdocs-template-document-page2.js +4 -0
  33. package/dist/components/verdocs-template-fields2.js +1 -1
  34. package/dist/custom-elements.json +2143 -0
  35. package/dist/docs.json +5 -5
  36. package/dist/esm/{TemplateStore-7fba801e.js → TemplateStore-99bf97f0.js} +1 -1
  37. package/dist/esm/{VerdocsEndpoint-56fa3371.js → VerdocsEndpoint-eab308f6.js} +5 -2
  38. package/dist/esm/ipc-test.entry.js +2 -2
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  41. package/dist/esm/verdocs-auth.entry.js +1 -1
  42. package/dist/esm/verdocs-build.entry.js +2 -2
  43. package/dist/esm/verdocs-checkbox_5.entry.js +2 -2
  44. package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
  45. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  46. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  47. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  48. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  49. package/dist/esm/verdocs-field-attachment_15.entry.js +6 -1
  50. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  51. package/dist/esm/verdocs-preview_8.entry.js +2 -2
  52. package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
  53. package/dist/esm/verdocs-search.entry.js +1 -1
  54. package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
  55. package/dist/esm/verdocs-settings.entry.js +1 -1
  56. package/dist/esm/verdocs-sign.entry.js +1 -1
  57. package/dist/esm/verdocs-template-fields_4.entry.js +3 -3
  58. package/dist/esm/verdocs-template-star.entry.js +1 -1
  59. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  60. package/dist/esm/verdocs-view.entry.js +1 -1
  61. package/dist/esm/verdocs-web-sdk.js +1 -1
  62. package/dist/esm-es5/{TemplateStore-7fba801e.js → TemplateStore-99bf97f0.js} +1 -1
  63. package/dist/esm-es5/VerdocsEndpoint-eab308f6.js +1 -0
  64. package/dist/esm-es5/ipc-test.entry.js +1 -1
  65. package/dist/esm-es5/loader.js +1 -1
  66. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  69. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  70. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  71. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  72. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  73. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  74. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  75. package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -1
  76. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  77. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  78. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
  79. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  88. package/dist/types/components/templates/verdocs-template-document-page/verdocs-template-document-page.d.ts +1 -0
  89. package/dist/verdocs-web-sdk/{p-cf703fe4.entry.js → p-06618569.entry.js} +1 -1
  90. package/dist/verdocs-web-sdk/{p-d7f90328.system.entry.js → p-0b0cc39b.system.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-ea80fcea.entry.js → p-0e4f5403.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/p-10310263.system.entry.js +1 -0
  93. package/dist/verdocs-web-sdk/{p-db5de7e8.entry.js → p-159aeaf2.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-80e69a68.entry.js → p-2d47c6af.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/{p-9fc06f7b.entry.js → p-332141f2.entry.js} +1 -1
  96. package/dist/verdocs-web-sdk/{p-d1092a62.system.entry.js → p-356e4c15.system.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-f2a169d8.entry.js → p-38ea0d20.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-26646a40.entry.js → p-3fa35da3.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-9d4a5fd8.entry.js → p-40f5b1c5.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/{p-47c63cc7.js → p-45ecd6eb.js} +1 -1
  101. package/dist/verdocs-web-sdk/{p-116f7900.entry.js → p-501d9168.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-0abf0058.system.entry.js → p-58e85310.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-9054234f.entry.js → p-5ddc43f4.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-4861684b.entry.js → p-6a93295c.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/{p-17598002.system.entry.js → p-7519fe6e.system.entry.js} +1 -1
  106. package/dist/verdocs-web-sdk/{p-17bf98f2.system.entry.js → p-77c145b3.system.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-b6231fd3.system.entry.js → p-7b3dfc4b.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-4d98f194.system.entry.js → p-7e5a1766.system.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-508808d2.entry.js → p-84679597.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-d0a09719.entry.js → p-8a7324b6.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-997a4959.entry.js → p-90539070.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-151c33dd.system.entry.js → p-9a816526.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-77d3c570.entry.js → p-9d748d04.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-e13b21ca.system.entry.js → p-a50982c8.system.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-c80237f9.entry.js → p-a7907ccf.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-9ceff040.system.entry.js → p-a9b80271.system.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-8b0a5309.entry.js → p-ac042888.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/{p-035a3ce2.entry.js → p-ac07d476.entry.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-5050f8a2.system.entry.js → p-b0e0084b.system.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/p-b252cfb6.entry.js +1 -0
  121. package/dist/verdocs-web-sdk/{p-637187de.entry.js → p-b8063124.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/{p-72f22ee9.system.entry.js → p-baf16d17.system.entry.js} +1 -1
  123. package/dist/verdocs-web-sdk/{p-a16eba51.system.entry.js → p-bea26fb0.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-00e8cfa6.system.entry.js → p-bf8e6ba1.system.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-c118d024.system.entry.js → p-c5fd0435.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-d39e4a26.system.entry.js → p-c73e78c8.system.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-cff87d52.system.js → p-d0d9ac6d.system.js} +1 -1
  128. package/dist/verdocs-web-sdk/{p-ea96b41e.entry.js → p-d315d7ca.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-bb2ff79c.entry.js → p-d53aec0f.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/p-e04d8f5d.js +1 -0
  131. package/dist/verdocs-web-sdk/{p-e311d75f.system.entry.js → p-e0e99a5d.system.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-6384f444.system.entry.js → p-e3623a0c.system.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/{p-d0bbe952.system.entry.js → p-e4b14b93.system.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  135. package/dist/verdocs-web-sdk/{p-04ac4336.system.entry.js → p-f0dfd635.system.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/p-f246348c.system.js +1 -0
  137. package/dist/verdocs-web-sdk/{p-3995b09b.system.entry.js → p-f3947f39.system.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  139. package/package.json +3 -3
  140. package/dist/esm-es5/VerdocsEndpoint-56fa3371.js +0 -1
  141. package/dist/verdocs-web-sdk/p-035f6b38.js +0 -1
  142. package/dist/verdocs-web-sdk/p-358ce165.system.entry.js +0 -1
  143. package/dist/verdocs-web-sdk/p-3efa7c26.entry.js +0 -1
  144. package/dist/verdocs-web-sdk/p-9bf2d124.system.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{a(i.next(e))}catch(e){r(e)}}function l(e){try{a(i["throw"](e))}catch(e){r(e)}}function a(e){e.done?n(e.value):o(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,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(t){return a([e,t])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{i=r=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-9bf2d124.system.js","./p-cff87d52.system.js","./p-187b20b7.system.js","./p-3af6b910.system.js","./p-8324a7a3.system.js","./p-95080569.system.js"],(function(e){"use strict";var t,n,i,o,r,s,l,a;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.H;r=e.a},function(){},function(e){s=e.V},function(e){l=e.g},function(e){a=e.S},function(){},function(){},function(){}],execute:function(){var d='verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-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}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px #0000007f;box-shadow:1px 1px 6px -2px #0000007f}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';var p=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.send=n(this,"send",7);this.templateUpdated=n(this,"templateUpdated",7);this.templateCreated=n(this,"templateCreated",7);this.rolesUpdated=n(this,"rolesUpdated",7);this.endpoint=s.getDefault();this.templateId=null;this.step="preview";this.store=null}e.prototype.onTemplateIdChanged=function(e){console.log("Template ID changed",e);this.loadTemplate(e).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.onStepChanged=function(e){console.log("Step changed",e);this.loadTemplate(this.templateId).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.templateId){console.log("[BUILD] No template ID, activating upload mode");this.step="attachments";return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}this.loadTemplate(this.templateId).catch((function(e){return console.log("[BUILD] Unable to load template",e)}))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.loadTemplate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:if(!e)return[3,2];console.log("Loading store",e);t=this;return[4,l(this.endpoint,e,false)];case 1:t.store=n.sent();n.label=2;case 2:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step="preview"};e.prototype.handleTemplateCreated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.loadTemplate(e)];case 1:n.sent();this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles");return[2]}}))}))};e.prototype.handleRolesUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleTemplateUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.handleStepChanged=function(e){var t;console.log("osc",e);this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.store){console.log("[BUILD] No template ID, rendering created view");return i(o,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:"attachments",onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),i("verdocs-template-create",{endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleAttachmentsNext()},onTemplateCreated:function(t){return e.handleTemplateCreated(t.detail.templateId)}})))}console.log("[BUILD] Rendering build view",this.templateId,this.step,["attachments","roles","settings","fields","preview"].indexOf(this.step));return i(o,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),this.step==="attachments"&&i("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleAttachmentsNext()},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="roles"&&i("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleRolesNext()},onRolesUpdated:function(t){return e.handleRolesUpdated(t)}}),this.step==="settings"&&i("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},i("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}})),this.step==="fields"&&i("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="preview"&&i("div",{class:"preview-container"},i("div",{class:"preview-send-wrapper"},i("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:function(t){var n;return(n=e.send)===null||n===void 0?void 0:n.emit(t.detail)},style:{width:"100%"}})),i("div",{class:"preview-preview-wrapper"},i("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());p.style=d}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function s(e){try{a(i.next(e))}catch(e){r(e)}}function l(e){try{a(i["throw"](e))}catch(e){r(e)}}function a(e){e.done?n(e.value):o(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,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(t){return a([e,t])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{i=r=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-f246348c.system.js","./p-d0d9ac6d.system.js","./p-187b20b7.system.js","./p-3af6b910.system.js","./p-8324a7a3.system.js","./p-95080569.system.js"],(function(e){"use strict";var t,n,i,o,r,s,l,a;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.H;r=e.a},function(){},function(e){s=e.V},function(e){l=e.g},function(e){a=e.S},function(){},function(){},function(){}],execute:function(){var d='verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-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}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px #0000007f;box-shadow:1px 1px 6px -2px #0000007f}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';var p=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.send=n(this,"send",7);this.templateUpdated=n(this,"templateUpdated",7);this.templateCreated=n(this,"templateCreated",7);this.rolesUpdated=n(this,"rolesUpdated",7);this.endpoint=s.getDefault();this.templateId=null;this.step="preview";this.store=null}e.prototype.onTemplateIdChanged=function(e){console.log("Template ID changed",e);this.loadTemplate(e).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.onStepChanged=function(e){console.log("Step changed",e);this.loadTemplate(this.templateId).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.templateId){console.log("[BUILD] No template ID, activating upload mode");this.step="attachments";return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}this.loadTemplate(this.templateId).catch((function(e){return console.log("[BUILD] Unable to load template",e)}))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.loadTemplate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:if(!e)return[3,2];console.log("Loading store",e);t=this;return[4,l(this.endpoint,e,false)];case 1:t.store=n.sent();n.label=2;case 2:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step="preview"};e.prototype.handleTemplateCreated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.loadTemplate(e)];case 1:n.sent();this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles");return[2]}}))}))};e.prototype.handleRolesUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleTemplateUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.handleStepChanged=function(e){var t;console.log("osc",e);this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.store){console.log("[BUILD] No template ID, rendering created view");return i(o,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:"attachments",onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),i("verdocs-template-create",{endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleAttachmentsNext()},onTemplateCreated:function(t){return e.handleTemplateCreated(t.detail.templateId)}})))}console.log("[BUILD] Rendering build view",this.templateId,this.step,["attachments","roles","settings","fields","preview"].indexOf(this.step));return i(o,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),this.step==="attachments"&&i("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleAttachmentsNext()},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="roles"&&i("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(t){return e.handleCancel(t)},onNext:function(){return e.handleRolesNext()},onRolesUpdated:function(t){return e.handleRolesUpdated(t)}}),this.step==="settings"&&i("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},i("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}})),this.step==="fields"&&i("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="preview"&&i("div",{class:"preview-container"},i("div",{class:"preview-send-wrapper"},i("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:function(t){var n;return(n=e.send)===null||n===void 0?void 0:n.emit(t.detail)},style:{width:"100%"}})),i("div",{class:"preview-preview-wrapper"},i("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());p.style=d}}}));
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function l(e){try{r(i.next(e))}catch(e){o(e)}}function a(e){try{r(i["throw"](e))}catch(e){o(e)}}function r(e){e.done?n(e.value):s(e.value).then(l,a)}r((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(t){return r([e,t])}}function r(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(o=l[0]&2?s["return"]:l[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,l[1])).done)return o;if(s=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;s=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];s=0}finally{i=o=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,n){if(n||arguments.length===2)for(var i=0,s=t.length,o;i<s;i++){if(o||!(i in t)){if(!o)o=Array.prototype.slice.call(t,0,i);o[i]=t[i]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-8aae8d16.system.js","./p-1d60151a.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-3bcd86ea.system.js","./p-cacffa79.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-bbee73c8.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,n,i,s,o,l,a,r,c,d,p,u,v,h;return{setters:[function(e){t=e.r;n=e.c;i=e.h;s=e.H},function(e){o=e.l;l=e.c},function(e){a=e.g;r=e.a;c=e.b},function(){},function(e){d=e.V},function(e){p=e.i},function(e){u=e.s},function(e){v=e.V},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var f='verdocs-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var x=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var w=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var y=e("verdocs_envelopes_list",function(){function e(e){t(this,e);this.changeView=n(this,"changeView",7);this.changeStatus=n(this,"changeStatus",7);this.changeSort=n(this,"changeSort",7);this.changeMatch=n(this,"changeMatch",7);this.sdkError=n(this,"sdkError",7);this.viewEnvelope=n(this,"viewEnvelope",7);this.finishEnvelope=n(this,"finishEnvelope",7);this.endpoint=d.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[ENVELOPES] 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.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,s,l;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.loading=true;i={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":i=__assign({},i);break;case"sent":i=__assign(__assign({},i),{is_owner:true});break;case"action":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"waiting":i=__assign(__assign({},i),{is_owner:true,status:["pending","in progress"]});break;case"completed":i=__assign(__assign({},i),{status:["complete"]});break;default:i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){i.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,i)];case 1:s=a.sent();this.envelopes=s.envelopes;this.count=s.total;this.loading=false;return[3,3];case 2:l=a.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",l);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(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,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;u(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){u(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return i(s,null,i("div",{class:"header"},i("div",{class:"filter"},i("verdocs-text-input",{id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(t){var n;e.match=t.target.value.trim();(n=e.changeMatch)===null||n===void 0?void 0:n.emit(e.match)}})),i("verdocs-quick-filter",{label:"View",value:this.view,options:m,onOptionSelected:function(t){e.view=t.detail.value}}),this.view==="all"&&i("verdocs-quick-filter",{label:"Status",value:this.status,options:x,onOptionSelected:function(t){e.status=t.detail.value}}),this.view==="all"&&i("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:w,onOptionSelected:function(t){e.sort=t.detail.value}}),this.loading&&i("verdocs-spinner",{mode:"dark",size:24}),i("div",{style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&i("verdocs-button",{label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(t){var n;var s=a(t);var o=c(e.endpoint.session,t);var d=s.find((function(t){var n;return t.email===((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||""}));var p=d&&o&&r(((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||"",s);var u=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!p},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!o}];return i("div",{class:"envelope",key:t.id,onClick:function(){var n;return(n=e.viewEnvelope)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,envelope:t})}},i("div",{class:"inner"},i("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===t.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(n){if(n.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[t],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==t.id}))}}}),i("div",{class:"vert-spacer"}),i("span",{innerHTML:g,class:"envelope-icon"}),i("div",{class:"envelope-name"},t.name,":  ",i("div",{class:"envelope-recipients"},t.recipients.map((function(e){return e.full_name})).join(", "))),i("div",{class:"vert-spacer"}),i("verdocs-status-indicator",{envelope:t,style:{width:"125px"}}),i("div",{class:"vert-spacer"}),i("div",{class:"last-modified"},new Date(t.updated_at).toLocaleString()),i("div",{class:"vert-spacer"}),i("verdocs-dropdown",{options:u,onOptionSelected:function(n){var i,s;switch(n.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:t});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:t});break;case"download":e.downloadEnvelope(t);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){l(e.endpoint,t.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&i("div",{style:{width:"100%"}},p(0,this.rowsPerPage).map((function(){return i("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&i("div",{class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?i("div",{style:{marginTop:"20px"}},i("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):i("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());y.style=f}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function l(e){try{r(i.next(e))}catch(e){o(e)}}function a(e){try{r(i["throw"](e))}catch(e){o(e)}}function r(e){e.done?n(e.value):s(e.value).then(l,a)}r((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,l;return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(e){return function(t){return r([e,t])}}function r(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(o=l[0]&2?s["return"]:l[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,l[1])).done)return o;if(s=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;s=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];s=0}finally{i=o=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,n){if(n||arguments.length===2)for(var i=0,s=t.length,o;i<s;i++){if(o||!(i in t)){if(!o)o=Array.prototype.slice.call(t,0,i);o[i]=t[i]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-8aae8d16.system.js","./p-1d60151a.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-3bcd86ea.system.js","./p-cacffa79.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-bbee73c8.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,n,i,s,o,l,a,r,c,d,p,u,v,h;return{setters:[function(e){t=e.r;n=e.c;i=e.h;s=e.H},function(e){o=e.l;l=e.c},function(e){a=e.g;r=e.a;c=e.b},function(){},function(e){d=e.V},function(e){p=e.i},function(e){u=e.s},function(e){v=e.V},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var f='verdocs-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var x=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var w=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var y=e("verdocs_envelopes_list",function(){function e(e){t(this,e);this.changeView=n(this,"changeView",7);this.changeStatus=n(this,"changeStatus",7);this.changeSort=n(this,"changeSort",7);this.changeMatch=n(this,"changeMatch",7);this.sdkError=n(this,"sdkError",7);this.viewEnvelope=n(this,"viewEnvelope",7);this.finishEnvelope=n(this,"finishEnvelope",7);this.endpoint=d.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[ENVELOPES] 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.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,s,l;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.loading=true;i={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":i=__assign({},i);break;case"sent":i=__assign(__assign({},i),{is_owner:true});break;case"action":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"waiting":i=__assign(__assign({},i),{is_owner:true,status:["pending","in progress"]});break;case"completed":i=__assign(__assign({},i),{status:["complete"]});break;default:i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){i.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,i)];case 1:s=a.sent();this.envelopes=s.envelopes;this.count=s.total;this.loading=false;return[3,3];case 2:l=a.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",l);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(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,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;u(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){u(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return i(s,null,i("div",{class:"header"},i("div",{class:"filter"},i("verdocs-text-input",{id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(t){var n;e.match=t.target.value.trim();(n=e.changeMatch)===null||n===void 0?void 0:n.emit(e.match)}})),i("verdocs-quick-filter",{label:"View",value:this.view,options:m,onOptionSelected:function(t){e.view=t.detail.value}}),this.view==="all"&&i("verdocs-quick-filter",{label:"Status",value:this.status,options:x,onOptionSelected:function(t){e.status=t.detail.value}}),this.view==="all"&&i("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:w,onOptionSelected:function(t){e.sort=t.detail.value}}),this.loading&&i("verdocs-spinner",{mode:"dark",size:24}),i("div",{style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&i("verdocs-button",{label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(t){var n;var s=a(t);var o=c(e.endpoint.session,t);var d=s.find((function(t){var n;return t.email===((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||""}));var p=d&&o&&r(((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||"",s);var u=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!p},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!o}];return i("div",{class:"envelope",key:t.id,onClick:function(){var n;return(n=e.viewEnvelope)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,envelope:t})}},i("div",{class:"inner"},i("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===t.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(n){if(n.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[t],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==t.id}))}}}),i("div",{class:"vert-spacer"}),i("span",{innerHTML:g,class:"envelope-icon"}),i("div",{class:"envelope-name"},t.name,":  ",i("div",{class:"envelope-recipients"},t.recipients.map((function(e){return e.full_name})).join(", "))),i("div",{class:"vert-spacer"}),i("verdocs-status-indicator",{envelope:t,style:{width:"125px"}}),i("div",{class:"vert-spacer"}),i("div",{class:"last-modified"},new Date(t.updated_at).toLocaleString()),i("div",{class:"vert-spacer"}),i("verdocs-dropdown",{options:u,onOptionSelected:function(n){var i,s;switch(n.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:t});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:t});break;case"download":e.downloadEnvelope(t);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){l(e.endpoint,t.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&i("div",{style:{width:"100%"}},p(0,this.rowsPerPage).map((function(){return i("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&i("div",{class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?i("div",{style:{marginTop:"20px"}},i("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):i("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());y.style=f}}}));
@@ -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-9bf2d124.system.js","./p-b1288daf.system.js","./p-95080569.system.js","./p-8324a7a3.system.js","./p-cff87d52.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-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 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function r(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):s(e.value).then(a,r)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,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 l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=o=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-1d60151a.system.js","./p-eaf0b189.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-4098a4a2.system.js","./p-d8cd6b59.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-dc9c4361.system.js","./p-3af6b910.system.js"],(function(e){"use strict";var t,i,n,s,o,a,r,l,c,d,v,p,h;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){o=e.c},function(e){a=e.u},function(e){r=e.r},function(){},function(e){l=e.V},function(e){c=e.g},function(e){d=e.F},function(e){v=e.V},function(e){p=e.S},function(e){h=e.f},function(){}],execute:function(){var u='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-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.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="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-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var b=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.toggle=i(this,"toggle",7);this.another=i(this,"another",7);this.store=null;this.endpoint=l.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showManageDialog=false;this.showRecipientDialog="";this.showCancelDialog=false;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}n=this;return[4,c(this.endpoint,this.envelopeId,true)];case 1:n.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:s=o.sent();console.log("[SIDEBAR] Error loading envelope",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(i=s.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.recipients.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.setTab=function(e){var t;this.panelOpen=e!==this.activeTab||!this.panelOpen;(t=this.toggle)===null||t===void 0?void 0:t.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var t,i;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.status)};e.prototype.handleRecipientAction=function(e,t){var i,n;console.log("[SIDEBAR] Recipient action",t,e);switch(t){case"reminder":r(this.endpoint,this.envelopeId,e.role_name).then((function(){v("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);v("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":v("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":v("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:(n=this.store)===null||n===void 0?void 0:n.state,event:t})};e.prototype.cancelEnvelope=function(){var e=this;this.loading=true;o(this.endpoint,this.envelopeId).then((function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIDEBAR] Envelope canceled",t);v("Envelope canceled",{style:"success"});n=this;return[4,c(this.endpoint,this.envelopeId,true)];case 1:n.store=s.sent();this.sortEnvelopeRecipients();this.loading=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:(i=this.store)===null||i===void 0?void 0:i.state,event:"canceled"});return[2]}}))}))})).catch((function(t){console.log("[SIDEBAR] Error canceling envelope",t);e.loading=false;v("Error canceling envelope: "+t.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var t,i,n,s,o,a,r,l,c,d,v,p;var h=[];var u=((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.histories)||[];h.push({icon:"pencil",message:"Envelope created.",date:new Date((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.created_at)});if(((a=(o=this.store)===null||o===void 0?void 0:o.state)===null||a===void 0?void 0:a.status)==="complete"){h.push({icon:"pencil",message:"Envelope completed.",date:new Date((l=(r=this.store)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.updated_at)})}var f=u.some((function(e){return e.event==="owner:canceled"}));if(((d=(c=this.store)===null||c===void 0?void 0:c.state)===null||d===void 0?void 0:d.status)==="canceled"&&!f){h.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.canceled_at)})}u.forEach((function(t){var i;var n=(i=e.store.state)===null||i===void 0?void 0:i.recipients.find((function(e){return e.role_name===t.role_name}));var s=(n===null||n===void 0?void 0:n.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":h.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:declined":h.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":h.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(t.created_at)});break;case"sms":h.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":h.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":h.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(t.created_at)});break;default:h.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":h.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(t.created_at)});break;default:h.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":h.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){h.push({icon:"account_circle",message:"".concat(s," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){h.push({icon:"verified_user",message:"".concat(s," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":h.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){h.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(t.created_at)})}else{h.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":h.push({icon:"mail",message:"Invitation was resent to ".concat(s," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":h.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:delegated":h.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":h.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":h.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":h.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":h.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":h.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":h.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(t.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",t);break}}));h.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return h};e.prototype.render=function(){var e=this;var t,i,o,r,l,c,v,p,u,b,x,y,_,k,z,D,M,E,V,B,S,I,L,H,R;if(!this.store.state){return n(s,null)}var T=this.endpoint.getSession();var C=a(T,this.store.state);var A=this.prepareHistoryEntries();var j=((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.status)!=="pending"&&((r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.status)!=="in progress";return n(s,{class:this.panelOpen?"open":""},n("div",{class:"side-buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:f}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:g}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:w})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},(c=(l=this.store)===null||l===void 0?void 0:l.state)===null||c===void 0?void 0:c.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},h(new Date((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.created_at),d)),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},h(new Date((b=(u=this.store)===null||u===void 0?void 0:u.state)===null||b===void 0?void 0:b.updated_at),d)),n("div",{class:"label"},"Status"),n("div",{class:"value"},(y=(x=this.store)===null||x===void 0?void 0:x.state)===null||y===void 0?void 0:y.status),n("div",{class:"label"},"Verdoc Owner ID"),n("div",{class:"value"},(k=(_=this.store)===null||_===void 0?void 0:_.state)===null||k===void 0?void 0:k.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(M=(D=(z=this.store)===null||z===void 0?void 0:z.state)===null||D===void 0?void 0:D.profile)===null||M===void 0?void 0:M.first_name," ",(B=(V=(E=this.store)===null||E===void 0?void 0:E.state)===null||V===void 0?void 0:V.profile)===null||B===void 0?void 0:B.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(L=(I=(S=this.store)===null||S===void 0?void 0:S.state)===null||I===void 0?void 0:I.profile)===null||L===void 0?void 0:L.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),(R=(H=this.store)===null||H===void 0?void 0:H.state)===null||R===void 0?void 0:R.recipients.map((function(t,i){var s;var o=t.status!=="submitted"&&t.status!=="canceled"&&t.status!=="declined";var a=e.canResendRecipient(t);return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.role_name),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),C&&!j&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!a},{id:"inperson",label:"Get In-Person Link",disabled:!o}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},t.full_name),n("div",{class:"recipient-name"},t.email),n("div",{class:"recipient-name"},t.phone)))})),C&&n("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:function(){return e.showCancelDialog=!j},disabled:j})),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),A.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:m[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},h(e.date,d))))}))),this.showRecipientDialog&&n("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showManageDialog&&n("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:false,onAnother:function(){var t;e.showManageDialog=false;(t=e.another)===null||t===void 0?void 0:t.emit({envelope:e.store.state})},onNext:function(){return e.showManageDialog=false}}),this.showCancelDialog&&n("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.cancelEnvelope()}}))};return e}());b.style=u}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function r(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):s(e.value).then(a,r)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,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 l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=o=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-1d60151a.system.js","./p-eaf0b189.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-4098a4a2.system.js","./p-d8cd6b59.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-dc9c4361.system.js","./p-3af6b910.system.js"],(function(e){"use strict";var t,i,n,s,o,a,r,l,c,d,v,p,h;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){o=e.c},function(e){a=e.u},function(e){r=e.r},function(){},function(e){l=e.V},function(e){c=e.g},function(e){d=e.F},function(e){v=e.V},function(e){p=e.S},function(e){h=e.f},function(){}],execute:function(){var u='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-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.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><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.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="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-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var b=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.toggle=i(this,"toggle",7);this.another=i(this,"another",7);this.store=null;this.endpoint=l.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showManageDialog=false;this.showRecipientDialog="";this.showCancelDialog=false;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}n=this;return[4,c(this.endpoint,this.envelopeId,true)];case 1:n.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:s=o.sent();console.log("[SIDEBAR] Error loading envelope",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(i=s.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.recipients.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.setTab=function(e){var t;this.panelOpen=e!==this.activeTab||!this.panelOpen;(t=this.toggle)===null||t===void 0?void 0:t.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var t,i;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.status)};e.prototype.handleRecipientAction=function(e,t){var i,n;console.log("[SIDEBAR] Recipient action",t,e);switch(t){case"reminder":r(this.endpoint,this.envelopeId,e.role_name).then((function(){v("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);v("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":v("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":v("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:(n=this.store)===null||n===void 0?void 0:n.state,event:t})};e.prototype.cancelEnvelope=function(){var e=this;this.loading=true;o(this.endpoint,this.envelopeId).then((function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIDEBAR] Envelope canceled",t);v("Envelope canceled",{style:"success"});n=this;return[4,c(this.endpoint,this.envelopeId,true)];case 1:n.store=s.sent();this.sortEnvelopeRecipients();this.loading=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:(i=this.store)===null||i===void 0?void 0:i.state,event:"canceled"});return[2]}}))}))})).catch((function(t){console.log("[SIDEBAR] Error canceling envelope",t);e.loading=false;v("Error canceling envelope: "+t.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var t,i,n,s,o,a,r,l,c,d,v,p;var h=[];var u=((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.histories)||[];h.push({icon:"pencil",message:"Envelope created.",date:new Date((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.created_at)});if(((a=(o=this.store)===null||o===void 0?void 0:o.state)===null||a===void 0?void 0:a.status)==="complete"){h.push({icon:"pencil",message:"Envelope completed.",date:new Date((l=(r=this.store)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.updated_at)})}var f=u.some((function(e){return e.event==="owner:canceled"}));if(((d=(c=this.store)===null||c===void 0?void 0:c.state)===null||d===void 0?void 0:d.status)==="canceled"&&!f){h.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.canceled_at)})}u.forEach((function(t){var i;var n=(i=e.store.state)===null||i===void 0?void 0:i.recipients.find((function(e){return e.role_name===t.role_name}));var s=(n===null||n===void 0?void 0:n.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":h.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:declined":h.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":h.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(t.created_at)});break;case"sms":h.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":h.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":h.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(t.created_at)});break;default:h.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":h.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(t.created_at)});break;default:h.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":h.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){h.push({icon:"account_circle",message:"".concat(s," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){h.push({icon:"verified_user",message:"".concat(s," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":h.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){h.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(t.created_at)})}else{h.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":h.push({icon:"mail",message:"Invitation was resent to ".concat(s," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":h.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(t.created_at)});break;case"recipient:delegated":h.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":h.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":h.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":h.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":h.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":h.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":h.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(t.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",t);break}}));h.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return h};e.prototype.render=function(){var e=this;var t,i,o,r,l,c,v,p,u,b,x,y,_,k,z,D,M,E,V,B,S,I,L,H,R;if(!this.store.state){return n(s,null)}var T=this.endpoint.getSession();var C=a(T,this.store.state);var A=this.prepareHistoryEntries();var j=((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.status)!=="pending"&&((r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.status)!=="in progress";return n(s,{class:this.panelOpen?"open":""},n("div",{class:"side-buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:f}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:g}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:w})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},(c=(l=this.store)===null||l===void 0?void 0:l.state)===null||c===void 0?void 0:c.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},h(new Date((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.created_at),d)),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},h(new Date((b=(u=this.store)===null||u===void 0?void 0:u.state)===null||b===void 0?void 0:b.updated_at),d)),n("div",{class:"label"},"Status"),n("div",{class:"value"},(y=(x=this.store)===null||x===void 0?void 0:x.state)===null||y===void 0?void 0:y.status),n("div",{class:"label"},"Verdoc Owner ID"),n("div",{class:"value"},(k=(_=this.store)===null||_===void 0?void 0:_.state)===null||k===void 0?void 0:k.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(M=(D=(z=this.store)===null||z===void 0?void 0:z.state)===null||D===void 0?void 0:D.profile)===null||M===void 0?void 0:M.first_name," ",(B=(V=(E=this.store)===null||E===void 0?void 0:E.state)===null||V===void 0?void 0:V.profile)===null||B===void 0?void 0:B.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(L=(I=(S=this.store)===null||S===void 0?void 0:S.state)===null||I===void 0?void 0:I.profile)===null||L===void 0?void 0:L.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),(R=(H=this.store)===null||H===void 0?void 0:H.state)===null||R===void 0?void 0:R.recipients.map((function(t,i){var s;var o=t.status!=="submitted"&&t.status!=="canceled"&&t.status!=="declined";var a=e.canResendRecipient(t);return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.role_name),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),C&&!j&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!a},{id:"inperson",label:"Get In-Person Link",disabled:!o}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},t.full_name),n("div",{class:"recipient-name"},t.email),n("div",{class:"recipient-name"},t.phone)))})),C&&n("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:function(){return e.showCancelDialog=!j},disabled:j})),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),A.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:m[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},h(e.date,d))))}))),this.showRecipientDialog&&n("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showManageDialog&&n("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:false,onAnother:function(){var t;e.showManageDialog=false;(t=e.another)===null||t===void 0?void 0:t.emit({envelope:e.store.state})},onNext:function(){return e.showManageDialog=false}}),this.showCancelDialog&&n("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.cancelEnvelope()}}))};return e}());b.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-9bf2d124.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-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 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function i(e){try{u(n["throw"](e))}catch(e){s(e)}}function u(e){e.done?r(e.value):a(e.value).then(o,i)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,o;return o={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function i(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-3af6b910.system.js","./p-9bf2d124.system.js","./p-8324a7a3.system.js","./p-95080569.system.js"],(function(e){"use strict";var t,r,n,a,s,o,i;return{setters:[function(e){t=e.c},function(e){r=e.g;n=e.T},function(e){a=e.c;s=e.g},function(e){o=e.c;i=e.g}],execute:function(){var u=this;var l=function(e){var r=(new Date).toISOString();return t({isLoading:true,isLoaded:false,isError:false,error:null,roleNames:[],id:e,name:"",description:"",sender:n.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:false,is_personal:true,is_public:false,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:undefined,processed:false,organization:undefined,roles:[],pages:[],template_document:undefined,template_documents:[]})};var c={};var f=e("g",(function(e,t,n){if(n===void 0){n=false}return __awaiter(u,void 0,void 0,(function(){var u,f,d,p;return __generator(this,(function(b){switch(b.label){case 0:u=false;if(!c[t]){console.debug("[TEMPLATES] No template store found for ID, creating",t);c[t]=l(t);u=true}f=c[t];if(!(u||n))return[3,5];console.debug("[TEMPLATES] Loading template",{templateId:t,created:u,forceReload:n});f.state.isLoading=true;f.state.isLoaded=false;f.state.isError=false;f.state.error=undefined;b.label=1;case 1:b.trys.push([1,3,,4]);return[4,r(e,t)];case 2:d=b.sent();console.debug("[TEMPLATES] Got template",d);Object.assign(f.state,d);f.state.isLoaded=true;f.state.isError=false;f.state.error=undefined;a(d);o(d);return[3,4];case 3:p=b.sent();console.error("[TEMPLATES] Error loading template",p);f.state.isLoaded=false;f.state.isError=true;f.state.error=p;throw p;case 4:f.state.isLoading=false;return[3,6];case 5:s(t);i(t);b.label=6;case 6:return[2,f]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function i(e){try{u(n["throw"](e))}catch(e){s(e)}}function u(e){e.done?r(e.value):a(e.value).then(o,i)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,o;return o={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function i(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-3af6b910.system.js","./p-f246348c.system.js","./p-8324a7a3.system.js","./p-95080569.system.js"],(function(e){"use strict";var t,r,n,a,s,o,i;return{setters:[function(e){t=e.c},function(e){r=e.g;n=e.T},function(e){a=e.c;s=e.g},function(e){o=e.c;i=e.g}],execute:function(){var u=this;var l=function(e){var r=(new Date).toISOString();return t({isLoading:true,isLoaded:false,isError:false,error:null,roleNames:[],id:e,name:"",description:"",sender:n.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:false,is_personal:true,is_public:false,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:undefined,processed:false,organization:undefined,roles:[],pages:[],template_document:undefined,template_documents:[]})};var c={};var f=e("g",(function(e,t,n){if(n===void 0){n=false}return __awaiter(u,void 0,void 0,(function(){var u,f,d,p;return __generator(this,(function(g){switch(g.label){case 0:u=false;if(!c[t]){console.debug("[TEMPLATES] No template store found for ID, creating",t);c[t]=l(t);u=true}f=c[t];if(!(u||n))return[3,5];console.debug("[TEMPLATES] Loading template",{templateId:t,created:u,forceReload:n});f.state.isLoading=true;f.state.isLoaded=false;f.state.isError=false;f.state.error=undefined;g.label=1;case 1:g.trys.push([1,3,,4]);return[4,r(e,t)];case 2:d=g.sent();console.debug("[TEMPLATES] Got template",d);Object.assign(f.state,d);f.state.isLoaded=true;f.state.isError=false;f.state.error=undefined;a(d);o(d);return[3,4];case 3:p=g.sent();console.error("[TEMPLATES] Error loading template",p);f.state.isLoaded=false;f.state.isError=true;f.state.error=p;throw p;case 4:f.state.isLoading=false;return[3,6];case 5:s(t);i(t);g.label=6;case 6:return[2,f]}}))}))}))}}}));
@@ -1 +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-035f6b38.js";import{c}from"./p-a3d7cdda.js";import"./p-eab67c09.js";import"./p-dc2ad047.js";import"./p-839f6f0d.js";import"./p-c220af42.js";const a=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=c(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)})))}};a.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{a as verdocs_contact_picker,n as verdocs_toggle_button}
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-e04d8f5d.js";import{c}from"./p-a3d7cdda.js";import"./p-eab67c09.js";import"./p-dc2ad047.js";import"./p-839f6f0d.js";import"./p-c220af42.js";const a=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=c(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)})))}};a.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{a as verdocs_contact_picker,n as verdocs_toggle_button}