@verdocs/web-sdk 1.12.11 → 1.12.12

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 (118) hide show
  1. package/dist/cjs/{VerdocsEndpoint-26bb7607.js → VerdocsEndpoint-3d59c835.js} +4 -2
  2. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-preview.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-send.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-document-page.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-template-name.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-template-properties.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-template-roles.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  23. package/dist/components/VerdocsEndpoint.js +4 -2
  24. package/dist/docs.json +1 -1
  25. package/dist/esm/{VerdocsEndpoint-d50a8d28.js → VerdocsEndpoint-6ec36985.js} +4 -2
  26. package/dist/esm/verdocs-auth.entry.js +1 -1
  27. package/dist/esm/verdocs-build.entry.js +1 -1
  28. package/dist/esm/verdocs-button-panel_3.entry.js +1 -1
  29. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  30. package/dist/esm/verdocs-dropdown_2.entry.js +1 -1
  31. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  32. package/dist/esm/verdocs-preview.entry.js +1 -1
  33. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  34. package/dist/esm/verdocs-search.entry.js +1 -1
  35. package/dist/esm/verdocs-send.entry.js +1 -1
  36. package/dist/esm/verdocs-sign.entry.js +1 -1
  37. package/dist/esm/verdocs-template-attachments.entry.js +1 -1
  38. package/dist/esm/verdocs-template-create_2.entry.js +1 -1
  39. package/dist/esm/verdocs-template-document-page.entry.js +1 -1
  40. package/dist/esm/verdocs-template-name.entry.js +1 -1
  41. package/dist/esm/verdocs-template-properties.entry.js +1 -1
  42. package/dist/esm/verdocs-template-reminders.entry.js +1 -1
  43. package/dist/esm/verdocs-template-role-properties_2.entry.js +1 -1
  44. package/dist/esm/verdocs-template-roles.entry.js +1 -1
  45. package/dist/esm/verdocs-template-visibility.entry.js +1 -1
  46. package/dist/esm/verdocs-view.entry.js +1 -1
  47. package/dist/esm-es5/VerdocsEndpoint-6ec36985.js +1 -0
  48. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  49. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  50. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  51. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  52. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  53. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  54. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  55. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  56. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  57. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  58. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
  60. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  61. package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
  62. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  63. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  64. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  65. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
  66. package/dist/esm-es5/verdocs-template-roles.entry.js +1 -1
  67. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  68. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  69. package/dist/verdocs-web-sdk/{p-25c56686.entry.js → p-03f1894c.entry.js} +1 -1
  70. package/dist/verdocs-web-sdk/{p-ddc65e0e.system.entry.js → p-15fdbcbc.system.entry.js} +1 -1
  71. package/dist/verdocs-web-sdk/{p-55f89a5b.system.entry.js → p-17889700.system.entry.js} +1 -1
  72. package/dist/verdocs-web-sdk/{p-4cc43b69.entry.js → p-2060a40c.entry.js} +1 -1
  73. package/dist/verdocs-web-sdk/{p-7d562f8b.system.entry.js → p-275eb2b1.system.entry.js} +1 -1
  74. package/dist/verdocs-web-sdk/{p-085f45ef.system.entry.js → p-2829c669.system.entry.js} +1 -1
  75. package/dist/verdocs-web-sdk/{p-78626490.system.entry.js → p-2c2de2e7.system.entry.js} +1 -1
  76. package/dist/verdocs-web-sdk/{p-06201c22.system.entry.js → p-3165cfec.system.entry.js} +1 -1
  77. package/dist/verdocs-web-sdk/{p-8a41b08e.system.entry.js → p-3fdd61f2.system.entry.js} +1 -1
  78. package/dist/verdocs-web-sdk/{p-e1fb61bb.entry.js → p-466589ad.entry.js} +1 -1
  79. package/dist/verdocs-web-sdk/{p-ed10d9d9.system.entry.js → p-46986642.system.entry.js} +1 -1
  80. package/dist/verdocs-web-sdk/{p-e8d924d2.entry.js → p-4c1349bf.entry.js} +1 -1
  81. package/dist/verdocs-web-sdk/{p-96d46a1e.entry.js → p-4c50da3f.entry.js} +1 -1
  82. package/dist/verdocs-web-sdk/{p-e1c90a68.entry.js → p-4f8d48c4.entry.js} +1 -1
  83. package/dist/verdocs-web-sdk/{p-717c36c3.entry.js → p-53692637.entry.js} +1 -1
  84. package/dist/verdocs-web-sdk/{p-fc57a027.system.entry.js → p-569c96af.system.entry.js} +1 -1
  85. package/dist/verdocs-web-sdk/{p-c296f86f.entry.js → p-59a504ef.entry.js} +1 -1
  86. package/dist/verdocs-web-sdk/{p-8c062eba.system.entry.js → p-5fec33d8.system.entry.js} +1 -1
  87. package/dist/verdocs-web-sdk/{p-c11a681f.entry.js → p-62866e51.entry.js} +1 -1
  88. package/dist/verdocs-web-sdk/{p-bdfdcb0f.system.entry.js → p-62bd0d06.system.entry.js} +1 -1
  89. package/dist/verdocs-web-sdk/{p-2fc8d18c.entry.js → p-62db0bfe.entry.js} +1 -1
  90. package/dist/verdocs-web-sdk/{p-dc5875be.system.entry.js → p-6c0caf56.system.entry.js} +1 -1
  91. package/dist/verdocs-web-sdk/{p-55610f09.system.entry.js → p-724c0c3d.system.entry.js} +1 -1
  92. package/dist/verdocs-web-sdk/{p-1abe43a1.entry.js → p-74a6403f.entry.js} +1 -1
  93. package/dist/verdocs-web-sdk/{p-591432e9.system.entry.js → p-78c681fe.system.entry.js} +1 -1
  94. package/dist/verdocs-web-sdk/{p-1e4e776b.entry.js → p-7d7918bc.entry.js} +1 -1
  95. package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
  96. package/dist/verdocs-web-sdk/{p-f3fa8752.entry.js → p-8293540f.entry.js} +1 -1
  97. package/dist/verdocs-web-sdk/{p-b038a967.system.entry.js → p-855dbfcd.system.entry.js} +1 -1
  98. package/dist/verdocs-web-sdk/{p-2c87ef4d.system.entry.js → p-8990cde6.system.entry.js} +1 -1
  99. package/dist/verdocs-web-sdk/{p-dd22797c.system.entry.js → p-8a564dcf.system.entry.js} +1 -1
  100. package/dist/verdocs-web-sdk/p-8e5d9f77.system.js +1 -0
  101. package/dist/verdocs-web-sdk/{p-06e2c01d.entry.js → p-972c85b6.entry.js} +1 -1
  102. package/dist/verdocs-web-sdk/{p-a3413844.system.entry.js → p-97f21cbd.system.entry.js} +1 -1
  103. package/dist/verdocs-web-sdk/{p-95171474.entry.js → p-98497031.entry.js} +1 -1
  104. package/dist/verdocs-web-sdk/{p-27080e8e.entry.js → p-997fc4dd.entry.js} +1 -1
  105. package/dist/verdocs-web-sdk/p-a93b745a.js +1 -0
  106. package/dist/verdocs-web-sdk/{p-b62bf4bb.system.entry.js → p-aac3f2bd.system.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-e897e87a.system.entry.js → p-aafe8054.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-bfbca3ba.system.entry.js → p-c39ac27d.system.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/{p-062bd1d6.entry.js → p-c7ff8e32.entry.js} +1 -1
  110. package/dist/verdocs-web-sdk/{p-e531210e.entry.js → p-dda83545.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-bfbb7ee1.entry.js → p-e76245f0.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-772c6f2a.entry.js → p-e87ad9cc.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-04ddb5a1.entry.js → p-f106b96c.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  115. package/package.json +2 -2
  116. package/dist/esm-es5/VerdocsEndpoint-d50a8d28.js +0 -1
  117. package/dist/verdocs-web-sdk/p-4e49fb12.js +0 -1
  118. package/dist/verdocs-web-sdk/p-4f63fae0.system.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function s(t){try{c(n.next(t))}catch(t){a(t)}}function o(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?i(t.value):r(t.value).then(s,o)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t];r=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-63398dca.system.js","./p-4f63fae0.system.js","./p-9a935949.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(t){"use strict";var e,i,n,r,a,s,o,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;a=t.a},function(t){s=t.g},function(t){o=t.V},function(t){c=t.t},function(){},function(){},function(){},function(){}],execute:function(){var h="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";var u=t("verdocs_template_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=o.getDefault();this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri=""}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,s(this.endpoint,this.templateId,this.documentId,this.pageNumber)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var a=r.contentRect.width;t.renderedWidth=a;t.renderedHeight=t.virtualHeight*(a/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-template-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-template-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function s(t){try{c(n.next(t))}catch(t){a(t)}}function o(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?i(t.value):r(t.value).then(s,o)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t];r=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-63398dca.system.js","./p-8e5d9f77.system.js","./p-9a935949.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(t){"use strict";var e,i,n,r,a,s,o,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;a=t.a},function(t){s=t.g},function(t){o=t.V},function(t){c=t.t},function(){},function(){},function(){},function(){}],execute:function(){var h="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";var u=t("verdocs_template_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=o.getDefault();this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri=""}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,s(this.endpoint,this.templateId,this.documentId,this.pageNumber)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var a=r.contentRect.width;t.renderedWidth=a;t.renderedHeight=t.virtualHeight*(a/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-template-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-template-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
@@ -1 +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,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):s(e.value).then(o,r)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(a=o[0]&2?s["return"]:o[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,o[1])).done)return a;if(s=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-4f63fae0.system.js","./p-1418d2ab.system.js","./p-187b20b7.system.js","./p-51a3ea62.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var t,i,n,s,a,o,r,c,l;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){a=e.V},function(e){o=e.g;r=e.s},function(e){c=e.S},function(e){l=e.f},function(){},function(){},function(){}],execute:function(){var d='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;width:400px}verdocs-envelope-sidebar .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 .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .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 .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}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}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}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}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 p='<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 v='<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 h='<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 u={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>',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 f=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=a.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.envelopeId){console.error("[SIDEBAR] Missing required envelopeId");return[2]}s.label=1;case 1:s.trys.push([1,3,,4]);return[4,o(this.endpoint,this.envelopeId)];case 2:s.sent();return[3,4];case 3:n=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(i=n.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.setTab=function(e){this.panelOpen=e!==this.activeTab||!this.panelOpen;this.activeTab=e};e.prototype.canResendRecipient=function(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.canModifyRecipient=function(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.handleRecipientAction=function(e,t){var i;console.log("recipient action",t,e);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:r.envelope,event:t})};e.prototype.prepareHistoryEntries=function(){var e=[];var t=r.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(r.envelope.created_at)});if(r.envelope.status==="complete"){e.push({icon:"pencil",message:"Envelope completed.",date:new Date(r.envelope.updated_at)})}var i=t.some((function(e){return e.event==="owner:canceled"}));if(r.envelope.status==="canceled"&&!i){e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(r.envelope.canceled_at)})}t.forEach((function(t){var i=r.envelope.recipients.find((function(e){return e.role_name===t.role_name}));var n=(i===null||i===void 0?void 0:i.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:"Signed by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:"Declined by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":e.push({icon:"visibility",message:"Opened by ".concat(n,", via email."),date:new Date(t.created_at)});break;case"sms":e.push({icon:"visibility",message:"Opened by ".concat(n,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:"Opened by ".concat(n,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":e.push({icon:"visibility",message:"Opened by ".concat(n,", via dashboard."),date:new Date(t.created_at)});break;default:e.push({icon:"visibility",message:"Opened by ".concat(n,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":e.push({icon:"check_circle",message:"Approved by ".concat(n,"."),date:new Date(t.created_at)});break;default:e.push({icon:"send",message:"Submitted by ".concat(n,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":e.push({icon:"send",message:"Prepared by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){e.push({icon:"account_circle",message:"".concat(n," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){e.push({icon:"verified_user",message:"".concat(n," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":e.push({icon:"done",message:"".concat(n," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){e.push({icon:"textsms",message:"".concat(n," has been invited via SMS."),date:new Date(t.created_at)})}else{e.push({icon:"mail",message:"".concat(n," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":e.push({icon:"mail",message:"Invitation was resent to ".concat(n," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:"A copy has been sent to ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:"Owner accessed the In-person link for ".concat(i,"."),date:new Date(t.created_at)});break;default:console.log("unknown",t);break}}));e.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return e};e.prototype.render=function(){var e=this;var t,i,a;if(!r.envelope){return n(s,null)}var o=this.endpoint.getSession();var c=o.profile_id===r.envelope.profile_id;var d=this.prepareHistoryEntries();return n(s,{class:this.panelOpen?"open":"","data-r":r.updateCount},n("div",{class:"buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:p}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:v}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:h})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},r.envelope.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},l(new Date(r.envelope.created_at),"PP pp")),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},l(new Date(r.envelope.updated_at),"PP pp")),n("div",{class:"label"},"Status"),n("div",{class:"value"},r.envelope.status),n("div",{class:"label"},"Verdoc Owner UUID"),n("div",{class:"value"},r.envelope.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(t=r.envelope.profile)===null||t===void 0?void 0:t.first_name," ",(i=r.envelope.profile)===null||i===void 0?void 0:i.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(a=r.envelope.profile)===null||a===void 0?void 0:a.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),r.envelope.recipients.map((function(t,i){var s;return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.type),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),c&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!e.canResendRecipient(t)},{id:"modify",label:"Modify Recipient",disabled:!e.canModifyRecipient(t)},{id:"inperson",label:"Get In-Person Link",disabled:!e.canModifyRecipient(t)||!["invited","opened"].includes(t.status)}]})),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)))}))),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),d.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:u[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},l(e.date,"PP pp"))))}))))};return e}());f.style=d}}}));
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,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):s(e.value).then(o,r)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(a=o[0]&2?s["return"]:o[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,o[1])).done)return a;if(s=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-8e5d9f77.system.js","./p-1418d2ab.system.js","./p-187b20b7.system.js","./p-51a3ea62.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var t,i,n,s,a,o,r,c,l;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){a=e.V},function(e){o=e.g;r=e.s},function(e){c=e.S},function(e){l=e.f},function(){},function(){},function(){}],execute:function(){var d='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;width:400px}verdocs-envelope-sidebar .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 .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .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 .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}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}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}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}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 p='<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 v='<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 h='<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 u={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>',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 f=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=a.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.envelopeId){console.error("[SIDEBAR] Missing required envelopeId");return[2]}s.label=1;case 1:s.trys.push([1,3,,4]);return[4,o(this.endpoint,this.envelopeId)];case 2:s.sent();return[3,4];case 3:n=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(i=n.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.setTab=function(e){this.panelOpen=e!==this.activeTab||!this.panelOpen;this.activeTab=e};e.prototype.canResendRecipient=function(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.canModifyRecipient=function(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.handleRecipientAction=function(e,t){var i;console.log("recipient action",t,e);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:r.envelope,event:t})};e.prototype.prepareHistoryEntries=function(){var e=[];var t=r.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(r.envelope.created_at)});if(r.envelope.status==="complete"){e.push({icon:"pencil",message:"Envelope completed.",date:new Date(r.envelope.updated_at)})}var i=t.some((function(e){return e.event==="owner:canceled"}));if(r.envelope.status==="canceled"&&!i){e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(r.envelope.canceled_at)})}t.forEach((function(t){var i=r.envelope.recipients.find((function(e){return e.role_name===t.role_name}));var n=(i===null||i===void 0?void 0:i.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:"Signed by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:"Declined by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":e.push({icon:"visibility",message:"Opened by ".concat(n,", via email."),date:new Date(t.created_at)});break;case"sms":e.push({icon:"visibility",message:"Opened by ".concat(n,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:"Opened by ".concat(n,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":e.push({icon:"visibility",message:"Opened by ".concat(n,", via dashboard."),date:new Date(t.created_at)});break;default:e.push({icon:"visibility",message:"Opened by ".concat(n,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":e.push({icon:"check_circle",message:"Approved by ".concat(n,"."),date:new Date(t.created_at)});break;default:e.push({icon:"send",message:"Submitted by ".concat(n,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":e.push({icon:"send",message:"Prepared by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){e.push({icon:"account_circle",message:"".concat(n," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){e.push({icon:"verified_user",message:"".concat(n," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":e.push({icon:"done",message:"".concat(n," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){e.push({icon:"textsms",message:"".concat(n," has been invited via SMS."),date:new Date(t.created_at)})}else{e.push({icon:"mail",message:"".concat(n," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":e.push({icon:"mail",message:"Invitation was resent to ".concat(n," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:"A copy has been sent to ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:"Owner accessed the In-person link for ".concat(i,"."),date:new Date(t.created_at)});break;default:console.log("unknown",t);break}}));e.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return e};e.prototype.render=function(){var e=this;var t,i,a;if(!r.envelope){return n(s,null)}var o=this.endpoint.getSession();var c=o.profile_id===r.envelope.profile_id;var d=this.prepareHistoryEntries();return n(s,{class:this.panelOpen?"open":"","data-r":r.updateCount},n("div",{class:"buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:p}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:v}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:h})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},r.envelope.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},l(new Date(r.envelope.created_at),"PP pp")),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},l(new Date(r.envelope.updated_at),"PP pp")),n("div",{class:"label"},"Status"),n("div",{class:"value"},r.envelope.status),n("div",{class:"label"},"Verdoc Owner UUID"),n("div",{class:"value"},r.envelope.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(t=r.envelope.profile)===null||t===void 0?void 0:t.first_name," ",(i=r.envelope.profile)===null||i===void 0?void 0:i.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(a=r.envelope.profile)===null||a===void 0?void 0:a.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),r.envelope.recipients.map((function(t,i){var s;return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.type),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),c&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!e.canResendRecipient(t)},{id:"modify",label:"Modify Recipient",disabled:!e.canModifyRecipient(t)},{id:"inperson",label:"Get In-Person Link",disabled:!e.canModifyRecipient(t)||!["invited","opened"].includes(t.status)}]})),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)))}))),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),d.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:u[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},l(e.date,"PP pp"))))}))))};return e}());f.style=d}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,a){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function r(e){try{l(a.next(e))}catch(e){n(e)}}function s(e){try{l(a["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,s)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,o,n,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,o&&(n=r[0]&2?o["return"]:r[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,r[1])).done)return n;if(o=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;o=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){i.label=r[1];break}if(r[0]===6&&i.label<n[1]){i.label=n[1];n=r;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(r);break}if(n[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];o=0}finally{a=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var a=0,o=t.length,n;a<o;a++){if(n||!(a in t)){if(!n)n=Array.prototype.slice.call(t,0,a);n[a]=t[a]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-69912cbf.system.js","./p-63398dca.system.js","./p-4f63fae0.system.js","./p-187b20b7.system.js","./p-f127e95a.system.js","./p-b1288daf.system.js","./p-9a935949.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,a,o,n,r,s,l,d,c,p,h,g,u,f,m,v,x,b;return{setters:[function(e){t=e.r;i=e.c;a=e.h;o=e.H},function(e){n=e.c;r=e.g},function(e){s=e.c},function(e){l=e.V},function(e){d=e.S},function(e){c=e.i},function(e){p=e.u;h=e.c},function(e){g=e.a;u=e.r;f=e.e;m=e.f;v=e.h},function(e){x=e.s},function(e){b=e.l},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end;padding:0 0 30px 0}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var y=" ";var q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var C=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=l.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,a,o,l,c,p,h;var g=this;return __generator(this,(function(u){switch(u.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;u.label=1;case 1:u.trys.push([1,4,,5]);return[4,n(this.endpoint,{name:this.file.name})];case 2:o=u.sent();console.log("[CREATE] Created template",o);return[4,s(this.endpoint,o.id,this.file)];case 3:l=u.sent();console.log("[CREATE] Created document",l);c=null;p=setInterval((function(){return __awaiter(g,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:console.log("[CREATE] Waiting for template to be processed...",l);return[4,r(this.endpoint,o.id)];case 1:c=t.sent();if(c===null||c===void 0?void 0:c.processed){console.log("[CREATE] Retrieved new template",c);if(p){clearInterval(p)}(e=this.next)===null||e===void 0?void 0:e.emit(c);this.creating=false}return[2]}}))}))}),3e3);return[3,5];case 4:h=u.sent();console.log("[CREATE] Error creating template",h);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new d(h.message,(i=h.response)===null||i===void 0?void 0:i.status,(a=h.response)===null||a===void 0?void 0:a.data));this.creating=false;return[3,5];case 5:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return a(o,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return a("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},a("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?a("div",{class:"loader-wrapper"},a("verdocs-loader",null),a("div",{class:"loading-text"},"Processing, please wait...")):a("div",{class:"upload-box"},a("div",null,a("span",{innerHTML:q})),a("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),a("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),a("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),a("div",{class:"buttons"},a("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),a("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());C.style=w;var E="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";var k='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';var _='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var V='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var H='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var I='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var z=[{id:"signature",tooltip:"Signature",icon:M},{id:"initial",tooltip:"Initials",icon:I},{id:"sep1",tooltip:"",icon:L},{id:"textbox",tooltip:"Text Box",icon:k},{id:"textarea",tooltip:"Text Area",icon:Z},{id:"checkbox_group",tooltip:"Check Box",icon:_},{id:"radio_button_group",tooltip:"Radio Button",icon:V},{id:"dropdown",tooltip:"Dropdown",icon:A},{id:"sep2",tooltip:"",icon:L},{id:"date",tooltip:"Date",icon:H},{id:"timestamp",tooltip:"Timestamp",icon:S}];var P=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,a,o,n,r,s;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,b(this.endpoint,this.templateId,true)];case 2:l.sent();this.selectedRoleName=x.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=l.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=l.sent();console.log("[FIELDS] Error with preview session",s);(a=this.sdkError)===null||a===void 0?void 0:a.emit(new d(s.message,(o=s.response)===null||o===void 0?void 0:o.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){c.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){console.log("[FIELDS] handleFieldChange",e,t,i);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,a){var o=this;a.addEventListener("input",(function(e){return o.handleFieldChange(t,e)}));a.addEventListener("settingsChanged",(function(){var e;console.log("settings changed",o,t);a.setAttribute("roleindex",g(x.roleNames,t.role_name));o.rerender++;a.setAttribute("rerender",o.rerender);(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));a.addEventListener("deleted",(function(){var e;console.log("deleted",o,t);a.remove();o.rerender++;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));a.setAttribute("roleindex",i);a.setAttribute("pageNumber",e.pageNumber);a.setAttribute("xScale",e.xScale);a.setAttribute("yScale",e.yScale);a.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var a=x.fields.filter((function(e){return e.page_sequence===i.pageNumber}));a.forEach((function(e){var a=g(x.roleNames,e.role_name);var o=u(e,i,a,{disabled:true,editable:true,draggable:true});if(!o){return}if(Array.isArray(o)){o.forEach((function(o){t.attachFieldAttributes(i,e,a,o);c(o).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var a=+(e.target.getAttribute("xScale")||1);var o=+(e.target.getAttribute("yScale")||1);var n=e.dx/a+t;var r=e.dy/o+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))}else{t.attachFieldAttributes(i,e,a,o);c(o).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var a=+(e.target.getAttribute("xScale")||1);var o=+(e.target.getAttribute("yScale")||1);var n=e.dx/a+t;var r=e.dy/o+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,a,o,n,r,s,l,d,c,h,g,u,f,m,v,b,w,y,q;return __generator(this,(function(C){switch(C.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],a=i.naturalWidth,o=a===void 0?612:a,n=i.naturalHeight,r=n===void 0?792:n,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();c=e.target.parentElement;h=c.getBoundingClientRect();g=Math.max(d.left-h.left,0);u=Math.max(l-(h.bottom-d.bottom),0);f=this.viewCoordinatesToPageCoordinates(g,u,t,o-e.rect.width,r-e.rect.height),m=f.x,v=f.y;b=e.target.getAttribute("name");w=+(e.target.getAttribute("option")||"0");y=x.fields.find((function(e){return e.name===b}));console.log("Will update",b,w,y);if(!y)return[3,2];switch(y.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":y.setting.x=m;y.setting.y=v;break;case"checkbox_group":case"radio_button_group":{q=y.setting.options[w];if(q){q.x=m;q.y=v}}break}return[4,p(this.endpoint,this.templateId,b,y)];case 1:C.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});C.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i=1;var a;do{a="".concat(e,"P").concat(t,"-").concat(i);i++}while(x.fields.some((function(e){return e.name===a})));console.log("Field name",a);return a};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,a,o){var n=this.cachedPageInfo[i],r=n.xScale,s=r===void 0?1:r,l=n.yScale,d=l===void 0?1:l,c=n.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,a));var g=Math.floor(Math.min(Math.max(p-t,0)/d,o));return{x:h,y:g}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,a,o,n,r,s,l,d,c,p,g,u,f,b,w,y;return __generator(this,(function(q){switch(q.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);a=t.sequence;o=e.offsetX;n=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[a];console.log("Cached page",l);d=l.naturalWidth,c=d===void 0?612:d,p=l.naturalHeight,g=p===void 0?792:p;u=this.viewCoordinatesToPageCoordinates(o,n,a,c-r,g-s);f=Math.floor(u.x);b=Math.floor(u.y);w={name:this.generateFieldName(this.placing,a),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:a,validator:null,setting:{x:f,y:b}};switch(w.type){case"attachment":case"payment":w.setting={x:f,y:b};break;case"initial":case"signature":w.setting={x:f,y:b,result:""};break;case"checkbox_group":w.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(w.name,"-1"),value:"Option 1",checked:false,x:f,y:b}]};break;case"date":w.setting={x:f,y:b,width:r,height:s,result:""};break;case"dropdown":w.required=false;w.setting={x:f,y:b,width:r,height:s,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":w.setting={options:[{id:"".concat(w.name,"-1"),value:"Option 1",selected:false,x:f,y:b}]};break;case"textarea":case"textbox":w.setting={x:f,y:b,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":w.setting={x:f,y:b,width:r,height:s};break}if(w.type==="textarea"){w.type="textbox"}return[4,h(this.endpoint,this.templateId,w)];case 1:y=q.sent();console.log("Saved field",y);x.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[a]});q.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;if(!this.endpoint.session){return a(o,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(x.loading||!x.template){return a(o,null,a("verdocs-loader",null))}var i=__spreadArray([],x.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return a(o,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},a("div",{id:"verdocs-template-fields-toolbar"},z.map((function(e){return a("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){t.placing=e.id}}})}))),a("div",{class:"pages"},i.map((function(e){return a("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());P.style=E}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,o){function a(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function r(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):a(e.value).then(r,s)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,a,n,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,a&&(n=r[0]&2?a["return"]:r[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,r[1])).done)return n;if(a=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;a=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){i.label=r[1];break}if(r[0]===6&&i.label<n[1]){i.label=n[1];n=r;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(r);break}if(n[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];a=0}finally{o=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,a=t.length,n;o<a;o++){if(n||!(o in t)){if(!n)n=Array.prototype.slice.call(t,0,o);n[o]=t[o]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-69912cbf.system.js","./p-63398dca.system.js","./p-8e5d9f77.system.js","./p-187b20b7.system.js","./p-f127e95a.system.js","./p-b1288daf.system.js","./p-9a935949.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-af2c2f79.system.js","./p-e10dd0f7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,o,a,n,r,s,l,d,c,p,h,g,u,f,m,v,x,b;return{setters:[function(e){t=e.r;i=e.c;o=e.h;a=e.H},function(e){n=e.c;r=e.g},function(e){s=e.c},function(e){l=e.V},function(e){d=e.S},function(e){c=e.i},function(e){p=e.u;h=e.c},function(e){g=e.a;u=e.r;f=e.e;m=e.f;v=e.h},function(e){x=e.s},function(e){b=e.l},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var w='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end;padding:0 0 30px 0}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var y=" ";var q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var C=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=l.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,a,l,c,p,h;var g=this;return __generator(this,(function(u){switch(u.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;u.label=1;case 1:u.trys.push([1,4,,5]);return[4,n(this.endpoint,{name:this.file.name})];case 2:a=u.sent();console.log("[CREATE] Created template",a);return[4,s(this.endpoint,a.id,this.file)];case 3:l=u.sent();console.log("[CREATE] Created document",l);c=null;p=setInterval((function(){return __awaiter(g,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:console.log("[CREATE] Waiting for template to be processed...",l);return[4,r(this.endpoint,a.id)];case 1:c=t.sent();if(c===null||c===void 0?void 0:c.processed){console.log("[CREATE] Retrieved new template",c);if(p){clearInterval(p)}(e=this.next)===null||e===void 0?void 0:e.emit(c);this.creating=false}return[2]}}))}))}),3e3);return[3,5];case 4:h=u.sent();console.log("[CREATE] Error creating template",h);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new d(h.message,(i=h.response)===null||i===void 0?void 0:i.status,(o=h.response)===null||o===void 0?void 0:o.data));this.creating=false;return[3,5];case 5:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return o(a,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),o("div",{class:"loading-text"},"Processing, please wait...")):o("div",{class:"upload-box"},o("div",null,o("span",{innerHTML:q})),o("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),o("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),o("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),o("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());C.style=w;var E="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";var k='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';var _='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var V='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var H='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var I='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var z=[{id:"signature",tooltip:"Signature",icon:M},{id:"initial",tooltip:"Initials",icon:I},{id:"sep1",tooltip:"",icon:L},{id:"textbox",tooltip:"Text Box",icon:k},{id:"textarea",tooltip:"Text Area",icon:Z},{id:"checkbox_group",tooltip:"Check Box",icon:_},{id:"radio_button_group",tooltip:"Radio Button",icon:V},{id:"dropdown",tooltip:"Dropdown",icon:A},{id:"sep2",tooltip:"",icon:L},{id:"date",tooltip:"Date",icon:H},{id:"timestamp",tooltip:"Timestamp",icon:S}];var P=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,a,n,r,s;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,b(this.endpoint,this.templateId,true)];case 2:l.sent();this.selectedRoleName=x.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=l.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=l.sent();console.log("[FIELDS] Error with preview session",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new d(s.message,(a=s.response)===null||a===void 0?void 0:a.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){c.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){console.log("[FIELDS] handleFieldChange",e,t,i);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,o){var a=this;o.addEventListener("input",(function(e){return a.handleFieldChange(t,e)}));o.addEventListener("settingsChanged",(function(){var e;console.log("settings changed",a,t);o.setAttribute("roleindex",g(x.roleNames,t.role_name));a.rerender++;o.setAttribute("rerender",a.rerender);(e=a.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,template:x.template,event:"updated-field"})}));o.addEventListener("deleted",(function(){var e;console.log("deleted",a,t);o.remove();a.rerender++;(e=a.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,template:x.template,event:"updated-field"})}));o.setAttribute("roleindex",i);o.setAttribute("pageNumber",e.pageNumber);o.setAttribute("xScale",e.xScale);o.setAttribute("yScale",e.yScale);o.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var o=x.fields.filter((function(e){return e.page_sequence===i.pageNumber}));o.forEach((function(e){var o=g(x.roleNames,e.role_name);var a=u(e,i,o,{disabled:true,editable:true,draggable:true});if(!a){return}if(Array.isArray(a)){a.forEach((function(a){t.attachFieldAttributes(i,e,o,a);c(a).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var o=+(e.target.getAttribute("xScale")||1);var a=+(e.target.getAttribute("yScale")||1);var n=e.dx/o+t;var r=e.dy/a+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))}else{t.attachFieldAttributes(i,e,o,a);c(a).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var o=+(e.target.getAttribute("xScale")||1);var a=+(e.target.getAttribute("yScale")||1);var n=e.dx/o+t;var r=e.dy/a+i;e.target.setAttribute("posX",n);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(n,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,a,n,r,s,l,d,c,h,g,u,f,m,v,b,w,y,q;return __generator(this,(function(C){switch(C.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],o=i.naturalWidth,a=o===void 0?612:o,n=i.naturalHeight,r=n===void 0?792:n,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();c=e.target.parentElement;h=c.getBoundingClientRect();g=Math.max(d.left-h.left,0);u=Math.max(l-(h.bottom-d.bottom),0);f=this.viewCoordinatesToPageCoordinates(g,u,t,a-e.rect.width,r-e.rect.height),m=f.x,v=f.y;b=e.target.getAttribute("name");w=+(e.target.getAttribute("option")||"0");y=x.fields.find((function(e){return e.name===b}));console.log("Will update",b,w,y);if(!y)return[3,2];switch(y.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":y.setting.x=m;y.setting.y=v;break;case"checkbox_group":case"radio_button_group":{q=y.setting.options[w];if(q){q.x=m;q.y=v}}break}return[4,p(this.endpoint,this.templateId,b,y)];case 1:C.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});C.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i=1;var o;do{o="".concat(e,"P").concat(t,"-").concat(i);i++}while(x.fields.some((function(e){return e.name===o})));console.log("Field name",o);return o};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,o,a){var n=this.cachedPageInfo[i],r=n.xScale,s=r===void 0?1:r,l=n.yScale,d=l===void 0?1:l,c=n.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,o));var g=Math.floor(Math.min(Math.max(p-t,0)/d,a));return{x:h,y:g}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,o,a,n,r,s,l,d,c,p,g,u,f,b,w,y;return __generator(this,(function(q){switch(q.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);o=t.sequence;a=e.offsetX;n=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[o];console.log("Cached page",l);d=l.naturalWidth,c=d===void 0?612:d,p=l.naturalHeight,g=p===void 0?792:p;u=this.viewCoordinatesToPageCoordinates(a,n,o,c-r,g-s);f=Math.floor(u.x);b=Math.floor(u.y);w={name:this.generateFieldName(this.placing,o),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:o,validator:null,setting:{x:f,y:b}};switch(w.type){case"attachment":case"payment":w.setting={x:f,y:b};break;case"initial":case"signature":w.setting={x:f,y:b,result:""};break;case"checkbox_group":w.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(w.name,"-1"),value:"Option 1",checked:false,x:f,y:b}]};break;case"date":w.setting={x:f,y:b,width:r,height:s,result:""};break;case"dropdown":w.required=false;w.setting={x:f,y:b,width:r,height:s,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":w.setting={options:[{id:"".concat(w.name,"-1"),value:"Option 1",selected:false,x:f,y:b}]};break;case"textarea":case"textbox":w.setting={x:f,y:b,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":w.setting={x:f,y:b,width:r,height:s};break}if(w.type==="textarea"){w.type="textbox"}return[4,h(this.endpoint,this.templateId,w)];case 1:y=q.sent();console.log("Saved field",y);x.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[o]});q.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;if(!this.endpoint.session){return o(a,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(x.loading||!x.template){return o(a,null,o("verdocs-loader",null))}var i=__spreadArray([],x.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return o(a,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},o("div",{id:"verdocs-template-fields-toolbar"},z.map((function(e){return o("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){t.placing=e.id}}})}))),o("div",{class:"pages"},i.map((function(e){return o("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());P.style=E}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,n){function s(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,s&&(i=o[0]&2?s["return"]:o[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;if(s=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;s=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-4f63fae0.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js"],(function(e){"use strict";var t,r,n,s,i,o,a,l;return{setters:[function(e){t=e.r;r=e.c;n=e.h;s=e.H},function(e){i=e.V},function(e){o=e.s},function(e){a=e.l},function(e){l=e.S},function(){},function(){},function(){},function(){}],execute:function(){var d=function(e,t,r){return e.api.post("/templates/".concat(t,"/reminder/"),r).then((function(e){return e.data}))};var c=function(e,t,r,n){return e.api.put("/templates/".concat(t,"/reminder/").concat(r),n).then((function(e){return e.data}))};var u=function(e,t,r){return e.api.delete("/templates/".concat(t,"/reminder/").concat(r)).then((function(e){return e.data}))};var m='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var p=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.sdkError=r(this,"sdkError",7);this.endpoint=i.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();return[4,a(this.endpoint,this.templateId)];case 1:s.sent();this.loading=false;this.sendReminders=!!o.template.reminder_id;this.dirty=false;return[3,3];case 2:n=s.sent();console.log("[TEMPLATE REMINDERS] Error loading template",n);this.loading=false;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(r=n.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.sendReminders=!!o.template.reminder_id;this.dirty=false;(t=this.close)===null||t===void 0?void 0:t.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(n){switch(n.label){case 0:e.stopPropagation();if(!this.sendReminders)return[3,5];r={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};if(!!o.template.reminder_id)return[3,2];return[4,d(this.endpoint,this.templateId,r)];case 1:n.sent();return[3,4];case 2:return[4,c(this.endpoint,this.templateId,o.template.reminder_id,r)];case 3:n.sent();n.label=4;case 4:return[3,7];case 5:return[4,u(this.endpoint,this.templateId,o.template.reminder_id)];case 6:n.sent();n.label=7;case 7:this.dirty=false;(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return n(s,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!o.template){return n(s,{class:"empty"})}return n(s,null,n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("h5",null,"Reminders"),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),n("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.showPlanBlocker=true;t.target.checked=false}})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),n("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),n("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"buttons"},n("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&n("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());p.style=m}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,n){function s(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,s&&(i=o[0]&2?s["return"]:o[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,o[1])).done)return i;if(s=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;s=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];s=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-8e5d9f77.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js"],(function(e){"use strict";var t,r,n,s,i,o,a,l;return{setters:[function(e){t=e.r;r=e.c;n=e.h;s=e.H},function(e){i=e.V},function(e){o=e.s},function(e){a=e.l},function(e){l=e.S},function(){},function(){},function(){},function(){}],execute:function(){var d=function(e,t,r){return e.api.post("/templates/".concat(t,"/reminder/"),r).then((function(e){return e.data}))};var c=function(e,t,r,n){return e.api.put("/templates/".concat(t,"/reminder/").concat(r),n).then((function(e){return e.data}))};var u=function(e,t,r){return e.api.delete("/templates/".concat(t,"/reminder/").concat(r)).then((function(e){return e.data}))};var m='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var p=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.sdkError=r(this,"sdkError",7);this.endpoint=i.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();return[4,a(this.endpoint,this.templateId)];case 1:s.sent();this.loading=false;this.sendReminders=!!o.template.reminder_id;this.dirty=false;return[3,3];case 2:n=s.sent();console.log("[TEMPLATE REMINDERS] Error loading template",n);this.loading=false;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(r=n.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.sendReminders=!!o.template.reminder_id;this.dirty=false;(t=this.close)===null||t===void 0?void 0:t.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(n){switch(n.label){case 0:e.stopPropagation();if(!this.sendReminders)return[3,5];r={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};if(!!o.template.reminder_id)return[3,2];return[4,d(this.endpoint,this.templateId,r)];case 1:n.sent();return[3,4];case 2:return[4,c(this.endpoint,this.templateId,o.template.reminder_id,r)];case 3:n.sent();n.label=4;case 4:return[3,7];case 5:return[4,u(this.endpoint,this.templateId,o.template.reminder_id)];case 6:n.sent();n.label=7;case 7:this.dirty=false;(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return n(s,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!o.template){return n(s,{class:"empty"})}return n(s,null,n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("h5",null,"Reminders"),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),n("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.showPlanBlocker=true;t.target.checked=false}})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),n("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),n("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"buttons"},n("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&n("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());p.style=m}}}));
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function a(e){try{d(n.next(e))}catch(e){o(e)}}function s(e){try{d(n["throw"](e))}catch(e){o(e)}}function d(e){e.done?i(e.value):r(e.value).then(a,s)}d((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,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=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++;r=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];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,r=t.length,o;n<r;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-e12b7fbc.system.js","./p-e10dd0f7.system.js","./p-4f63fae0.system.js","./p-9a935949.system.js","./p-af2c2f79.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,i,n,r,o,a,s,d,c;return{setters:[function(e){t=e.r;i=e.c;n=e.h;r=e.H;o=e.a},function(e){a=e.c},function(e){s=e.f},function(e){d=e.V},function(e){c=e.t},function(){},function(){},function(){}],execute:function(){var l='verdocs-dropdown{font-family:"Barlow", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown .separator{border-top:1px solid #ffffff5f;height:1px;padding-top:5px;margin-top:5px}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}';var p='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>';var h=e("verdocs_dropdown",function(){function e(e){t(this,e);this.optionSelected=i(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=a(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,6]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var t=!(e.target==this.el||this.el.contains(e.target));if(t){this.hide()}};e.prototype.handleSelectOption=function(e,t){e.stopPropagation();this.optionSelected.emit(t);this.hide()};e.prototype.showDropdown=function(){var e,t;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(t=this.popper)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var t,i;if(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.localName)==="button"&&((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var t;return n(r,{class:{open:!!this.open}},n("button",{class:"arrow",innerHTML:p,"aria-label":"Open Menu",onClick:function(t){return e.toggleDropdown(t)},onBlur:function(t){return e.handleHideDropdown(t)},ref:function(t){return e.dropdownButton=t}}),n("div",{class:"items","aria-hidden":!this.open,ref:function(t){return e.dropdownMenu=t}},(t=this.options)===null||t===void 0?void 0:t.map((function(t){return t.label?n("button",{onClick:function(i){return e.handleSelectOption(i,t)},class:"option",disabled:t.disabled},t.label):n("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=l;var u="verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";var f=e("verdocs_envelope_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.endpoint=d.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,s(this.endpoint,this.envelopeId,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(c((function(t){for(var i=0,n=t;i<n.length;i++){var r=n[i];var o=r.contentRect.width;e.renderedWidth=o;e.renderedHeight=e.virtualHeight*(o/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var t="".concat(this.renderedHeight,"px");console.log("envelope page",this.envelopeId,this.documentId,this.pageNumber,this.pageDisplayUri);return n(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}}):e.pageDisplayUri?n("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):n("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());f.style=u}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function a(e){try{d(n.next(e))}catch(e){o(e)}}function s(e){try{d(n["throw"](e))}catch(e){o(e)}}function d(e){e.done?i(e.value):r(e.value).then(a,s)}d((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,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=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++;r=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];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,r=t.length,o;n<r;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-e12b7fbc.system.js","./p-e10dd0f7.system.js","./p-8e5d9f77.system.js","./p-9a935949.system.js","./p-af2c2f79.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,i,n,r,o,a,s,d,c;return{setters:[function(e){t=e.r;i=e.c;n=e.h;r=e.H;o=e.a},function(e){a=e.c},function(e){s=e.f},function(e){d=e.V},function(e){c=e.t},function(){},function(){},function(){}],execute:function(){var l='verdocs-dropdown{font-family:"Barlow", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown .separator{border-top:1px solid #ffffff5f;height:1px;padding-top:5px;margin-top:5px}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}';var p='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>';var h=e("verdocs_dropdown",function(){function e(e){t(this,e);this.optionSelected=i(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=a(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,6]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var t=!(e.target==this.el||this.el.contains(e.target));if(t){this.hide()}};e.prototype.handleSelectOption=function(e,t){e.stopPropagation();this.optionSelected.emit(t);this.hide()};e.prototype.showDropdown=function(){var e,t;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(t=this.popper)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var t,i;if(((t=e===null||e===void 0?void 0:e.target)===null||t===void 0?void 0:t.localName)==="button"&&((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var t;return n(r,{class:{open:!!this.open}},n("button",{class:"arrow",innerHTML:p,"aria-label":"Open Menu",onClick:function(t){return e.toggleDropdown(t)},onBlur:function(t){return e.handleHideDropdown(t)},ref:function(t){return e.dropdownButton=t}}),n("div",{class:"items","aria-hidden":!this.open,ref:function(t){return e.dropdownMenu=t}},(t=this.options)===null||t===void 0?void 0:t.map((function(t){return t.label?n("button",{onClick:function(i){return e.handleSelectOption(i,t)},class:"option",disabled:t.disabled},t.label):n("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=l;var u="verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";var f=e("verdocs_envelope_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.endpoint=d.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,s(this.endpoint,this.envelopeId,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(c((function(t){for(var i=0,n=t;i<n.length;i++){var r=n[i];var o=r.contentRect.width;e.renderedWidth=o;e.renderedHeight=e.virtualHeight*(o/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var t="".concat(this.renderedHeight,"px");console.log("envelope page",this.envelopeId,this.documentId,this.pageNumber,this.pageDisplayUri);return n(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}}):e.pageDisplayUri?n("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):n("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());f.style=u}}}));
@@ -1 +1 @@
1
- import{r as e,h as s}from"./p-7239d28d.js";import{V as r}from"./p-4e49fb12.js";import"./p-21603661.js";const c=class{constructor(s){e(this,s),this.endpoint=r.getDefault()}render(){return s("div",{class:"container"},s("verdocs-search-box",{endpoint:this.endpoint}),s("div",{class:"boxes"},s("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),s("verdocs-quick-functions",{endpoint:this.endpoint})))}};c.style='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';export{c as verdocs_search}
1
+ import{r as e,h as s}from"./p-7239d28d.js";import{V as r}from"./p-a93b745a.js";import"./p-21603661.js";const c=class{constructor(s){e(this,s),this.endpoint=r.getDefault()}render(){return s("div",{class:"container"},s("verdocs-search-box",{endpoint:this.endpoint}),s("div",{class:"boxes"},s("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),s("verdocs-quick-functions",{endpoint:this.endpoint})))}};c.style='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';export{c as verdocs_search}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((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,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i<r;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-9422b807.system.js","./p-e10dd0f7.system.js","./p-4f63fae0.system.js","./p-7efdefa3.system.js","./p-d50523fd.system.js","./p-9a935949.system.js","./p-1418d2ab.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var t,n,i,r,o,s,a,l,d,c,u,p,h,f,v,g,m,b,x,y,w;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.F},function(e){s=e.c;a=e.u;l=e.d;d=e.e},function(e){c=e.V},function(e){u=e.a;p=e.i},function(e){h=e.f},function(e){f=e.s;v=e.u;g=e.a;m=e.r;b=e.b},function(e){x=e.g;y=e.s},function(e){w=e.S},function(){},function(){},function(){},function(){}],execute:function(){var k=undefined&&undefined.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var I=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var S=function(e,t,n,i){return k(void 0,void 0,void 0,(function(){return I(this,(function(r){return[2,e.api.put("/envelopes/".concat(t,"/recipients/").concat(n),i).then((function(e){return e.data}))]}))}))};var F=function(e,t,n){return S(e,t,n,{action:"submit"})};var _=function(e,t,n){return S(e,t,n,{action:"decline"})};var N=function(e,t,n,i){return S(e,t,n,{action:"update",agreed:i})};var L=function(e,t,n){var i=new FormData;i.append("signature",n,t);return e.api.post("/signatures",i).then((function(e){return e.data}))};var D=function(e,t,n){var i=new FormData;i.append("initial",n,t);return e.api.post("/initials",i).then((function(e){return e.data}))};var A='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';var E=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var C=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var P=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.envelopeLoaded=n(this,"envelopeLoaded",7);this.envelopeUpdated=n(this,"envelopeUpdated",7);this.endpoint=null;this.recipientIndex=-1;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.recipient=null;this.signerToken=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.isDone=false;this.showDone=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document"}e.prototype.componentWillLoad=function(){this.endpoint=new c({sessionType:"signing"})};e.prototype.componentDidLoad=function(){return k(this,void 0,void 0,(function(){var e,t,n,i,r,o,a,l,d,c,u,p;var h=this;return I(this,(function(f){switch(f.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new w("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(n=this.sdkError)===null||n===void 0?void 0:n.emit(new w("[SIGN] Missing required inviteCode",500,""));return[2]}f.label=1;case 1:f.trys.push([1,4,,5]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,s(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode})];case 2:l=f.sent(),d=l.session,c=l.recipient,u=l.signerToken;console.log("[SIGN] Loaded signing session ".concat(d.email," / ").concat(d.profile_id));this.recipient=c;console.log("[SIGN] We are recipient",this.recipient);this.signerToken=u;this.endpoint.setToken(u);if(this.agreed){this.nextButtonLabel="Next"}return[4,x(this.endpoint,this.envelopeId)];case 3:f.sent();if(y.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=y.envelope.recipients.findIndex((function(e){return e.role_name==h.roleId}));if(this.recipientIndex>-1){this.recipient=y.envelope.recipients[this.recipientIndex];this.agreed=this.recipient.agreed;console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)}else{console.log("[SIGN] Could not find our recipient record",this.roleId,y.envelope.recipients)}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);(i=this.envelopeLoaded)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:y.envelope});return[3,5];case 4:p=f.sent();console.log("Error with signing session",p);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new w(p.message,(o=p.response)===null||o===void 0?void 0:o.status,(a=p.response)===null||a===void 0?void 0:a.data));return[3,5];case 5:return[2]}}))}))};e.prototype.handleClickAgree=function(){var e=this;N(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var t;e.nextButtonLabel="Next";e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:y.envelope,event:"agreed"})})).catch((function(t){var n,i,r;console.log("Update failure",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new w(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(r=t.response)===null||r===void 0?void 0:r.data))}))};e.prototype.handleOptionSelected=function(e){return k(this,void 0,void 0,(function(){var t,n,i,r,o,s,a;return I(this,(function(l){switch(l.label){case 0:s=e.detail.id;switch(s){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:y.envelope,event:"later"});return[3,7];case 2:window.alert("This feature will be available in an upcoming release.");(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:y.envelope,event:"claimed"});return[3,7];case 3:return[4,_(this.endpoint,this.envelopeId,this.roleId)];case 4:a=l.sent();console.log("Decline result",a);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:y.envelope,event:"declined"});this.isDone=true;return[3,7];case 5:window.print();(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:y.envelope,event:"printed"});return[3,7];case 6:f(this.endpoint,y.envelope,y.envelope.envelope_document_id).catch((function(e){console.log("Error downloading PDF",e)}));(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:y.envelope,event:"downloaded"});return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){this.recipient.fields.forEach((function(n){if(n.name===e){n.settings=t.settings;v(n)}}))};e.prototype.saveFieldChange=function(e,t){var n=this;a(this.endpoint,this.envelopeId,e,t).then((function(t){n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,r,o,s,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((r=(i=e.response)===null||i===void 0?void 0:i.data)===null||r===void 0?void 0:r.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.errorMessage="Signing session expired. Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=n.sdkError)===null||o===void 0?void 0:o.emit(new w(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return k(this,void 0,void 0,(function(){var n,i,r,o,s,s,a,c,u;var p=this;return I(this,(function(h){switch(h.label){case 0:n=t.target,i=n.value,r=n.checked;o=e.type;switch(o){case"textbox":return[3,1];case"checkbox_group":return[3,2];case"radio_button_group":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:i})];case 2:{s=e.settings.options.map((function(e){return{id:e.id,checked:t.target.checked}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=3;case 3:{s=e.settings.options.map((function(e){return{id:e.id,selected:t.target.value===e.id}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=4;case 4:return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:return[4,fetch(t.detail)];case 6:return[4,h.sent().blob()];case 7:a=h.sent();return[2,D(this.endpoint,"initial",a).then((function(t){return k(p,void 0,void 0,(function(){var n;return I(this,(function(i){switch(i.label){case 0:return[4,d(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 8:return[4,fetch(t.detail)];case 9:return[4,h.sent().blob()];case 10:c=h.sent();return[2,L(this.endpoint,"signature",c).then((function(t){return k(p,void 0,void 0,(function(){var n;return I(this,(function(i){switch(i.label){case 0:return[4,l(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 11:u=t.target.getAttribute("iso");return[2,this.saveFieldChange(e.name,{prepared:false,value:u})];case 12:console.log("Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("Unhandled field update",{value:i,checked:r},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldValid=function(e){var t,n,i,r,o,s,a;var l=e.required,d=l===void 0?false:l;var c=e.settings||{},h=c.result,f=h===void 0?"":h,v=c.value,g=v===void 0?"":v,m=c.base64,b=m===void 0?"":m;switch(e.type){case"textbox":switch(((t=e.settings)===null||t===void 0?void 0:t.validator)||""){case"email":return p(f);case"phone":return u(f);default:return!d||f!==""}case"signature":case"initial":return!d||b!=="";case"timestamp":return true;case"textarea":case"date":case"attachment":return!d||f!=="";case"dropdown":return!d||g!=="";case"checkbox_group":var x=(((i=(n=e.settings)===null||n===void 0?void 0:n.options)===null||i===void 0?void 0:i.filter((function(e){return e.checked})))||[]).length;return!d||x>=(((r=e.settings)===null||r===void 0?void 0:r.minimum_checked)||0)&&x<=(((o=e.settings)===null||o===void 0?void 0:o.maximum_checked)||999);case"radio_button_group":return!d||(((a=(s=e.settings)===null||s===void 0?void 0:s.options)===null||a===void 0?void 0:a.filter((function(e){return e.selected})))||[]).length>0;default:return false}};e.prototype.handleNext=function(){return k(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a,l,d;var c=this;return I(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);return[4,F(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);this.showDone=true;this.isDone=true;return[3,4];case 3:n=u.sent();console.log("Error submitting",n);return[3,4];case 4:return[2];case 5:i=this.recipient.fields.filter((function(e){return e.required}));r=i.findIndex((function(e){return e.name===c.focusedField}));o=r+1;if(o>=i.length){o=0}s=i[o];a=0;if(a<i.length&&["signature","initial"].includes(s.type)&&((e=s.settings)===null||e===void 0?void 0:e.result)==="signed"){a++;o++;if(o>=i.length){o=0}s=i[o]}if(a>=i.length){s=null}if(s){l=b(s);d=document.getElementById(l);d===null||d===void 0?void 0:d.focusField();this.focusedField=s.name}return[2]}}))}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.recipient.fields.filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";this.nextSubmits=true}else{console.log("[SIGN] Remaining invalid fields",t);this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,n,i){var r=this;var o;i.addEventListener("input",(function(){return r.checkRecipientFields()}));i.addEventListener("focusout",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.addEventListener("fieldChange",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.setAttribute("roleindex",n);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("initials",this.recipient?h(this.recipient.full_name):"");i.setAttribute("name",((o=this.recipient)===null||o===void 0?void 0:o.full_name)||"")};e.prototype.handlePageRendered=function(e){var t=this;var n=e.detail;var i=g(y.roleNames,this.recipient.role_name);var r=this.recipient.fields.filter((function(e){return e.page===n.pageNumber}));console.log("[SIGN] Page rendered, updating fields",{pageInfo:n,roleIndex:i,recipientFields:r});r.forEach((function(e){var r=m(e,n,i,{disabled:false,editable:false,draggable:false,done:t.isDone});if(!r){return}if(Array.isArray(r)){r.map((function(r){return t.attachFieldAttributes(n,e,i,r)}))}else{t.attachFieldAttributes(n,e,i,r)}}));y.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name})).forEach((function(e){var i=g(y.roleNames,e.role_name);var r=e.fields.filter((function(e){return e.page===n.pageNumber}));r.forEach((function(e){var r=m(e,n,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!r){return}if(r.setAttribute){r.setAttribute("roleindex",i);r.setAttribute("xScale",n.xScale);r.setAttribute("yScale",n.yScale)}}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;if(y.loading||!y.envelope){return i(r,null,i("verdocs-loader",null))}return i(r,{class:{agreed:this.agreed},"data-r":y.updateCount},!this.isDone&&!this.finishLater&&i("div",{class:"intro"},"Please review and act on these documents."),!this.isDone&&i("div",{class:"header"},!this.agreed?i("div",{class:"agree"},i("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:function(){return e.handleClickAgree()}})):i(o,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},y.envelope.name),i("div",{style:{flex:"1"}})),!this.isDone&&!this.finishLater&&i("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?E:C,onOptionSelected:function(t){return e.handleOptionSelected(t)}})),!this.isDone&&!this.agreed?i("div",{class:"cover"}):i("div",{style:{display:"none"}}),this.isDone?i("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)}}):i("div",{class:"document"},(y.envelope.documents||[]).map((function(t){var n=__spreadArray([],(t===null||t===void 0?void 0:t.pages)||[],true);n.sort((function(e,t){return e.sequence-t.sequence}));return i(o,null,n.map((function(n){return i("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:n.sequence,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&i("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.errorMessage&&i("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){return e.showDone=false}}))};return e}());P.style=A}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((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,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i<r;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-9422b807.system.js","./p-e10dd0f7.system.js","./p-8e5d9f77.system.js","./p-7efdefa3.system.js","./p-d50523fd.system.js","./p-9a935949.system.js","./p-1418d2ab.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var t,n,i,r,o,s,a,l,d,c,u,p,h,f,v,g,m,b,x,y,w;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.F},function(e){s=e.c;a=e.u;l=e.d;d=e.e},function(e){c=e.V},function(e){u=e.a;p=e.i},function(e){h=e.f},function(e){f=e.s;v=e.u;g=e.a;m=e.r;b=e.b},function(e){x=e.g;y=e.s},function(e){w=e.S},function(){},function(){},function(){},function(){}],execute:function(){var k=undefined&&undefined.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var I=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var S=function(e,t,n,i){return k(void 0,void 0,void 0,(function(){return I(this,(function(r){return[2,e.api.put("/envelopes/".concat(t,"/recipients/").concat(n),i).then((function(e){return e.data}))]}))}))};var F=function(e,t,n){return S(e,t,n,{action:"submit"})};var _=function(e,t,n){return S(e,t,n,{action:"decline"})};var N=function(e,t,n,i){return S(e,t,n,{action:"update",agreed:i})};var L=function(e,t,n){var i=new FormData;i.append("signature",n,t);return e.api.post("/signatures",i).then((function(e){return e.data}))};var D=function(e,t,n){var i=new FormData;i.append("initial",n,t);return e.api.post("/initials",i).then((function(e){return e.data}))};var A='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';var E=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var C=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var P=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.envelopeLoaded=n(this,"envelopeLoaded",7);this.envelopeUpdated=n(this,"envelopeUpdated",7);this.endpoint=null;this.recipientIndex=-1;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.recipient=null;this.signerToken=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.isDone=false;this.showDone=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document"}e.prototype.componentWillLoad=function(){this.endpoint=new c({sessionType:"signing"})};e.prototype.componentDidLoad=function(){return k(this,void 0,void 0,(function(){var e,t,n,i,r,o,a,l,d,c,u,p;var h=this;return I(this,(function(f){switch(f.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new w("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(n=this.sdkError)===null||n===void 0?void 0:n.emit(new w("[SIGN] Missing required inviteCode",500,""));return[2]}f.label=1;case 1:f.trys.push([1,4,,5]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,s(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode})];case 2:l=f.sent(),d=l.session,c=l.recipient,u=l.signerToken;console.log("[SIGN] Loaded signing session ".concat(d.email," / ").concat(d.profile_id));this.recipient=c;console.log("[SIGN] We are recipient",this.recipient);this.signerToken=u;this.endpoint.setToken(u);if(this.agreed){this.nextButtonLabel="Next"}return[4,x(this.endpoint,this.envelopeId)];case 3:f.sent();if(y.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=y.envelope.recipients.findIndex((function(e){return e.role_name==h.roleId}));if(this.recipientIndex>-1){this.recipient=y.envelope.recipients[this.recipientIndex];this.agreed=this.recipient.agreed;console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)}else{console.log("[SIGN] Could not find our recipient record",this.roleId,y.envelope.recipients)}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);(i=this.envelopeLoaded)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:y.envelope});return[3,5];case 4:p=f.sent();console.log("Error with signing session",p);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new w(p.message,(o=p.response)===null||o===void 0?void 0:o.status,(a=p.response)===null||a===void 0?void 0:a.data));return[3,5];case 5:return[2]}}))}))};e.prototype.handleClickAgree=function(){var e=this;N(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var t;e.nextButtonLabel="Next";e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:y.envelope,event:"agreed"})})).catch((function(t){var n,i,r;console.log("Update failure",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new w(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(r=t.response)===null||r===void 0?void 0:r.data))}))};e.prototype.handleOptionSelected=function(e){return k(this,void 0,void 0,(function(){var t,n,i,r,o,s,a;return I(this,(function(l){switch(l.label){case 0:s=e.detail.id;switch(s){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:y.envelope,event:"later"});return[3,7];case 2:window.alert("This feature will be available in an upcoming release.");(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:y.envelope,event:"claimed"});return[3,7];case 3:return[4,_(this.endpoint,this.envelopeId,this.roleId)];case 4:a=l.sent();console.log("Decline result",a);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:y.envelope,event:"declined"});this.isDone=true;return[3,7];case 5:window.print();(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:y.envelope,event:"printed"});return[3,7];case 6:f(this.endpoint,y.envelope,y.envelope.envelope_document_id).catch((function(e){console.log("Error downloading PDF",e)}));(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:y.envelope,event:"downloaded"});return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){this.recipient.fields.forEach((function(n){if(n.name===e){n.settings=t.settings;v(n)}}))};e.prototype.saveFieldChange=function(e,t){var n=this;a(this.endpoint,this.envelopeId,e,t).then((function(t){n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,r,o,s,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((r=(i=e.response)===null||i===void 0?void 0:i.data)===null||r===void 0?void 0:r.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.errorMessage="Signing session expired. Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=n.sdkError)===null||o===void 0?void 0:o.emit(new w(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return k(this,void 0,void 0,(function(){var n,i,r,o,s,s,a,c,u;var p=this;return I(this,(function(h){switch(h.label){case 0:n=t.target,i=n.value,r=n.checked;o=e.type;switch(o){case"textbox":return[3,1];case"checkbox_group":return[3,2];case"radio_button_group":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:i})];case 2:{s=e.settings.options.map((function(e){return{id:e.id,checked:t.target.checked}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=3;case 3:{s=e.settings.options.map((function(e){return{id:e.id,selected:t.target.value===e.id}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=4;case 4:return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:return[4,fetch(t.detail)];case 6:return[4,h.sent().blob()];case 7:a=h.sent();return[2,D(this.endpoint,"initial",a).then((function(t){return k(p,void 0,void 0,(function(){var n;return I(this,(function(i){switch(i.label){case 0:return[4,d(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 8:return[4,fetch(t.detail)];case 9:return[4,h.sent().blob()];case 10:c=h.sent();return[2,L(this.endpoint,"signature",c).then((function(t){return k(p,void 0,void 0,(function(){var n;return I(this,(function(i){switch(i.label){case 0:return[4,l(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 11:u=t.target.getAttribute("iso");return[2,this.saveFieldChange(e.name,{prepared:false,value:u})];case 12:console.log("Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("Unhandled field update",{value:i,checked:r},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldValid=function(e){var t,n,i,r,o,s,a;var l=e.required,d=l===void 0?false:l;var c=e.settings||{},h=c.result,f=h===void 0?"":h,v=c.value,g=v===void 0?"":v,m=c.base64,b=m===void 0?"":m;switch(e.type){case"textbox":switch(((t=e.settings)===null||t===void 0?void 0:t.validator)||""){case"email":return p(f);case"phone":return u(f);default:return!d||f!==""}case"signature":case"initial":return!d||b!=="";case"timestamp":return true;case"textarea":case"date":case"attachment":return!d||f!=="";case"dropdown":return!d||g!=="";case"checkbox_group":var x=(((i=(n=e.settings)===null||n===void 0?void 0:n.options)===null||i===void 0?void 0:i.filter((function(e){return e.checked})))||[]).length;return!d||x>=(((r=e.settings)===null||r===void 0?void 0:r.minimum_checked)||0)&&x<=(((o=e.settings)===null||o===void 0?void 0:o.maximum_checked)||999);case"radio_button_group":return!d||(((a=(s=e.settings)===null||s===void 0?void 0:s.options)===null||a===void 0?void 0:a.filter((function(e){return e.selected})))||[]).length>0;default:return false}};e.prototype.handleNext=function(){return k(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a,l,d;var c=this;return I(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);return[4,F(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);this.showDone=true;this.isDone=true;return[3,4];case 3:n=u.sent();console.log("Error submitting",n);return[3,4];case 4:return[2];case 5:i=this.recipient.fields.filter((function(e){return e.required}));r=i.findIndex((function(e){return e.name===c.focusedField}));o=r+1;if(o>=i.length){o=0}s=i[o];a=0;if(a<i.length&&["signature","initial"].includes(s.type)&&((e=s.settings)===null||e===void 0?void 0:e.result)==="signed"){a++;o++;if(o>=i.length){o=0}s=i[o]}if(a>=i.length){s=null}if(s){l=b(s);d=document.getElementById(l);d===null||d===void 0?void 0:d.focusField();this.focusedField=s.name}return[2]}}))}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.recipient.fields.filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";this.nextSubmits=true}else{console.log("[SIGN] Remaining invalid fields",t);this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,n,i){var r=this;var o;i.addEventListener("input",(function(){return r.checkRecipientFields()}));i.addEventListener("focusout",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.addEventListener("fieldChange",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.setAttribute("roleindex",n);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("initials",this.recipient?h(this.recipient.full_name):"");i.setAttribute("name",((o=this.recipient)===null||o===void 0?void 0:o.full_name)||"")};e.prototype.handlePageRendered=function(e){var t=this;var n=e.detail;var i=g(y.roleNames,this.recipient.role_name);var r=this.recipient.fields.filter((function(e){return e.page===n.pageNumber}));console.log("[SIGN] Page rendered, updating fields",{pageInfo:n,roleIndex:i,recipientFields:r});r.forEach((function(e){var r=m(e,n,i,{disabled:false,editable:false,draggable:false,done:t.isDone});if(!r){return}if(Array.isArray(r)){r.map((function(r){return t.attachFieldAttributes(n,e,i,r)}))}else{t.attachFieldAttributes(n,e,i,r)}}));y.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name})).forEach((function(e){var i=g(y.roleNames,e.role_name);var r=e.fields.filter((function(e){return e.page===n.pageNumber}));r.forEach((function(e){var r=m(e,n,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!r){return}if(r.setAttribute){r.setAttribute("roleindex",i);r.setAttribute("xScale",n.xScale);r.setAttribute("yScale",n.yScale)}}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;if(y.loading||!y.envelope){return i(r,null,i("verdocs-loader",null))}return i(r,{class:{agreed:this.agreed},"data-r":y.updateCount},!this.isDone&&!this.finishLater&&i("div",{class:"intro"},"Please review and act on these documents."),!this.isDone&&i("div",{class:"header"},!this.agreed?i("div",{class:"agree"},i("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:function(){return e.handleClickAgree()}})):i(o,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},y.envelope.name),i("div",{style:{flex:"1"}})),!this.isDone&&!this.finishLater&&i("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?E:C,onOptionSelected:function(t){return e.handleOptionSelected(t)}})),!this.isDone&&!this.agreed?i("div",{class:"cover"}):i("div",{style:{display:"none"}}),this.isDone?i("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)}}):i("div",{class:"document"},(y.envelope.documents||[]).map((function(t){var n=__spreadArray([],(t===null||t===void 0?void 0:t.pages)||[],true);n.sort((function(e,t){return e.sequence-t.sequence}));return i(o,null,n.map((function(n){return i("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:n.sequence,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&i("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.errorMessage&&i("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){return e.showDone=false}}))};return e}());P.style=A}}}));
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,H as r}from"./p-7239d28d.js";import{V as i}from"./p-4e49fb12.js";import{s as o}from"./p-a8b01bb9.js";import{l as a}from"./p-35c46590.js";import{S as n}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-8b2040be.js";import"./p-7291906c.js";import"./p-b28ef4bb.js";const l=class{constructor(s){e(this,s),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.endpoint=i.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1,this.loading=!0}async componentWillLoad(){var e,t,s;try{this.endpoint.loadSession(),await a(this.endpoint,this.templateId),this.loading=!1,this.sendReminders=!!o.template.reminder_id,this.dirty=!1}catch(r){console.log("[TEMPLATE REMINDERS] Error loading template",r),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new n(r.message,null===(t=r.response)||void 0===t?void 0:t.status,null===(s=r.response)||void 0===s?void 0:s.data))}}handleCancel(e){var t;e.stopPropagation(),this.sendReminders=!!o.template.reminder_id,this.dirty=!1,null===(t=this.close)||void 0===t||t.emit()}async handleSave(e){var t,s,r,i;if(e.stopPropagation(),this.sendReminders){const e={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};o.template.reminder_id?await function(e,t,s,r){return e.api.put("/templates/".concat(t,"/reminder/").concat(s),r).then((function(e){return e.data}))}(this.endpoint,this.templateId,o.template.reminder_id,e):await function(e,t,s){return e.api.post("/templates/".concat(t,"/reminder/"),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,e)}else await(s=this.endpoint,r=this.templateId,i=o.template.reminder_id,s.api.delete("/templates/".concat(r,"/reminder/").concat(i)).then((function(e){return e.data})));this.dirty=!1,null===(t=this.close)||void 0===t||t.emit()}render(){return this.endpoint.session?this.endpoint.session&&o.template?s(r,null,s("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},s("h5",null,"Reminders"),s("div",{class:"input-row"},s("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),s("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.showPlanBlocker=!0,e.target.checked=!1}})),s("div",{class:"input-row"},s("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),s("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value,disabled:!this.sendReminders})),s("div",{class:"input-row"},s("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),s("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value,disabled:!this.sendReminders})),s("div",{class:"buttons"},s("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),s("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&s("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):s(r,{class:"empty"}):s(r,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};l.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';export{l as verdocs_template_reminders}
1
+ import{r as e,c as t,h as s,H as r}from"./p-7239d28d.js";import{V as i}from"./p-a93b745a.js";import{s as o}from"./p-a8b01bb9.js";import{l as a}from"./p-35c46590.js";import{S as n}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-8b2040be.js";import"./p-7291906c.js";import"./p-b28ef4bb.js";const l=class{constructor(s){e(this,s),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.endpoint=i.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1,this.loading=!0}async componentWillLoad(){var e,t,s;try{this.endpoint.loadSession(),await a(this.endpoint,this.templateId),this.loading=!1,this.sendReminders=!!o.template.reminder_id,this.dirty=!1}catch(r){console.log("[TEMPLATE REMINDERS] Error loading template",r),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new n(r.message,null===(t=r.response)||void 0===t?void 0:t.status,null===(s=r.response)||void 0===s?void 0:s.data))}}handleCancel(e){var t;e.stopPropagation(),this.sendReminders=!!o.template.reminder_id,this.dirty=!1,null===(t=this.close)||void 0===t||t.emit()}async handleSave(e){var t,s,r,i;if(e.stopPropagation(),this.sendReminders){const e={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};o.template.reminder_id?await function(e,t,s,r){return e.api.put("/templates/".concat(t,"/reminder/").concat(s),r).then((function(e){return e.data}))}(this.endpoint,this.templateId,o.template.reminder_id,e):await function(e,t,s){return e.api.post("/templates/".concat(t,"/reminder/"),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,e)}else await(s=this.endpoint,r=this.templateId,i=o.template.reminder_id,s.api.delete("/templates/".concat(r,"/reminder/").concat(i)).then((function(e){return e.data})));this.dirty=!1,null===(t=this.close)||void 0===t||t.emit()}render(){return this.endpoint.session?this.endpoint.session&&o.template?s(r,null,s("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},s("h5",null,"Reminders"),s("div",{class:"input-row"},s("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),s("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.showPlanBlocker=!0,e.target.checked=!1}})),s("div",{class:"input-row"},s("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),s("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value,disabled:!this.sendReminders})),s("div",{class:"input-row"},s("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),s("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value,disabled:!this.sendReminders})),s("div",{class:"buttons"},s("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),s("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&s("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):s(r,{class:"empty"}):s(r,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};l.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';export{l as verdocs_template_reminders}
@@ -1 +1 @@
1
- import{r as e,c as o,h as t,H as a}from"./p-7239d28d.js";import{u as s}from"./p-b28ef4bb.js";import{V as l}from"./p-4e49fb12.js";import{s as i}from"./p-a8b01bb9.js";import{l as n}from"./p-35c46590.js";import{S as r}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-8b2040be.js";import"./p-7291906c.js";const m=class{constructor(t){e(this,t),this.close=o(this,"close",7),this.sdkError=o(this,"sdkError",7),this.endpoint=l.getDefault(),this.templateId="",this.name="",this.dirty=!1,this.loading=!0}async componentWillLoad(){var e,o,t;try{this.endpoint.loadSession(),await n(this.endpoint,this.templateId),this.loading=!1,this.name=i.template.name,this.dirty=!1}catch(a){console.log("[TEMPLATE NAME] Error loading template",a),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new r(a.message,null===(o=a.response)||void 0===o?void 0:o.status,null===(t=a.response)||void 0===t?void 0:t.data))}}handleCancel(e){var o;e.stopPropagation(),this.name=i.template.name,this.dirty=!1,console.log("Closing"),null===(o=this.close)||void 0===o||o.emit()}async handleSave(e){var o;e.stopPropagation(),await s(this.endpoint,this.templateId,{name:this.name}),i.template.name=this.name,this.dirty=!1,console.log("Closing"),null===(o=this.close)||void 0===o||o.emit()}render(){return this.endpoint.session?this.loading?t(a,{class:"loading"},t("verdocs-loader",null)):t(a,null,t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("label",{htmlFor:"verdocs-template-name"},"Template Name"),t("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=this.name!==i.template.name}}),t("div",{class:"buttons"},t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(a,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};m.style='verdocs-template-name{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-name.loading{min-height:300px;position:relative;display:block}verdocs-template-name.empty{display:none}verdocs-template-name form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-name form label{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-name form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-name form input:focus{outline:none}verdocs-template-name .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-name ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-name ::-moz-placeholder{color:#aaaaaa}verdocs-template-name :-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::placeholder{color:#aaaaaa}';export{m as verdocs_template_name}
1
+ import{r as e,c as o,h as t,H as a}from"./p-7239d28d.js";import{u as s}from"./p-b28ef4bb.js";import{V as l}from"./p-a93b745a.js";import{s as i}from"./p-a8b01bb9.js";import{l as n}from"./p-35c46590.js";import{S as r}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-8b2040be.js";import"./p-7291906c.js";const m=class{constructor(t){e(this,t),this.close=o(this,"close",7),this.sdkError=o(this,"sdkError",7),this.endpoint=l.getDefault(),this.templateId="",this.name="",this.dirty=!1,this.loading=!0}async componentWillLoad(){var e,o,t;try{this.endpoint.loadSession(),await n(this.endpoint,this.templateId),this.loading=!1,this.name=i.template.name,this.dirty=!1}catch(a){console.log("[TEMPLATE NAME] Error loading template",a),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new r(a.message,null===(o=a.response)||void 0===o?void 0:o.status,null===(t=a.response)||void 0===t?void 0:t.data))}}handleCancel(e){var o;e.stopPropagation(),this.name=i.template.name,this.dirty=!1,console.log("Closing"),null===(o=this.close)||void 0===o||o.emit()}async handleSave(e){var o;e.stopPropagation(),await s(this.endpoint,this.templateId,{name:this.name}),i.template.name=this.name,this.dirty=!1,console.log("Closing"),null===(o=this.close)||void 0===o||o.emit()}render(){return this.endpoint.session?this.loading?t(a,{class:"loading"},t("verdocs-loader",null)):t(a,null,t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("label",{htmlFor:"verdocs-template-name"},"Template Name"),t("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=this.name!==i.template.name}}),t("div",{class:"buttons"},t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(a,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};m.style='verdocs-template-name{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-name.loading{min-height:300px;position:relative;display:block}verdocs-template-name.empty{display:none}verdocs-template-name form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-name form label{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-name form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-name form input:focus{outline:none}verdocs-template-name .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-name ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-name ::-moz-placeholder{color:#aaaaaa}verdocs-template-name :-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-name ::placeholder{color:#aaaaaa}';export{m as verdocs_template_name}