@verdocs/web-sdk 4.2.95 → 4.2.97

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 (165) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +6 -8
  3. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
  6. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +29 -45
  7. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-preview_9.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +9 -9
  11. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-sign.cjs.entry.js +26 -8
  13. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
  14. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-view.cjs.entry.js +8 -1
  19. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  20. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +3 -0
  21. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +47 -32
  22. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
  23. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
  24. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +27 -9
  25. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +10 -2
  26. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
  27. package/dist/collection/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.css +3 -0
  28. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
  29. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
  30. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.css +12 -0
  31. package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +19 -2
  32. package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.css +12 -0
  33. package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +0 -2
  34. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +15 -3
  35. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +6 -2
  36. package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.css +12 -0
  37. package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +2 -1
  38. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.css +12 -0
  39. package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.css +12 -0
  40. package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.css +12 -0
  41. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.css +12 -0
  42. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.css +12 -0
  43. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +12 -0
  44. package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
  45. package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +1 -1
  46. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +6 -8
  47. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
  48. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +8 -8
  49. package/dist/collection/components/templates/verdocs-template-sender/verdocs-template-sender.js +1 -1
  50. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  51. package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
  52. package/dist/components/verdocs-envelope-document-page2.js +1 -1
  53. package/dist/components/verdocs-envelope-recipient-summary2.js +1 -1
  54. package/dist/components/verdocs-envelopes-list.js +6 -6
  55. package/dist/components/verdocs-field-attachment2.js +4 -1
  56. package/dist/components/verdocs-field-checkbox2.js +1 -3
  57. package/dist/components/verdocs-field-date2.js +7 -3
  58. package/dist/components/verdocs-field-dropdown2.js +3 -2
  59. package/dist/components/verdocs-field-initial2.js +1 -1
  60. package/dist/components/verdocs-field-payment.js +1 -1
  61. package/dist/components/verdocs-field-radio2.js +1 -1
  62. package/dist/components/verdocs-field-signature2.js +1 -1
  63. package/dist/components/verdocs-field-textarea2.js +1 -1
  64. package/dist/components/verdocs-field-textbox2.js +1 -1
  65. package/dist/components/verdocs-quick-functions.js +1 -1
  66. package/dist/components/verdocs-search-tabs.js +1 -1
  67. package/dist/components/verdocs-sign.js +27 -9
  68. package/dist/components/verdocs-status-indicator2.js +2 -2
  69. package/dist/components/verdocs-template-card.js +1 -1
  70. package/dist/components/verdocs-template-document-page2.js +1 -1
  71. package/dist/components/verdocs-template-field-properties2.js +6 -8
  72. package/dist/components/verdocs-template-fields2.js +1 -1
  73. package/dist/components/verdocs-template-role-properties2.js +8 -8
  74. package/dist/components/verdocs-template-sender2.js +1 -1
  75. package/dist/components/verdocs-template-star2.js +1 -1
  76. package/dist/components/verdocs-template-tags.js +1 -1
  77. package/dist/components/verdocs-upload-dialog2.js +11 -32
  78. package/dist/components/verdocs-view2.js +10 -2
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/esm/verdocs-checkbox_5.entry.js +6 -8
  81. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  82. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  83. package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
  84. package/dist/esm/verdocs-field-attachment_13.entry.js +29 -45
  85. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  86. package/dist/esm/verdocs-preview_9.entry.js +1 -1
  87. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  88. package/dist/esm/verdocs-radio-button_3.entry.js +9 -9
  89. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  90. package/dist/esm/verdocs-sign.entry.js +27 -9
  91. package/dist/esm/verdocs-status-indicator.entry.js +2 -2
  92. package/dist/esm/verdocs-template-card.entry.js +1 -1
  93. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  94. package/dist/esm/verdocs-template-star.entry.js +1 -1
  95. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  96. package/dist/esm/verdocs-view.entry.js +8 -1
  97. package/dist/esm/verdocs-web-sdk.js +1 -1
  98. package/dist/esm-es5/loader.js +1 -1
  99. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  100. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  102. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  103. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
  106. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  107. package/dist/esm-es5/verdocs-radio-button_3.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  117. package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +7 -0
  118. package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +1 -0
  119. package/dist/types/components/fields/verdocs-field-attachment/verdocs-field-attachment.d.ts +7 -2
  120. package/dist/types/components/fields/verdocs-field-date/verdocs-field-date.d.ts +0 -1
  121. package/dist/types/components.d.ts +14 -2
  122. package/dist/verdocs-web-sdk/p-0bc31629.system.entry.js +1 -0
  123. package/dist/verdocs-web-sdk/{p-be7fa476.system.entry.js → p-14fb80a8.system.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-35ca7ec1.system.entry.js → p-15f82220.system.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-42a3802e.system.entry.js → p-18188ae5.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-0eeaf11d.system.entry.js → p-1dd6db40.system.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-e331a1ad.system.entry.js → p-1ff3c951.system.entry.js} +1 -1
  128. package/dist/verdocs-web-sdk/{p-ba8fc3fc.entry.js → p-2419de34.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
  130. package/dist/verdocs-web-sdk/p-2cfcd218.entry.js +1 -0
  131. package/dist/verdocs-web-sdk/{p-dc307e81.entry.js → p-380541d9.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-85aaa229.entry.js → p-3b05c5b6.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/{p-b743f246.system.entry.js → p-3dc96a64.system.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/{p-d80305c3.entry.js → p-45be2439.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-d55b1490.entry.js → p-473cf485.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/p-4efb0a48.system.entry.js +1 -0
  137. package/dist/verdocs-web-sdk/p-594187ce.system.entry.js +1 -0
  138. package/dist/verdocs-web-sdk/{p-a764d4cd.system.entry.js → p-5fb5ef82.system.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/{p-c9b00253.system.entry.js → p-6178e8b2.system.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/{p-27d94737.entry.js → p-65596be9.entry.js} +1 -1
  141. package/dist/verdocs-web-sdk/{p-96276131.system.entry.js → p-71783a91.system.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-9d383fad.system.entry.js → p-7b10ad30.system.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/{p-f1a49237.system.entry.js → p-8302dcf5.system.entry.js} +1 -1
  144. package/dist/verdocs-web-sdk/{p-5b511018.entry.js → p-87357bff.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/p-ae084df7.system.entry.js +1 -0
  146. package/dist/verdocs-web-sdk/p-b7b1ad8f.entry.js +1 -0
  147. package/dist/verdocs-web-sdk/{p-4e97fc5c.entry.js → p-b7bccf83.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-aad40b41.entry.js → p-ba2d11a0.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-3514f40b.entry.js → p-cc4f4682.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-4475c970.system.entry.js → p-cf2ed386.system.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-44dad7e0.entry.js → p-db59b650.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-c6549055.entry.js → p-e5435d6f.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-6bcdfa4f.system.entry.js → p-e826be1f.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-2a0d1b6e.entry.js → p-e86d6c0e.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/p-ecadacd2.entry.js +1 -0
  156. package/dist/verdocs-web-sdk/{p-2531fcad.entry.js → p-fed8d8f2.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  158. package/package.json +2 -2
  159. package/dist/verdocs-web-sdk/p-185dac12.entry.js +0 -1
  160. package/dist/verdocs-web-sdk/p-5c0c042d.system.entry.js +0 -1
  161. package/dist/verdocs-web-sdk/p-61860777.entry.js +0 -1
  162. package/dist/verdocs-web-sdk/p-8b707999.system.entry.js +0 -1
  163. package/dist/verdocs-web-sdk/p-8ef13092.entry.js +0 -1
  164. package/dist/verdocs-web-sdk/p-bf698049.system.entry.js +0 -1
  165. package/dist/verdocs-web-sdk/p-fe1b68ae.system.entry.js +0 -1
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t))e[t]=i[t]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,n,r){function t(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):t(e.value).then(s,l)}c((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,t,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(i){return c([e,i])}}function c(l){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(r=1,t&&(o=l[0]&2?t["return"]:l[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;if(t=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;t=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(e){l=[6,e];t=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-d3b5c957.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-38778553.system.js","./p-f5064e0c.system.js"],(function(e){"use strict";var i,n,r,t,o,s,l,c,a,u,d,p;return{setters:[function(e){i=e.r;n=e.c;r=e.h;t=e.H},function(e){o=e.VerdocsEndpoint;s=e.getInPersonLink;l=e.formatFullName;c=e.getRecipientsWithActions;a=e.recipientCanAct},function(e){u=e.g},function(e){d=e.V},function(e){p=e.S},function(){},function(){}],execute:function(){var f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var m=f;var x=e("verdocs_envelope_recipient_link",function(){function e(e){i(this,e);this.next=n(this,"next",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,r,t,o,s,l;var c=this;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,u(this.endpoint,this.envelopeId,true)];case 1:s.store=a.sent();this.loading=false;this.gettingLink=true;this.recipient=(n=(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients)===null||n===void 0?void 0:n.find((function(e){return e.role_name===c.roleName}));this.getLink(this.recipient);return[3,3];case 2:l=a.sent();console.log("[RECIPIENT_LINK] Error loading envelope",l);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new p(l.message,(t=l.response)===null||t===void 0?void 0:t.status,(o=l.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return d("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);d("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var i=this;this.gettingLink=true;s(this.endpoint,e.envelope_id,e.role_name).then((function(e){i.gettingLink=false;i.link=e.link})).catch((function(e){i.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);d("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return r(t,null)}var i=l(this.recipient);return r(t,null,r("div",{class:"summary-content"},r("h1",{class:"summary-title"},"In-Person Signing Link"),r("div",{class:"summary-rows"},r("div",{class:"summary-recipient"},r("div",{class:"role-name"},this.recipient.role_name),r("div",{class:"role-details"},r("div",{class:"role-info"},r("div",{class:"role-full-name"},i," (",this.recipient.email||this.recipient.phone,")"),!this.link&&r("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&r("div",{class:"link-wrapper"},r("div",{class:"link"},this.link),r("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),r("div",{class:"buttons"},r("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}());x.style=m;var v='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var h=v;var g=e("verdocs_envelope_recipient_summary",function(){function e(e){i(this,e);this.another=n(this,"another",7);this.view=n(this,"view",7);this.next=n(this,"next",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.endpoint=o.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,r,t;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}r=this;return[4,u(this.endpoint,this.envelopeId,true)];case 1:r.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:t=o.sent();console.log("[RECIPIENTS] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(n=t.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,i;(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.handleAnother=function(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var i=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var n;console.warn("[RECIPIENTS] Error copying to clipboard",e);(n=i.sdkError)===null||n===void 0?void 0:n.emit(e)}))};e.prototype.getLink=function(e){var i;var n=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(i={},i[e.role_name]=true,i));s(this.endpoint,e.envelope_id,e.role_name).then((function(i){var r,t;n.gettingLinks=__assign(__assign({},n.gettingLinks),(r={},r[e.role_name]=false,r));n.links=__assign(__assign({},n.links),(t={},t[e.role_name]=i.link,t));n.copyLink(i.link)})).catch((function(i){var r;var t;n.gettingLinks=__assign(__assign({},n.gettingLinks),(r={},r[e.role_name]=false,r));console.log("[RECIPIENTS] Error getting link",i);(t=n.sdkError)===null||t===void 0?void 0:t.emit(i)}))};e.prototype.render=function(){var e=this;var i,n;if(this.loading){return r(t,null)}return r(t,null,r("div",{class:"summary-content"},r("h1",{class:"summary-title"},"Recipient Summary"),r("div",{class:"summary-rows"},(((n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.recipients)||[]).map((function(i){var n=c(e.store.state);var t=a(i,n);var o=e.links[i.role_name];var s=e.gettingLinks[i.role_name];var u=l(i);return r("div",{class:"summary-recipient"},r("div",{class:"role-name"},i.role_name),r("div",{class:"role-details"},r("div",{class:"role-info"},r("div",{class:"role-full-name"},u," (",i.email||i.phone,")"),t&&!o&&r("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(i)}})),o&&r("div",{class:"link-wrapper"},r("div",{class:"link"},o),r("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&r("div",{class:"buttons"},this.canSendAnother&&r("verdocs-button",{size:"small",label:"Send Another",onClick:function(i){return e.handleAnother(i)}}),this.canView&&r("verdocs-button",{size:"small",label:"View Now",onClick:function(i){return e.handleView(i)}}),this.canDone&&r("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}());g.style=h}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t))e[t]=i[t]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,n,r){function t(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function l(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):t(e.value).then(s,l)}c((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,t,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(i){return c([e,i])}}function c(l){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(r=1,t&&(o=l[0]&2?t["return"]:l[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;if(t=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;t=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(e){l=[6,e];t=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-d3b5c957.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-38778553.system.js","./p-f5064e0c.system.js"],(function(e){"use strict";var i,n,r,t,o,s,l,c,a,u,d,p;return{setters:[function(e){i=e.r;n=e.c;r=e.h;t=e.H},function(e){o=e.VerdocsEndpoint;s=e.getInPersonLink;l=e.formatFullName;c=e.getRecipientsWithActions;a=e.recipientCanAct},function(e){u=e.g},function(e){d=e.V},function(e){p=e.S},function(){},function(){}],execute:function(){var f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var m=f;var x=e("verdocs_envelope_recipient_link",function(){function e(e){i(this,e);this.next=n(this,"next",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,r,t,o,s,l;var c=this;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,u(this.endpoint,this.envelopeId,true)];case 1:s.store=a.sent();this.loading=false;this.gettingLink=true;this.recipient=(n=(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients)===null||n===void 0?void 0:n.find((function(e){return e.role_name===c.roleName}));this.getLink(this.recipient);return[3,3];case 2:l=a.sent();console.log("[RECIPIENT_LINK] Error loading envelope",l);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new p(l.message,(t=l.response)===null||t===void 0?void 0:t.status,(o=l.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return d("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);d("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var i=this;this.gettingLink=true;s(this.endpoint,e.envelope_id,e.role_name).then((function(e){i.gettingLink=false;i.link=e.link})).catch((function(e){i.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);d("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return r(t,null)}var i=l(this.recipient);return r(t,null,r("div",{class:"summary-content"},r("h1",{class:"summary-title"},"In-Person Signing Link"),r("div",{class:"summary-rows"},r("div",{class:"summary-recipient"},r("div",{class:"role-name"},this.recipient.role_name),r("div",{class:"role-details"},r("div",{class:"role-info"},r("div",{class:"role-full-name"},i," (",this.recipient.email||this.recipient.phone,")"),!this.link&&r("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&r("div",{class:"link-wrapper"},r("div",{class:"link"},this.link),r("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),r("div",{class:"buttons"},r("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}());x.style=m;var v='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;border-radius:4px;-ms-flex-align:center;align-items:center;white-space:nowrap;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var h=v;var g=e("verdocs_envelope_recipient_summary",function(){function e(e){i(this,e);this.another=n(this,"another",7);this.view=n(this,"view",7);this.next=n(this,"next",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.endpoint=o.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n,r,t;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}r=this;return[4,u(this.endpoint,this.envelopeId,true)];case 1:r.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:t=o.sent();console.log("[RECIPIENTS] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(n=t.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,i;(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.handleAnother=function(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var i=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var n;console.warn("[RECIPIENTS] Error copying to clipboard",e);(n=i.sdkError)===null||n===void 0?void 0:n.emit(e)}))};e.prototype.getLink=function(e){var i;var n=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(i={},i[e.role_name]=true,i));s(this.endpoint,e.envelope_id,e.role_name).then((function(i){var r,t;n.gettingLinks=__assign(__assign({},n.gettingLinks),(r={},r[e.role_name]=false,r));n.links=__assign(__assign({},n.links),(t={},t[e.role_name]=i.link,t));n.copyLink(i.link)})).catch((function(i){var r;var t;n.gettingLinks=__assign(__assign({},n.gettingLinks),(r={},r[e.role_name]=false,r));console.log("[RECIPIENTS] Error getting link",i);(t=n.sdkError)===null||t===void 0?void 0:t.emit(i)}))};e.prototype.render=function(){var e=this;var i,n;if(this.loading){return r(t,null)}return r(t,null,r("div",{class:"summary-content"},r("h1",{class:"summary-title"},"Recipient Summary"),r("div",{class:"summary-rows"},(((n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.recipients)||[]).map((function(i){var n=c(e.store.state);var t=a(i,n);var o=e.links[i.role_name];var s=e.gettingLinks[i.role_name];var u=l(i);return r("div",{class:"summary-recipient"},r("div",{class:"role-name"},i.role_name),r("div",{class:"role-details"},r("div",{class:"role-info"},r("div",{class:"role-full-name"},u," (",i.email||i.phone,")"),t&&!o&&r("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(i)}})),o&&r("div",{class:"link-wrapper"},r("div",{class:"link"},o),r("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&r("div",{class:"buttons"},this.canSendAnother&&r("verdocs-button",{size:"small",label:"Send Another",onClick:function(i){return e.handleAnother(i)}}),this.canView&&r("verdocs-button",{size:"small",label:"View Now",onClick:function(i){return e.handleView(i)}}),this.canDone&&r("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}());g.style=h}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function o(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?r(t.value):i(t.value).then(o,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1];a=s;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(s);break}if(a[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=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-59073837.system.js","@verdocs/js-sdk"],(function(t){"use strict";var e,r,n,i,a,o;return{setters:[function(t){e=t.r;r=t.c;n=t.h;i=t.H},function(t){a=t.VerdocsEndpoint;o=t.toggleStar}],execute:function(){var s='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var c=s;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=r(this,"starChange",7);this.sdkError=r(this,"sdkError",7);this.endpoint=a.getDefault();this.template=undefined;this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;o(a.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return n(i,{key:"5582f84ac65a8fe90250a8b739859244cabb53ca"},n("div",{key:"3766be1b6d584d8306e1bcb54006e877f1d3f486",class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?l:f,onClick:function(e){return t.toggle(e)}}),n("div",{key:"fef0f2f338b176d1e219f5a2a1b3a932a1c404cd",class:"count"},this.template.star_counter||"--"))};return t}());u.style=c}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function a(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n["throw"](t))}catch(t){o(t)}}function c(t){t.done?r(t.value):i(t.value).then(a,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,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(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk"],(function(t){"use strict";var e,r,n,i,o,a;return{setters:[function(t){e=t.r;r=t.c;n=t.h;i=t.H},function(t){o=t.VerdocsEndpoint;a=t.toggleStar}],execute:function(){var s='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var c=s;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=r(this,"starChange",7);this.sdkError=r(this,"sdkError",7);this.endpoint=o.getDefault();this.template=undefined;this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;a(o.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return n(i,{key:"0bfc2a29037c8753d08852eb5b0d0e7ccae821fc"},n("div",{key:"16441206c390f010d43fddf52df556f503f2309b",class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?l:f,onClick:function(e){return t.toggle(e)}}),n("div",{key:"0b7ed0bba53a2e243c47195efcb09934d056d479",class:"count"},this.template.star_counter||"--"))};return t}());u.style=c}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function n(e){try{c(o.next(e))}catch(e){a(e)}}function s(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(n,s)}c((o=o.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:[]},o,r,a,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return c([e,t])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(i=0)),i)try{if(o=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=t.call(e,i)}catch(e){s=[6,e];r=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-701b9cbd.system.js","./p-a1bff034.system.js","./p-2cf67caa.system.js","./p-c8a15cb7.system.js","./p-38778553.system.js","./p-f5064e0c.system.js"],(function(e){"use strict";var t,i,o,r,a,n,s,c,l,d,f,b,u,p;return{setters:[function(e){t=e.r;i=e.h;o=e.H;r=e.c},function(e){a=e.VerdocsEndpoint;n=e.updateTemplateRole;s=e.deleteTemplateRole;c=e.updateTemplate},function(e){l=e.g;d=e.u;f=e.d},function(e){b=e.g},function(e){u=e.g},function(e){p=e.S},function(){},function(){}],execute:function(){var h='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-radio-button{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:20px;height:20px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-radio-button.disabled{opacity:0.5}verdocs-radio-button input[type=radio]{position:absolute;opacity:0}verdocs-radio-button input[type=radio]+label:before{content:"";background:#f5f5fa;border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:16px;height:16px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-radio-button input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-radio-button input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-radio-button input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#a0a0d0;background:#a0a0d0}verdocs-radio-button input[type=radio]+label:empty:before{margin-right:0}verdocs-radio-button.required input[type=radio]+label:before{border:1px solid #cc0000}verdocs-radio-button.hide{display:none}verdocs-radio-button.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var v=h;var m=e("verdocs_radio_button",function(){function e(e){t(this,e);this.checked=false;this.name="";this.value="";this.disabled=false}e.prototype.render=function(){return i(o,{key:"5801bf76825c1860f057081f9d109ce7303e259f",class:{disabled:this.disabled}},i("input",{key:"d802308dd23acad10d1cb3811d3b7cea4ea6cf78",type:"radio",value:this.value,name:this.name,id:"verdocs-radio-button-".concat(this.name,"-").concat(this.value),checked:this.checked,disabled:this.disabled}),i("label",{key:"020374b5c732d1d7f6e4ccaaa04397869468f297",htmlFor:"verdocs-radio-button-".concat(this.name,"-").concat(this.value)}))};return e}());m.style=v;var x='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-role-properties{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var y=x;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var k=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.delete=r(this,"delete",7);this.sdkError=r(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=a.getDefault();this.templateId="";this.roleName="";this.sender="everyone";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,r,a;var n=this;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLE_PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");return[2]}o=this;return[4,u(this.endpoint,this.templateId,false)];case 1:o.templateStore=s.sent();this.fieldStore=b(this.templateId);this.roleStore=l(this.templateId);r=this.roleStore.state.roles.find((function(e){return e.name===n.roleName}));if(r){this.name=r.name;this.type=r.type;this.first_name=r.first_name;this.last_name=r.last_name;this.email=r.email;this.phone=r.phone;this.delegator=r.delegator;console.log("[ROLE_PROPERTIES] Editing role",r)}return[3,3];case 2:a=s.sent();console.log("[ROLE_PROPERTIES Error with preview session",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var i;e.stopPropagation();var o=this.roleStore.state.roles.find((function(e){return e.name===t.roleName}));if(o){this.name=o.name;this.type=o.type;this.first_name=o.first_name;this.last_name=o.last_name;this.email=o.email;this.phone=o.phone;this.delegator=o.delegator}this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();this.saving=true;n(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(i){console.log("[ROLE_PROPERTIES] Update result",e);this.saving=false;this.dirty=false;d(this.roleStore,this.roleName,e);(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}))}))})).catch((function(e){console.log("[ROLE_PROPERTIES Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){s(this.endpoint,this.templateId,this.roleName).then((function(){var e;f(t.roleStore,t.roleName);(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("[ROLE_PROPERTIES Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.fieldStore.get("fields").some((function(t){return t.role_name===e.roleName}));return i(o,{key:"59806a550ecdcadb44188158d43917a857a1c581"},i("div",{key:"328bd7cf00bbc00c795c732c5494a34b73ffed25",class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},i("div",{key:"a51e08957a956ddc34be5ac3a2f1fecb1aa11d26",class:"dialog"},i("form",{key:"ae5ed7fd87bf98f76628ff194a8bc8cc0d60a3a8",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("verdocs-text-input",{key:"742811865bb156bb0ea3f6a527407ca28e2cdb27",id:"verdocs-role-name",label:"Role Name",value:this.name,autocomplete:"off",disabled:t,helpText:t?"This role has fields assigned and can no longer be renamed.":"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Role Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i("div",{key:"1a7646891c32b1375370f20dbcde0e9863a987c1",class:"row"},i("div",{key:"b05853d94b907d8e9710bc961c6ed892f0a50b78",class:"input-label"},"Type:"),i("verdocs-select-input",{key:"0b9e5030ad916961ce7c889d09ec2d8a7ba70844",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),i("verdocs-help-icon",{key:"be2f8dacc8d6543cbd5cb0a2ad78c8b7417a92b2",text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{key:"4161563f3aa582f83f1be7a7279b900eacefae4e",id:"verdocs-recipient-first",label:"First Name",value:this.first_name,autocomplete:"off",helpText:"The recipient's first name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"First Name...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),i("verdocs-text-input",{key:"daaf9cf6dd00022d231f154bbec073a5c858223d",id:"verdocs-recipient-first",label:"Last Name",value:this.last_name,autocomplete:"off",helpText:"The recipient's last name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Last Name...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}),i("verdocs-text-input",{key:"bffae611f096f491cf717cb613791963f7b973e5",id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),i("verdocs-text-input",{key:"fa2ab182503c829309749400635760154d4ded8d",id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),i("div",{key:"a733c84c9b16b86ae11e58724ad0d3763034f1d7",class:"row"},i("div",{key:"1d61a4dea085ae470c91762793d4d55f6a748f49",class:"input-label"},"May Delegate:"),i("div",{key:"ab41f3486b83096eb6079df6ce0fbe1997679f91",class:"checkbox-wrapper"},i("verdocs-checkbox",{key:"666a913c220c43643f6927352e491abce2a5c32d",checked:this.delegator,onInput:function(t){e.delegator=t.target.checked;e.dirty=true}})),i("verdocs-help-icon",{key:"6b4f501240e59c57596c386fe2e2c6a574869aa3",text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{key:"7113b351cbe42d2c8a47bc21612e1c69295ca8d1",class:"buttons"},i("button",{key:"0a733f9abf1610eed76d67135c920495ec8ca4e0",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:g}),i("div",{key:"9c23b3eacbc3f73deb230db806280e62c36de7d0",style:{flex:"1"}}),i("verdocs-button",{key:"3bab71062f1124f7245f3cacecd91fd686170573",size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{key:"9cfaad66e8d0b2e519730db0938f7c18ae734997",size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());k.style=y;var w='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-sender{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var _=w;var E=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.sdkError=r(this,"sdkError",7);this.store=null;this.endpoint=a.getDefault();this.templateId="";this.sender="everyone";this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,r,a,n;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SENDER] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,u(this.endpoint,this.templateId,false)];case 1:a.store=s.sent();this.sender=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.sender;return[3,3];case 2:n=s.sent();console.log("[SENDER] Error with preview session",n);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new p(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(r=n.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){this.saving=true;c(this.endpoint,this.templateId,{sender:e}).then((function(i){var o;console.log("Update result",i);if((o=t.store)===null||o===void 0?void 0:o.state){t.store.state.sender=e}t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return i(o,{key:"583b2822a283803869ebcacf60f865600f645738"},i("div",{key:"723126afa987bac429f8497939b6a13be46e1244",class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},i("div",{key:"2350183ba9d4c59451ba4e3d7fa08c92759db60d",class:"dialog"},i("div",{key:"8db80acbfca0145d2d4665f6cb04735c4a3436bc",class:"options"},i("div",{key:"4a88ee34834e36e80ce2c05e24eb4e984665c333",class:"option"},i("verdocs-radio-button",{key:"a8da7866a0b7257bc787058543a94f567d644d94",name:"template-sender",value:"everyone",checked:this.sender==="everyone",onInput:function(){return e.handleSelectSetting("everyone")}}),i("div",{key:"a6b32902e30c15ef340727b03d52ed87ef13900f",class:"description"},i("div",{key:"ddcf96cbc5370f10b514afea7a41411dfaffe218",class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{key:"1525e73c29533e0057ffd4fcc1c1b3010184d45e",text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{key:"66f6b45c1d2b80c55325c81f248eba886b06855c",class:"option"},i("verdocs-radio-button",{key:"cc494768308e4aef5885717655d1faf1ba0a6b1c",name:"template-sender",value:"everyone_as_creator",checked:this.sender==="everyone_as_creator",onInput:function(){return e.handleSelectSetting("everyone_as_creator")}}),i("div",{key:"e3d21ae499705f4307bf7c994655a5644ffebac8",class:"description"},i("div",{key:"21d2da2e103c1f3d1826558a58cc86c66d60a3d3",class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{key:"7262453c9e28f03740f63a281d7de8b43a062741",text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{key:"f8b60a5edbab1530a59a73066a63ef762f9d12fe",class:"option"},i("verdocs-radio-button",{key:"a4e089f56a257c57f07e1d485bb50ecd43cdcea2",name:"template-sender",value:"organization_member",checked:this.sender==="organization_member",onInput:function(){return e.handleSelectSetting("organization_member")}}),i("div",{key:"4d7b5cc7cf355a4c02aac414c59a8bde21fb9061",class:"description"},i("div",{key:"78594270d43642f97986aca41cce45d2bfcb3736",class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{key:"f7bb0d253f7885843a3874021c52a5b8f9c3a0b7",text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{key:"6a9e882ad416698e0cb2d2572df52fb0fffe676f",class:"option"},i("verdocs-radio-button",{key:"608bf8ac1683a0abdf98c36c8bca8a3e9c090654",name:"template-sender",value:"organization_member_as_creator",checked:this.sender==="organization_member_as_creator",onInput:function(){return e.handleSelectSetting("organization_member_as_creator")}}),i("div",{key:"9c1a266de9e38e2c5b71f9c2ec36bd53abdcd6a2",class:"description"},i("div",{key:"59137d5f47fa5883385481ac4f8cced890417c29",class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{key:"ac690134009fdd7c5d25137abec812b7806947f6",text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{key:"f79871b2b293333b6fa9e776101b854fa7e81d73",class:"option"},i("verdocs-radio-button",{key:"ba911a4d9a096b7517949f045fb9aa7a73a52bc1",name:"template-sender",value:"creator",checked:this.sender==="creator",onInput:function(){return e.handleSelectSetting("creator")}}),i("div",{key:"1de101824b2afa9cb0d27225e609ebe492c0e4c0",class:"description"},i("div",{key:"d42b859c7090d265855ddaff8b3671fc6120a5a9",class:"name"},"Me"),i("verdocs-help-icon",{key:"b3b4c246b7d47c3aa8f62a3c9ab9bafc51934267",text:"Only I can use this template."})))),i("div",{key:"cb13b928cbf5c6649e7fda0a3ba801f46b25ef11",class:"buttons"},i("verdocs-button",{key:"1f66a641e30ee392b72b0a7615dd6a8cd72e528a",label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());E.style=_}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function n(e){try{c(o.next(e))}catch(e){a(e)}}function s(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(n,s)}c((o=o.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:[]},o,r,a,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return c([e,t])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(i=0)),i)try{if(o=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=t.call(e,i)}catch(e){s=[6,e];r=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-701b9cbd.system.js","./p-a1bff034.system.js","./p-2cf67caa.system.js","./p-c8a15cb7.system.js","./p-38778553.system.js","./p-f5064e0c.system.js"],(function(e){"use strict";var t,i,o,r,a,n,s,c,d,l,f,b,u,p;return{setters:[function(e){t=e.r;i=e.h;o=e.H;r=e.c},function(e){a=e.VerdocsEndpoint;n=e.updateTemplateRole;s=e.deleteTemplateRole;c=e.updateTemplate},function(e){d=e.g;l=e.u;f=e.d},function(e){b=e.g},function(e){u=e.g},function(e){p=e.S},function(){},function(){}],execute:function(){var h='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-radio-button{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:20px;height:20px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-radio-button.disabled{opacity:0.5}verdocs-radio-button input[type=radio]{position:absolute;opacity:0}verdocs-radio-button input[type=radio]+label:before{content:"";background:#f5f5fa;border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:16px;height:16px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-radio-button input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-radio-button input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-radio-button input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#a0a0d0;background:#a0a0d0}verdocs-radio-button input[type=radio]+label:empty:before{margin-right:0}verdocs-radio-button.required input[type=radio]+label:before{border:1px solid #cc0000}verdocs-radio-button.hide{display:none}verdocs-radio-button.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var v=h;var m=e("verdocs_radio_button",function(){function e(e){t(this,e);this.checked=false;this.name="";this.value="";this.disabled=false}e.prototype.render=function(){return i(o,{key:"5801bf76825c1860f057081f9d109ce7303e259f",class:{disabled:this.disabled}},i("input",{key:"d802308dd23acad10d1cb3811d3b7cea4ea6cf78",type:"radio",value:this.value,name:this.name,id:"verdocs-radio-button-".concat(this.name,"-").concat(this.value),checked:this.checked,disabled:this.disabled}),i("label",{key:"020374b5c732d1d7f6e4ccaaa04397869468f297",htmlFor:"verdocs-radio-button-".concat(this.name,"-").concat(this.value)}))};return e}());m.style=v;var x='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-role-properties{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var y=x;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var k=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.delete=r(this,"delete",7);this.sdkError=r(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=a.getDefault();this.templateId="";this.roleName="";this.sender="everyone";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,r,a;var n=this;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLE_PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");return[2]}o=this;return[4,u(this.endpoint,this.templateId,false)];case 1:o.templateStore=s.sent();this.fieldStore=b(this.templateId);this.roleStore=d(this.templateId);r=this.roleStore.state.roles.find((function(e){return e.name===n.roleName}));if(r){this.name=r.name;this.type=r.type;this.first_name=r.first_name;this.last_name=r.last_name;this.email=r.email;this.phone=r.phone;this.delegator=r.delegator;console.log("[ROLE_PROPERTIES] Editing role",r)}return[3,3];case 2:a=s.sent();console.log("[ROLE_PROPERTIES Error with preview session",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var i;e.stopPropagation();var o=this.roleStore.state.roles.find((function(e){return e.name===t.roleName}));if(o){this.name=o.name;this.type=o.type;this.first_name=o.first_name;this.last_name=o.last_name;this.email=o.email;this.phone=o.phone;this.delegator=o.delegator}this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();this.saving=true;n(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(i){console.log("[ROLE_PROPERTIES] Update result",e);this.saving=false;this.dirty=false;l(this.roleStore,this.roleName,e);(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}))}))})).catch((function(e){console.log("[ROLE_PROPERTIES Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){s(this.endpoint,this.templateId,this.roleName).then((function(){var e;f(t.roleStore,t.roleName);(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("[ROLE_PROPERTIES Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.fieldStore.get("fields").some((function(t){return t.role_name===e.roleName}));return i(o,{key:"6e6cb2bb3c63490f4179d5bf784563d9c576357b"},i("div",{key:"33740faf11b300119982418adda618eeec9ed218",class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},i("div",{key:"a9529d639d6de02027512439adf6107ee2a3c4d0",class:"dialog"},i("form",{key:"ace2ebd0ab4d75f3a6f23243a559b7fe44a4a1da",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("verdocs-text-input",{key:"e1880fa8e7cc392cc0c5adc5060c6133e867e878",id:"verdocs-role-name",label:"Role Name",value:this.name,autocomplete:"off",disabled:t,helpText:t?"This role has fields assigned and can no longer be renamed.":"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Role Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i("div",{key:"18a69fe4e7a2171adf92a258071d5e792dc7c9c4",class:"row"},i("div",{key:"c89480026dd7b6181c2c173af6132ef957843602",class:"input-label"},"Type:"),i("verdocs-select-input",{key:"087d26e755588ca924b007338ec4fc46859b0225",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),i("verdocs-help-icon",{key:"9aa100ef1af757d7affca4d14ae2a1c6fe55bc61",text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{key:"8c5f330906aed90c1fcda842ce17b94db927c600",id:"verdocs-recipient-first",label:"First Name",value:this.first_name,autocomplete:"off",helpText:"The recipient's first name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"First Name...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),i("verdocs-text-input",{key:"3a331607503a0eb57bdc618a160e70dff1c1a8ee",id:"verdocs-recipient-first",label:"Last Name",value:this.last_name,autocomplete:"off",helpText:"The recipient's last name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Last Name...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}),i("verdocs-text-input",{key:"85c7d12bbbe606c7d95043cb6050339ee82c3e28",id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),i("verdocs-text-input",{key:"01a543ee70419c8ada3affb7da7d800222ee69e7",id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),i("div",{key:"00d4b434f9a140163ceb950c79ee081516ec3c8b",class:"row"},i("div",{key:"8a86970a08bf555662726f8f949c873b3915640e",class:"input-label"},"May Delegate:"),i("div",{key:"50c6ce67bcb1363aff57d0d2700c1939f06f21ff",class:"checkbox-wrapper"},i("verdocs-checkbox",{key:"d060961d1b527120ec5600642933b71b5619784f",checked:this.delegator,onInput:function(t){e.delegator=t.target.checked;e.dirty=true}})),i("verdocs-help-icon",{key:"5b5d456123d0dd9084fbd5a139ca99ddd4b3788f",text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{key:"767efd207da665b5da38a30242b039422d1e5fe2",class:"buttons"},i("button",{key:"d65e7a9fd071cb9de2c4fb791d071911935656ec",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:g}),i("div",{key:"45a18048294d452f96c54c36588091600e4296d0",style:{flex:"1"}}),i("verdocs-button",{key:"2ca9a7bf95418813684cc68a96446cfd30fe72f9",size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{key:"ec996494a3f9dfecdb4652a4ce2ef7cb058dfcfb",size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());k.style=y;var w='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-sender{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var _=w;var E=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.sdkError=r(this,"sdkError",7);this.store=null;this.endpoint=a.getDefault();this.templateId="";this.sender="everyone";this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,r,a,n;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SENDER] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,u(this.endpoint,this.templateId,false)];case 1:a.store=s.sent();this.sender=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.sender;return[3,3];case 2:n=s.sent();console.log("[SENDER] Error with preview session",n);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new p(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(r=n.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){this.saving=true;c(this.endpoint,this.templateId,{sender:e}).then((function(i){var o;console.log("Update result",i);if((o=t.store)===null||o===void 0?void 0:o.state){t.store.state.sender=e}t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return i(o,{key:"f68de757047cf08e13ca4b5f33e28c0af48fc216"},i("div",{key:"6d1d7f7fc65b8ec2112dc7c33750cfce5d4f3e8c",class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},i("div",{key:"4d89b066209259145a82549e572b558fc11cf884",class:"dialog"},i("div",{key:"fe42cd60ee5ed150318152a21db7bd0bfd41bb6f",class:"options"},i("div",{key:"5e6193483c37781365aabccef51a67ff56ff937e",class:"option"},i("verdocs-radio-button",{key:"ea3ece13bab53d052186194b9708c7a072335103",name:"template-sender",value:"everyone",checked:this.sender==="everyone",onInput:function(){return e.handleSelectSetting("everyone")}}),i("div",{key:"785b66f5cc26579d6caafc85924c5ad7e3966d40",class:"description"},i("div",{key:"d82d392c83f757ff7f23d5e78bfd68ab97eb0f52",class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{key:"34f2139c6e1f4cf01bb497066fea7000837c3ee9",text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{key:"1b20cb65e1ed7bdf317e6af82b5b445f988e98c8",class:"option"},i("verdocs-radio-button",{key:"236a72f8c58ab2a2ad52824c698b8e0367881c3c",name:"template-sender",value:"everyone_as_creator",checked:this.sender==="everyone_as_creator",onInput:function(){return e.handleSelectSetting("everyone_as_creator")}}),i("div",{key:"5e23b141d9d9c126ac2c82ab30bcb279b73d4793",class:"description"},i("div",{key:"f9b6deeff27abb6ae722cc8b70aa662c400108b7",class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{key:"03982e3624ba4e858fd478e8dc5c8ee0a1b98f3f",text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{key:"db8d9acd7b3a06a6f09a5fb03ca8403dc82db00c",class:"option"},i("verdocs-radio-button",{key:"a12f063f0ff6e06eb5aaff35b815621e5b06d8b3",name:"template-sender",value:"organization_member",checked:this.sender==="organization_member",onInput:function(){return e.handleSelectSetting("organization_member")}}),i("div",{key:"acfba148b6c50fac0a3d72a6f46b3a5f144d3986",class:"description"},i("div",{key:"3120e3ed05176dfc34ce482d359274755dcb55dc",class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{key:"0e78f7bc767c863d53ed113c52584252f893ecc4",text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{key:"ac2f56ad77d0d4aeef9d311e7b44a5c9d19a74c7",class:"option"},i("verdocs-radio-button",{key:"433e69e8fb00ee8676ec46657ad5c19df76ddd6c",name:"template-sender",value:"organization_member_as_creator",checked:this.sender==="organization_member_as_creator",onInput:function(){return e.handleSelectSetting("organization_member_as_creator")}}),i("div",{key:"ff50c7fee92e6cce3e488b4a4df2274ada44b11a",class:"description"},i("div",{key:"de3fd4b8f985e7f348a3743fb7431d4f9ad66598",class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{key:"257a87eb54dbfceb8edbeffca997fe787916ddc8",text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{key:"f9223854c2616a85d057b7d7208e82ba85413556",class:"option"},i("verdocs-radio-button",{key:"c74d08475eb3601c21e75916366908c15c652ba8",name:"template-sender",value:"creator",checked:this.sender==="creator",onInput:function(){return e.handleSelectSetting("creator")}}),i("div",{key:"9af51dd805406c23c9fc081d284d661e16f69f0a",class:"description"},i("div",{key:"16b852696b984473a5dbfc09345dffbc6f3e0a40",class:"name"},"Me"),i("verdocs-help-icon",{key:"104c0ec597a028b30dcc0d6e00a0bcac0433b0c9",text:"Only I can use this template."})))),i("div",{key:"ce8b9f36df6c8beab9305dec9d3acc64f5369d07",class:"buttons"},i("verdocs-button",{key:"722df3e64f41b5c8aee45d66eaa13b33711bba5c",label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());E.style=_}}}));
@@ -1 +1 @@
1
- import{r as t,c as e,h as r,H as s}from"./p-5207d80c.js";import{VerdocsEndpoint as a,toggleStar as o}from"@verdocs/js-sdk";const i=class{constructor(r){t(this,r),this.starChange=e(this,"starChange",7),this.sdkError=e(this,"sdkError",7),this.endpoint=a.getDefault(),this.template=void 0,this.updating=!1}async componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[TEMPLATES] Must be authenticated")}toggle(t){t.stopPropagation(),this.updating=!0,o(a.getDefault(),this.template.id).then((t=>{this.updating=!1,this.template.star_counter=t.star_counter,this.starChange.emit({templateId:this.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((t=>{this.updating=!1,console.log("[STAR] Error toggling template star",t.message),this.sdkError.emit(t)}))}render(){return r(s,{key:"5582f84ac65a8fe90250a8b739859244cabb53ca"},r("div",{key:"3766be1b6d584d8306e1bcb54006e877f1d3f486",class:"star "+(this.updating?"updating":""),innerHTML:this.template.star_counter?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>',onClick:t=>this.toggle(t)}),r("div",{key:"fef0f2f338b176d1e219f5a2a1b3a932a1c404cd",class:"count"},this.template.star_counter||"--"))}};i.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';export{i as verdocs_template_star}
1
+ import{r as t,c as e,h as r,H as s}from"./p-5207d80c.js";import{VerdocsEndpoint as a,toggleStar as o}from"@verdocs/js-sdk";const i=class{constructor(r){t(this,r),this.starChange=e(this,"starChange",7),this.sdkError=e(this,"sdkError",7),this.endpoint=a.getDefault(),this.template=void 0,this.updating=!1}async componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[TEMPLATES] Must be authenticated")}toggle(t){t.stopPropagation(),this.updating=!0,o(a.getDefault(),this.template.id).then((t=>{this.updating=!1,this.template.star_counter=t.star_counter,this.starChange.emit({templateId:this.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((t=>{this.updating=!1,console.log("[STAR] Error toggling template star",t.message),this.sdkError.emit(t)}))}render(){return r(s,{key:"0bfc2a29037c8753d08852eb5b0d0e7ccae821fc"},r("div",{key:"16441206c390f010d43fddf52df556f503f2309b",class:"star "+(this.updating?"updating":""),innerHTML:this.template.star_counter?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>',onClick:t=>this.toggle(t)}),r("div",{key:"0b7ed0bba53a2e243c47195efcb09934d056d479",class:"count"},this.template.star_counter||"--"))}};i.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';export{i as verdocs_template_star}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,a,n){function i(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,d){function s(e){try{l(n.next(e))}catch(e){d(e)}}function o(e){try{l(n["throw"](e))}catch(e){d(e)}}function l(e){e.done?a(e.value):i(e.value).then(s,o)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},n,i,d,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(a=0)),a)try{if(n=1,i&&(d=o[0]&2?i["return"]:o[0]?i["throw"]||((d=i["return"])&&d.call(i),0):i.next)&&!(d=d.call(i,o[1])).done)return d;if(i=0,d)o=[o[0]&2,d.value];switch(o[0]){case 0:case 1:d=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;i=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(d=a.trys,d=d.length>0&&d[d.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!d||o[1]>d[0]&&o[1]<d[3])){a.label=o[1];break}if(o[0]===6&&a.label<d[1]){a.label=d[1];d=o;break}if(d&&a.label<d[2]){a.label=d[2];a.ops.push(o);break}if(d[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];i=0}finally{n=d=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var a,n,i;return{setters:[function(t){a=t.p;n=t.b;e("setNonce",t.s)},function(e){i=e.g}],execute:function(){var e=this;var d=function(){var e=t.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return a(n)};d().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n(JSON.parse('[["p-281ce405.system",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-be7fa476.system",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-9ddaf09d.system",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-bf698049.system",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["p-143f1bdf.system",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["p-b055bec1.system",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[32],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["p-d754b3d1.system",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["p-bbdc81d5.system",[[4,"verdocs-dialog"]]],["p-5c0c042d.system",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-c9b00253.system",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["p-4bf58d00.system",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-b743f246.system",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-00828859.system",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-a764d4cd.system",[[0,"verdocs-template-card",{"template":[16]}]]],["p-6bcdfa4f.system",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-4dcd1005.system",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-b426caa8.system",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-be2431ed.system",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-fe1b68ae.system",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32]}]]],["p-4475c970.system",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-0eeaf11d.system",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-42a3802e.system",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["p-35ca7ec1.system",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["p-cea2766d.system",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-39453c48.system",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["p-286a97a7.system",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-f1a49237.system",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["p-9d383fad.system",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}]]],["p-a5b56406.system",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kbaMethod":[32],"pinCode":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-bb315de2.system",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-9b3bebba.system",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["p-e331a1ad.system",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}],[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-17930b47.system",[[0,"verdocs-loader"]]],["p-d971f8f0.system",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["p-8b707999.system",[[0,"verdocs-field-attachment",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"selectedFile":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[513],"fieldname":[513],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[513],"fieldname":[513],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"draggingOver":[32],"selectedFiles":[32]}]]],["p-96276131.system",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"templateStore":[32],"roleStore":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}]]]]'),t)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,a,n){function i(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,d){function s(e){try{l(n.next(e))}catch(e){d(e)}}function o(e){try{l(n["throw"](e))}catch(e){d(e)}}function l(e){e.done?a(e.value):i(e.value).then(s,o)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},n,i,d,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(a=0)),a)try{if(n=1,i&&(d=o[0]&2?i["return"]:o[0]?i["throw"]||((d=i["return"])&&d.call(i),0):i.next)&&!(d=d.call(i,o[1])).done)return d;if(i=0,d)o=[o[0]&2,d.value];switch(o[0]){case 0:case 1:d=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;i=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(d=a.trys,d=d.length>0&&d[d.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!d||o[1]>d[0]&&o[1]<d[3])){a.label=o[1];break}if(o[0]===6&&a.label<d[1]){a.label=d[1];d=o;break}if(d&&a.label<d[2]){a.label=d[2];a.ops.push(o);break}if(d[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];i=0}finally{n=d=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var a,n,i;return{setters:[function(t){a=t.p;n=t.b;e("setNonce",t.s)},function(e){i=e.g}],execute:function(){var e=this;var d=function(){var e=t.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return a(n)};d().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n(JSON.parse('[["p-281ce405.system",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-14fb80a8.system",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-9ddaf09d.system",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-ae084df7.system",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["p-143f1bdf.system",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["p-b055bec1.system",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[32],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["p-d754b3d1.system",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["p-bbdc81d5.system",[[4,"verdocs-dialog"]]],["p-4efb0a48.system",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-6178e8b2.system",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["p-4bf58d00.system",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-3dc96a64.system",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-00828859.system",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-5fb5ef82.system",[[0,"verdocs-template-card",{"template":[16]}]]],["p-e826be1f.system",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-4dcd1005.system",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-b426caa8.system",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-be2431ed.system",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-0bc31629.system",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32],"showLoadError":[32]}]]],["p-cf2ed386.system",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-1dd6db40.system",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-18188ae5.system",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["p-15f82220.system",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["p-cea2766d.system",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-39453c48.system",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["p-286a97a7.system",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-8302dcf5.system",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["p-7b10ad30.system",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}]]],["p-a5b56406.system",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kbaMethod":[32],"pinCode":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-bb315de2.system",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-9b3bebba.system",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["p-1ff3c951.system",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}],[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-17930b47.system",[[0,"verdocs-loader"]]],["p-d971f8f0.system",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["p-594187ce.system",[[0,"verdocs-field-attachment",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"selectedFile":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[513],"fieldname":[513],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[513],"fieldname":[513],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"existingFile":[16],"draggingOver":[32],"selectedFiles":[32]}]]],["p-71783a91.system",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"templateStore":[32],"roleStore":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}]]]]'),t)]}}))}))}))}}}));
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as t,H as s,F as o}from"./p-5207d80c.js";import{VerdocsEndpoint as n,startSigningSession as a,envelopeRecipientAgree as l,envelopeRecipientDecline as r,updateEnvelopeField as d,createSignature as c,updateEnvelopeFieldSignature as h,createInitials as p,updateEnvelopeFieldInitials as u,isValidPhone as g,isValidEmail as v,envelopeRecipientSubmit as m,uploadEnvelopeFieldAttachment as x,deleteEnvelopeFieldAttachment as f,formatFullName as b,fullNameToInitials as w,integerSequence as y}from"@verdocs/js-sdk";import{a as k,u as S,r as N,g as I}from"./p-ca7ef3ff.js";import{a as G}from"./p-ff64786a.js";import{V as F}from"./p-04c07b7b.js";import{S as z}from"./p-fd97809c.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-edaec1b6.js";import"./p-83317d11.js";const D=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],R=[{id:"print",label:"Print"},{id:"download",label:"Download"}],j=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.recipientIndex=-1,this.endpoint=null,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.headerTargetId=null,this.envelope=null,this.roleNames=[],this.sortedRecipients=[],this.recipient=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.submitting=!1,this.isDone=!1,this.showDone=!1,this.showLoadError=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint||(console.log("[SIGN] Creating signing endpoint"),this.endpoint=new n({sessionType:"signing"}))}async componentDidLoad(){var e,i,t,s,o,n,l;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{envelope:e,recipient:i}=await a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);console.log("[SIGN] Loaded signing session",e,i),this.recipient=i,this.envelope=e,this.agreed&&(this.nextButtonLabel="Next"),G(this.envelope),this.sortedRecipients=[...this.envelope.recipients],this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence)),this.roleNames=this.sortedRecipients.map((e=>e.role_name)),this.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=this.roleNames.findIndex((e=>e==this.roleId)),this.recipientIndex>-1?(this.recipient=this.sortedRecipients[this.recipientIndex],this.agreed=this.recipient.agreed):console.warn("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),this.checkRecipientFields(),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope})}catch(e){console.log("[SIGN] Error with signing session",e),null===(o=this.sdkError)||void 0===o||o.emit(new z(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(l=e.response)||void 0===l?void 0:l.data)),this.showLoadError=!0}else null===(t=this.sdkError)||void 0===t||t.emit(new z("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new z("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new z("[SIGN] Missing required envelopId",500,""))}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-sign-header");e&&i&&(console.log("[SIGN] Moving header"),i.remove(),e.append(i))}handleClickAgree(){this.submitting=!0,l(this.endpoint,this.envelopeId,this.roleId,!0).then((()=>{var e;this.nextButtonLabel="Next",this.recipient.agreed=!0,this.submitting=!1,this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("[SIGN] Update failure",e),this.submitting=!1,null===(i=this.sdkError)||void 0===i||i.emit(new z(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":F("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=!0;const e=await r(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"}),this.submitting=!1,this.isDone=!0}break;case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":{const e=this.envelope.documents.find((e=>"attachment"===e.type));e&&(k(this.endpoint,this.envelope,e.id).catch((e=>{console.log("[SIGN] Error downloading PDF",e)})),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"}))}}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e),this.getRecipientFields().forEach((t=>{t.name===e&&(t.value=i.value,t.settings=i.settings,S(t),this.checkRecipientFields())}))}saveFieldChange(e,i){console.log("[SIGN] updateRecipientFieldValue",e),d(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,a;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(o=this.sdkError)||void 0===o||o.emit(new z(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(a=e.response)||void 0===a?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox":case"radio":return this.saveFieldChange(e.name,{prepared:!1,value:i.target.checked});case"dropdown":return console.log("Saving dropdown",e.name,i.detail),this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":if(!i.detail)return;const o=await(await fetch(i.detail)).blob();return p(this.endpoint,"initial",o).then((async i=>{const t=await u(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":if(!i.detail)return;const n=await(await fetch(i.detail)).blob();return c(this.endpoint,"signature",n).then((async i=>{console.log("Signature update result",i);const t=await h(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)})).catch((e=>{console.warn("[SIGN] Error updating signature",e)}));case"date":const{formattedDate:a}=i.detail;if(a)return this.saveFieldChange(e.name,{prepared:!1,value:a});break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:t,checked:s},e)}}isFieldFilled(e){const{value:i=""}=e;switch(e.type){case"textbox":switch(e.validator||""){case"email":return v(i);case"phone":return g(i);default:return""!==i}case"signature":return"signed"===i;case"initial":return"initialed"===i;case"timestamp":return!0;case"textarea":case"date":return""!==i;case"attachment":return"attached"===i;case"dropdown":return""!==i;case"checkbox":return"true"===i;case"radio":return e.group?this.getRecipientFields().filter((i=>i.group===e.group)).some((e=>"true"===e.value)):"true"===e.value;default:return!1}}isFieldValid(e){return!e.required||this.isFieldFilled(e)}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>"timestamp"!==e.type));return e.sort(((e,i)=>{const t=e.x||0,s=i.x||0,o=i.y||0,n=Math.floor((e.y||0)/5),a=Math.floor(o/5);return a!==n?a-n:t-s})),e}async handleNext(){var e,i;if(this.nextSubmits){try{null===(e=document.getElementById("air-datepicker-global-container"))||void 0===e||e.remove(),this.submitting=!0;const i=await m(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",i),this.recipient.status="submitted",this.showDone=!0,this.isDone=!0}catch(e){console.log("[SIGN] Error submitting",e)}return void(this.submitting=!1)}const t=this.getSortedFillableFields().filter((e=>!this.isFieldFilled(e)));t.sort(((e,i)=>{const t=e.x||0,s=i.x||0,o=i.y||0,n=Math.floor((e.y||0)/5),a=Math.floor(o/5);return a!==n?a-n:t-s}));let s=t.findIndex((e=>e.name===this.focusedField))+1;s>=t.length&&(s=0);let o=t[s],n=0;if(n<t.length&&["signature","initial"].includes(o.type)&&"signed"===(null===(i=o.settings)||void 0===i?void 0:i.result)&&(n++,s++,s>=t.length&&(s=0),o=t[s]),n>=t.length&&(o=null),o){const e=I(o),i=document.getElementById(e);null==i||i.focusField(),null==i||i.scrollTo({behavior:"smooth",top:0}),this.focusedField=o.name}}getRecipientFields(){return this.envelope.fields.filter((e=>e.role_name===this.recipient.role_name))}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits||(this.nextSubmits=!0)):(console.log("[SIGN] Invalid fields remaining",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t){t.addEventListener("input",(e=>{console.log("onInput",e.target.type,e.target.name),"radio"===e.target.type||"checkbox"===e.target.type?this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())):this.checkRecipientFields()})),t.addEventListener("attached",(async e=>{console.log("[SIGN] onAttached",e.detail,e.target.value);const t=await x(this.endpoint,this.envelopeId,i.name,e.detail);console.log("upload result",t),this.checkRecipientFields()})),t.addEventListener("remove",(e=>{console.log("[SIGN] onRemoved",e.detail,e.target.value),f(this.endpoint,this.envelopeId,i.name,null).then((e=>{console.log("[SIGN] Deleted attachment",e)})).catch((e=>console.log("[SIGN] Error deleting attachment",e)))})),t.addEventListener("focusout",(e=>{"dropdown"!==i.type&&this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))})),t.addEventListener("fieldChange",(e=>{this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))})),t.setAttribute("templateid",this.envelope.template_id),t.setAttribute("fieldname",i.name),t.setAttribute("page",e.pageNumber),t.setAttribute("xScale",e.xScale),t.setAttribute("yScale",e.yScale);const s=b(this.recipient);t.setAttribute("initials",w(s)),t.setAttribute("name",s)}handlePageRendered(e){const i=e.detail,t=this.getSortedFillableFields();console.log("Recipient fields",t),t.forEach(((e,t)=>{if(e.page!==i.pageNumber)return;const s=N(e,i,{disabled:!1,editable:!1,draggable:!1,done:this.isDone},t);s&&(Array.isArray(s)?s.map((t=>this.attachFieldAttributes(i,e,t))):this.attachFieldAttributes(i,e,s))})),this.sortedRecipients.filter((e=>e.role_name!==this.recipient.role_name&&("invited"===e.status||"opened"===e.status||"pending"===e.status))).forEach((()=>{this.getRecipientFields().filter((e=>e.page===i.pageNumber)).forEach((e=>{const t=N(e,i,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});t&&(Array.isArray(t)?t.map((t=>this.attachFieldAttributes(i,e,t))):this.attachFieldAttributes(i,e,t))}))})),this.checkRecipientFields()}render(){return this.showLoadError?t(s,null,t("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:()=>{window.location.reload()}})):this.envelope?this.isDone?t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${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:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null))):t(s,{class:{agreed:this.agreed}},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}}),this.agreed&&!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),this.agreed&&t("verdocs-dropdown",{options:this.isDone||this.finishLater?R:D,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",{class:"document",style:{paddingTop:"15px"}},this.agreed?(this.envelope.documents||[]).map((e=>{const i=y(1,e.pages);return t(o,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))})):t("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${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:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null)),!this.agreed&&t("div",{class:"cover"},t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:()=>this.handleClickAgree()}),t("ul",null,t("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",t("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),t("li",null,"Agree to Verdocs"," ",t("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",t("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),"."))))):t(s,null,t("verdocs-loader",null))}};j.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}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>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;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 .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-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 .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}';export{j as verdocs_sign}
@@ -1 +1 @@
1
- import{r as e,h as t,H as o,c as i,g as s}from"./p-5207d80c.js";import{VerdocsEndpoint as r,updateField as l,deleteField as a}from"@verdocs/js-sdk";import{g as c,u as d}from"./p-ff64786a.js";import{g as n}from"./p-9e371467.js";import{g as p}from"./p-4372c294.js";import{S as h}from"./p-fd97809c.js";import{V as f}from"./p-04c07b7b.js";import"./p-83317d11.js";import"./p-a706bac9.js";const b=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(o,{key:"134ddfacbf313ed3d8aaaae104e7ceefaf8f260f",class:{disabled:this.disabled,[this.theme]:!0}},t("label",{key:"f4c5ad61ffc32acf46e42a22c9cfdb27b44d21c9"},t("input",{key:"edc72dbc12bb2f93daa6bf90fe8baddeee003a0f",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",{key:"0d3a00d372dc0a0b2de109c1ee8c484153b789a7"},this.label)))}};b.style='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const u=class{constructor(t){e(this,t),this.message=""}render(){return t(o,{key:"5fd53e1053d599dc955c727344dfbc48ddf13622"},t("div",{key:"bd877d18be032147ed72b999896f0cec3b021c95",class:"inner"},this.message))}};u.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const x=class{constructor(t){e(this,t),this.value="",this.label="",this.options=void 0,this.disabled=!1}render(){return t(o,{key:"4f49d2d10cf951c150b168563bcdb1d69e2385f2",class:"input-field"},t("label",{key:"a7329800f45797aac347e20231cc790e7ed4a91f"},this.label?t("div",{class:"input-label"},this.label+":"):t("div",null),t("select",{key:"1f66b8907f5ba4c9ecece9444ee4afc1be6a4459",class:"input-element",disabled:this.disabled},this.options.map((e=>t("option",{value:e.value,selected:e.value===this.value},e.label))))))}};x.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';const m=e=>e.charAt(0).toUpperCase()+e.slice(1),v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>',g='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',k=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.delete=i(this,"delete",7),this.settingsChanged=i(this,"settingsChanged",7),this.sdkError=i(this,"sdkError",7),this.templateStore=null,this.fieldStore=null,this.roleStore=null,this.endpoint=r.getDefault(),this.templateId="",this.fieldName="",this.helpText="",this.dirty=!1,this.loading=!0,this.label="",this.type="textbox",this.name="",this.required=!1,this.roleName="",this.group="",this.fieldType="",this.options=[],this.placeholder="",this.defaultValue="",this.showingHelp=!1}async componentWillLoad(){var e,t,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.fieldName)return void console.error("[FIELD PROPERTIES] Missing required field name");if(!this.endpoint.session)return void console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");this.templateStore=await p(this.endpoint,this.templateId),this.fieldStore=c(this.templateId),this.roleStore=n(this.templateId),this.resetForm()}catch(i){console.log("[FIELD PROPERTIES] Error loading template",i),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new h(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(o=i.response)||void 0===o?void 0:o.data))}}resetForm(){const e=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));e?(console.log("[FIELD PROPERTIES]",e),this.type=e.type,this.name=e.name,this.label=e.label,this.group=e.group,this.roleName=e.role_name,this.required=e.required,this.fieldType=e.type,this.options=e.options||[],this.placeholder=e.placeholder||"",this.defaultValue=e.default||"",this.dirty=!1,this.loading=!1,this.cleanupOptions()):console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in fields`)}handleCancel(e){var t,o;e.stopPropagation(),this.resetForm(),null===(t=this.close)||void 0===t||t.emit(),null===(o=document.getElementById("verdocs-template-field-properties"))||void 0===o||o.remove()}handleSave(e){e.stopPropagation();const t={name:this.name,role_name:this.roleName,required:this.required,label:this.label,group:this.group,placeholder:this.placeholder,default:this.defaultValue,options:this.options};console.log("[FIELD PROPERTIES] Will update",this.fieldName,t),l(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var t,o,i;console.log("[FIELD PROPERTIES] Updated",e),d(this.fieldStore,this.fieldName,e),null===(t=this.settingsChanged)||void 0===t||t.emit({fieldName:this.fieldName,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(i=document.getElementById("verdocs-template-field-properties"))||void 0===i||i.remove()})).catch((()=>{console.log("[FIELD PROPERTIES] Update failed",e)}))}async handleDelete(e){e.stopPropagation(),a(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,t;this.fieldStore.set("fields",this.fieldStore.get("fields").filter((e=>e.name!==this.fieldName))),null===(e=this.delete)||void 0===e||e.emit({templateId:this.templateId,roleName:this.roleName}),null===(t=document.getElementById("verdocs-template-field-properties"))||void 0===t||t.remove()})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}cleanupOptions(){this.options=[...this.options.filter((e=>""!==(e.id||"").trim()||""!==(e.value||"").trim()))],this.options.find((e=>!e.id&&!e.value))||(this.options=[...this.options,{id:"",value:""}])}render(){var e;return this.endpoint.session?this.endpoint.session&&this.fieldStore.get("fields").some((e=>e.name===this.fieldName))?this.helpText&&this.showingHelp?t(o,null,t("h6",null,m(this.fieldType)," Settings ",t("div",{style:{flex:"1"}}),t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!1})),t("p",{class:"instructions",innerHTML:this.helpText})):t(o,{id:"verdocs-template-field-properties"},t("h6",null,m(this.fieldType.replace(/_/g," "))," Settings ",t("div",{style:{flex:"1"}}),this.helpText&&t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!0})),t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:e=>{this.label=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("div",{class:"input-label"},"Role:"),t("verdocs-select-input",{value:this.roleName,options:null===(e=this.roleStore.state)||void 0===e?void 0:e.roles.map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-value",label:"Default Value",value:this.defaultValue,autocomplete:"off",placeholder:"Pre-filled value...",onInput:e=>{this.defaultValue=e.target.value,this.dirty=!0}})),"radio"===this.type&&t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-label",label:"Group",value:this.group,autocomplete:"off",helpText:"Enable exclusive selections. Only one option within the same group may be selected at a time.",placeholder:"Group...",onInput:e=>{this.group=(e.target.value||"").trim().toLowerCase().replace(/[^a-z0-9]/g,""),this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value,this.dirty=!0}})),t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),t("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked,this.dirty=!0}})),"dropdown"===this.type&&t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Options")),"dropdown"===this.type&&t("div",{class:"options"},t("div",{class:"options-header"},t("div",{class:"options-header-label"},"ID"),t("dev",{class:"options-header-label"},"Label")),this.options.map(((e,o)=>t("div",{class:"row option-row",key:o},t("verdocs-text-input",{id:`verdocs-option-id-${e.id}`,value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[o].id=e.target.value,this.dirty=!0,this.cleanupOptions()}}),t("verdocs-text-input",{id:`verdocs-option-value-${e.id}`,value:e.value,placeholder:"Display value",onInput:e=>{this.options[o].value=e.target.value,this.dirty=!0,this.cleanupOptions()}}),t("button",{innerHTML:v,class:"remove-button",onClick:()=>{this.options=this.options.filter((t=>t.id!==e.id)),this.dirty=!0,this.cleanupOptions()}}))))),t("div",{class:"buttons"},t("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:v}),t("div",{style:{flex:"1"}}),t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(o,{class:"empty"}):t(o,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}get el(){return s(this)}};k.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275)}@media all and (max-width: 600px){verdocs-template-field-properties{padding:10px;-webkit-transform:scale(0.8);transform:scale(0.8)}}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .options-header{gap:10px;margin:0 0 5px 0;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;padding:5px 8px;font-weight:700;text-align:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;background-color:#333333}verdocs-template-field-properties .options-header-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;font-weight:700;font-size:14px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 1px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';const y=class{constructor(t){e(this,t),this.value="",this.label="",this.placeholder="",this.autocomplete="",this.helpText="",this.clearable=!1,this.copyable=!1,this.type="text",this.disabled=!1,this.required=!1,this.showingPw=!1}copyToClipboard(){this.inputEl.select(),navigator.clipboard.writeText(this.value).then((()=>f("Copied!"))).catch((e=>console.log("Error copying to clipboard",e)))}render(){return t(o,{key:"60bd27aafb8597a65b2cc433a560ae1bd2b404ad",class:`input-field ${this.clearable?"clearable":""} ${this.copyable?"copyable":""}`},t("label",{key:"d35b3912a2fd3d27ba1f1a454bbd0cf02710d7c2"},this.label&&t("div",{key:"24b9dbbc47a32d2db4b1cb1a0fbfcec6e10698f6",class:"input-label"},this.label+":",this.required&&t("span",{key:"1c2ef6df80053e6eaf9c6f6b23391b329ace0b60",class:"required"},"*")),t("div",{key:"563ac56ff97fad6be30eefaacc0e654e11763db6",class:"input-container"},t("input",{key:"50d21decaff04b0bb823f33ab71eacdcc0ef1906",type:"password"===this.type&&this.showingPw?"text":this.type,value:this.value,required:this.required,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete,ref:e=>this.inputEl=e,onInput:e=>this.value=e.target.value}),this.clearable&&this.value&&t("span",{key:"0d0e907d677492b54ff244f2f36389d474b13cda",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.881 122.88"><g><path fill-rule="evenodd" clip-rule="evenodd" d="M61.44,0c33.933,0,61.441,27.507,61.441,61.439 c0,33.933-27.508,61.44-61.441,61.44C27.508,122.88,0,95.372,0,61.439C0,27.507,27.508,0,61.44,0L61.44,0z M81.719,36.226 c1.363-1.363,3.572-1.363,4.936,0c1.363,1.363,1.363,3.573,0,4.936L66.375,61.439l20.279,20.278c1.363,1.363,1.363,3.573,0,4.937 c-1.363,1.362-3.572,1.362-4.936,0L61.44,66.376L41.162,86.654c-1.362,1.362-3.573,1.362-4.936,0c-1.363-1.363-1.363-3.573,0-4.937 l20.278-20.278L36.226,41.162c-1.363-1.363-1.363-3.573,0-4.936c1.363-1.363,3.573-1.363,4.936,0L61.44,56.504L81.719,36.226 L81.719,36.226z"/></g></svg>',class:"clear",onClick:()=>{setTimeout((()=>{var e;this.value="",null===(e=this.inputEl)||void 0===e||e.setAttribute("value",""),setTimeout((()=>{var e,t;null===(e=this.inputEl)||void 0===e||e.dispatchEvent(new Event("focusout")),null===(t=this.inputEl)||void 0===t||t.blur()}),50)}),50)}}),"password"===this.type&&t("span",{key:"68df05b7d43320a87f4ede3115b20cf19b409f9e",innerHTML:this.showingPw?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" /></svg>',class:"toggle-pw",onClick:()=>{this.showingPw=!this.showingPw}}),!this.clearable&&this.copyable&&this.value&&t("span",{key:"f41ecf64b8fce70f74c6f938955b839a32252259",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M15.988 3.012A2.25 2.25 0 0118 5.25v6.5A2.25 2.25 0 0115.75 14H13.5V7A2.5 2.5 0 0011 4.5H8.128a2.252 2.252 0 011.884-1.488A2.25 2.25 0 0112.25 1h1.5a2.25 2.25 0 012.238 2.012zM11.5 3.25a.75.75 0 01.75-.75h1.5a.75.75 0 01.75.75v.25h-3v-.25z" clip-rule="evenodd" /><path fill-rule="evenodd" d="M2 7a1 1 0 011-1h8a1 1 0 011 1v10a1 1 0 01-1 1H3a1 1 0 01-1-1V7zm2 3.25a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75zm0 3.5a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z" clip-rule="evenodd" /></svg>',class:"copy",onClick:()=>this.copyToClipboard()})),this.helpText&&t("verdocs-help-icon",{key:"f8d399ed6c21bcc27e04330f6437f160e733218a",text:this.helpText})))}get hostEl(){return s(this)}};y.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input .required{color:red;margin-left:2px;display:inline-block}verdocs-text-input [data-lastpass-icon-root]{display:none !important}verdocs-text-input .input-container{position:relative}verdocs-text-input .clear{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .clear:hover{fill:#720101;cursor:pointer}verdocs-text-input .copy{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .copy:hover{fill:#654dcb;cursor:pointer}verdocs-text-input .toggle-pw{top:5px;right:7px;width:18px;height:18px;stroke:#cccccc;position:absolute}verdocs-text-input .toggle-pw:hover{fill:#654dcb;cursor:pointer}verdocs-text-input.clearable .input-element,verdocs-text-input.copyable .input-element{padding-right:32px}';export{b as verdocs_checkbox,u as verdocs_component_error,x as verdocs_select_input,k as verdocs_template_field_properties,y as verdocs_text_input}
1
+ import{r as e,h as t,H as o,c as i,g as s}from"./p-5207d80c.js";import{VerdocsEndpoint as r,updateField as l,deleteField as a}from"@verdocs/js-sdk";import{g as c,u as d}from"./p-ff64786a.js";import{g as n}from"./p-9e371467.js";import{g as p}from"./p-4372c294.js";import{S as h}from"./p-fd97809c.js";import{V as f}from"./p-04c07b7b.js";import"./p-83317d11.js";import"./p-a706bac9.js";const b=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(o,{key:"134ddfacbf313ed3d8aaaae104e7ceefaf8f260f",class:{disabled:this.disabled,[this.theme]:!0}},t("label",{key:"f4c5ad61ffc32acf46e42a22c9cfdb27b44d21c9"},t("input",{key:"edc72dbc12bb2f93daa6bf90fe8baddeee003a0f",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",{key:"0d3a00d372dc0a0b2de109c1ee8c484153b789a7"},this.label)))}};b.style='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const u=class{constructor(t){e(this,t),this.message=""}render(){return t(o,{key:"5fd53e1053d599dc955c727344dfbc48ddf13622"},t("div",{key:"bd877d18be032147ed72b999896f0cec3b021c95",class:"inner"},this.message))}};u.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const x=class{constructor(t){e(this,t),this.value="",this.label="",this.options=void 0,this.disabled=!1}render(){return t(o,{key:"4f49d2d10cf951c150b168563bcdb1d69e2385f2",class:"input-field"},t("label",{key:"a7329800f45797aac347e20231cc790e7ed4a91f"},this.label?t("div",{class:"input-label"},this.label+":"):t("div",null),t("select",{key:"1f66b8907f5ba4c9ecece9444ee4afc1be6a4459",class:"input-element",disabled:this.disabled},this.options.map((e=>t("option",{value:e.value,selected:e.value===this.value},e.label))))))}};x.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';const m=e=>e.charAt(0).toUpperCase()+e.slice(1),v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>',g='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',k=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.delete=i(this,"delete",7),this.settingsChanged=i(this,"settingsChanged",7),this.sdkError=i(this,"sdkError",7),this.templateStore=null,this.fieldStore=null,this.roleStore=null,this.endpoint=r.getDefault(),this.templateId="",this.fieldName="",this.helpText="",this.dirty=!1,this.loading=!0,this.label="",this.type="textbox",this.name="",this.required=!1,this.roleName="",this.group="",this.fieldType="",this.options=[],this.placeholder="",this.defaultValue="",this.showingHelp=!1}async componentWillLoad(){var e,t,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.fieldName)return void console.error("[FIELD PROPERTIES] Missing required field name");if(!this.endpoint.session)return void console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");this.templateStore=await p(this.endpoint,this.templateId),this.fieldStore=c(this.templateId),this.roleStore=n(this.templateId),this.resetForm()}catch(i){console.log("[FIELD PROPERTIES] Error loading template",i),this.loading=!1,null===(e=this.sdkError)||void 0===e||e.emit(new h(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(o=i.response)||void 0===o?void 0:o.data))}}resetForm(){const e=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));e?(console.log("[FIELD PROPERTIES]",e),this.type=e.type,this.name=e.name,this.label=e.label,this.group=e.group,this.roleName=e.role_name,this.required=e.required,this.fieldType=e.type,this.options=e.options||[],this.placeholder=e.placeholder||"",this.defaultValue=e.default||"",this.dirty=!1,this.loading=!1,this.cleanupOptions()):console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in fields`)}handleCancel(e){var t,o;e.stopPropagation(),this.resetForm(),null===(t=this.close)||void 0===t||t.emit(),null===(o=document.getElementById("verdocs-template-field-properties"))||void 0===o||o.remove()}handleSave(e){e.stopPropagation();const t={name:this.name,role_name:this.roleName,required:this.required,label:this.label,group:this.group,placeholder:this.placeholder,default:this.defaultValue,options:this.options};console.log("[FIELD PROPERTIES] Will update",this.fieldName,t),l(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var t,o,i;console.log("[FIELD PROPERTIES] Updated",e),d(this.fieldStore,this.fieldName,e),null===(t=this.settingsChanged)||void 0===t||t.emit({fieldName:this.fieldName,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(i=document.getElementById("verdocs-template-field-properties"))||void 0===i||i.remove()})).catch((()=>{console.log("[FIELD PROPERTIES] Update failed",e)}))}async handleDelete(e){e.stopPropagation(),a(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,t;this.fieldStore.set("fields",this.fieldStore.get("fields").filter((e=>e.name!==this.fieldName))),null===(e=this.delete)||void 0===e||e.emit({templateId:this.templateId,roleName:this.roleName}),null===(t=document.getElementById("verdocs-template-field-properties"))||void 0===t||t.remove()})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}cleanupOptions(){this.options=[...this.options.filter((e=>""!==(e.id||"").trim()||""!==(e.label||"").trim()))],this.options.find((e=>!e.id&&!e.label))||(this.options=[...this.options,{id:"",label:""}])}render(){var e;return this.endpoint.session?this.endpoint.session&&this.fieldStore.get("fields").some((e=>e.name===this.fieldName))?this.helpText&&this.showingHelp?t(o,null,t("h6",null,m(this.fieldType)," Settings ",t("div",{style:{flex:"1"}}),t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!1})),t("p",{class:"instructions",innerHTML:this.helpText})):t(o,{id:"verdocs-template-field-properties"},t("h6",null,m(this.fieldType.replace(/_/g," "))," Settings ",t("div",{style:{flex:"1"}}),this.helpText&&t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!0})),t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:e=>{this.label=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("div",{class:"input-label"},"Role:"),t("verdocs-select-input",{value:this.roleName,options:null===(e=this.roleStore.state)||void 0===e?void 0:e.roles.map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-value",label:"Default Value",value:this.defaultValue,autocomplete:"off",placeholder:"Pre-filled value...",onInput:e=>{this.defaultValue=e.target.value,this.dirty=!0}})),"radio"===this.type&&t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-label",label:"Group",value:this.group,autocomplete:"off",helpText:"Enable exclusive selections. Only one option within the same group may be selected at a time.",placeholder:"Group...",onInput:e=>{this.group=(e.target.value||"").trim().toLowerCase().replace(/[^a-z0-9]/g,""),this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value,this.dirty=!0}})),t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),t("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked,this.dirty=!0}})),"dropdown"===this.type&&t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Options")),"dropdown"===this.type&&t("div",{class:"options"},t("div",{class:"options-header"},t("div",{class:"options-header-label"},"ID"),t("dev",{class:"options-header-label"},"Label")),this.options.map(((e,o)=>t("div",{class:"row option-row",key:o},t("verdocs-text-input",{id:`verdocs-option-id-${e.id}`,value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[o].id=e.target.value,this.dirty=!0,this.cleanupOptions()}}),t("verdocs-text-input",{id:`verdocs-option-label-${e.id}`,value:e.value,placeholder:"Display label",onInput:e=>{this.options[o].label=e.target.label,this.dirty=!0,this.cleanupOptions()}}),t("button",{innerHTML:v,class:"remove-button",onClick:()=>{this.options=this.options.filter((t=>t.id!==e.id)),this.dirty=!0,this.cleanupOptions()}}))))),t("div",{class:"buttons"},t("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:v}),t("div",{style:{flex:"1"}}),t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(o,{class:"empty"}):t(o,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}get el(){return s(this)}};k.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275)}@media all and (max-width: 600px){verdocs-template-field-properties{padding:10px;-webkit-transform:scale(0.8);transform:scale(0.8)}}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .options-header{gap:10px;margin:0 0 5px 0;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;padding:5px 8px;font-weight:700;text-align:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;background-color:#333333}verdocs-template-field-properties .options-header-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;font-weight:700;font-size:14px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 1px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';const y=class{constructor(t){e(this,t),this.value="",this.label="",this.placeholder="",this.autocomplete="",this.helpText="",this.clearable=!1,this.copyable=!1,this.type="text",this.disabled=!1,this.required=!1,this.showingPw=!1}copyToClipboard(){this.inputEl.select(),navigator.clipboard.writeText(this.value).then((()=>f("Copied!"))).catch((e=>console.log("Error copying to clipboard",e)))}render(){return t(o,{key:"60bd27aafb8597a65b2cc433a560ae1bd2b404ad",class:`input-field ${this.clearable?"clearable":""} ${this.copyable?"copyable":""}`},t("label",{key:"d35b3912a2fd3d27ba1f1a454bbd0cf02710d7c2"},this.label&&t("div",{key:"24b9dbbc47a32d2db4b1cb1a0fbfcec6e10698f6",class:"input-label"},this.label+":",this.required&&t("span",{key:"1c2ef6df80053e6eaf9c6f6b23391b329ace0b60",class:"required"},"*")),t("div",{key:"563ac56ff97fad6be30eefaacc0e654e11763db6",class:"input-container"},t("input",{key:"50d21decaff04b0bb823f33ab71eacdcc0ef1906",type:"password"===this.type&&this.showingPw?"text":this.type,value:this.value,required:this.required,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete,ref:e=>this.inputEl=e,onInput:e=>this.value=e.target.value}),this.clearable&&this.value&&t("span",{key:"0d0e907d677492b54ff244f2f36389d474b13cda",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.881 122.88"><g><path fill-rule="evenodd" clip-rule="evenodd" d="M61.44,0c33.933,0,61.441,27.507,61.441,61.439 c0,33.933-27.508,61.44-61.441,61.44C27.508,122.88,0,95.372,0,61.439C0,27.507,27.508,0,61.44,0L61.44,0z M81.719,36.226 c1.363-1.363,3.572-1.363,4.936,0c1.363,1.363,1.363,3.573,0,4.936L66.375,61.439l20.279,20.278c1.363,1.363,1.363,3.573,0,4.937 c-1.363,1.362-3.572,1.362-4.936,0L61.44,66.376L41.162,86.654c-1.362,1.362-3.573,1.362-4.936,0c-1.363-1.363-1.363-3.573,0-4.937 l20.278-20.278L36.226,41.162c-1.363-1.363-1.363-3.573,0-4.936c1.363-1.363,3.573-1.363,4.936,0L61.44,56.504L81.719,36.226 L81.719,36.226z"/></g></svg>',class:"clear",onClick:()=>{setTimeout((()=>{var e;this.value="",null===(e=this.inputEl)||void 0===e||e.setAttribute("value",""),setTimeout((()=>{var e,t;null===(e=this.inputEl)||void 0===e||e.dispatchEvent(new Event("focusout")),null===(t=this.inputEl)||void 0===t||t.blur()}),50)}),50)}}),"password"===this.type&&t("span",{key:"68df05b7d43320a87f4ede3115b20cf19b409f9e",innerHTML:this.showingPw?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" /></svg>',class:"toggle-pw",onClick:()=>{this.showingPw=!this.showingPw}}),!this.clearable&&this.copyable&&this.value&&t("span",{key:"f41ecf64b8fce70f74c6f938955b839a32252259",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M15.988 3.012A2.25 2.25 0 0118 5.25v6.5A2.25 2.25 0 0115.75 14H13.5V7A2.5 2.5 0 0011 4.5H8.128a2.252 2.252 0 011.884-1.488A2.25 2.25 0 0112.25 1h1.5a2.25 2.25 0 012.238 2.012zM11.5 3.25a.75.75 0 01.75-.75h1.5a.75.75 0 01.75.75v.25h-3v-.25z" clip-rule="evenodd" /><path fill-rule="evenodd" d="M2 7a1 1 0 011-1h8a1 1 0 011 1v10a1 1 0 01-1 1H3a1 1 0 01-1-1V7zm2 3.25a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75zm0 3.5a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z" clip-rule="evenodd" /></svg>',class:"copy",onClick:()=>this.copyToClipboard()})),this.helpText&&t("verdocs-help-icon",{key:"f8d399ed6c21bcc27e04330f6437f160e733218a",text:this.helpText})))}get hostEl(){return s(this)}};y.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input .required{color:red;margin-left:2px;display:inline-block}verdocs-text-input [data-lastpass-icon-root]{display:none !important}verdocs-text-input .input-container{position:relative}verdocs-text-input .clear{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .clear:hover{fill:#720101;cursor:pointer}verdocs-text-input .copy{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .copy:hover{fill:#654dcb;cursor:pointer}verdocs-text-input .toggle-pw{top:5px;right:7px;width:18px;height:18px;stroke:#cccccc;position:absolute}verdocs-text-input .toggle-pw:hover{fill:#654dcb;cursor:pointer}verdocs-text-input.clearable .input-element,verdocs-text-input.copyable .input-element{padding-right:32px}';export{b as verdocs_checkbox,u as verdocs_component_error,x as verdocs_select_input,k as verdocs_template_field_properties,y as verdocs_text_input}