@verdocs/web-sdk 5.0.24 → 5.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. package/dist/cjs/{Datastore-931fd77e.js → Datastore-e39f8315.js} +29 -24
  2. package/dist/cjs/Datastore-e39f8315.js.map +1 -0
  3. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-checkbox_6.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +25 -1
  8. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js.map +1 -1
  9. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-preview_6.cjs.entry.js +5 -2
  14. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  15. package/dist/cjs/verdocs-sign.cjs.entry.js +7 -7
  16. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  17. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  18. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +1 -1
  19. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +5 -5
  20. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  21. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +24 -0
  22. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js.map +1 -1
  23. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +4 -1
  24. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
  25. package/dist/components/{p-78de9e65.js → p-0e4ebc84.js} +3 -3
  26. package/dist/components/{p-78de9e65.js.map → p-0e4ebc84.js.map} +1 -1
  27. package/dist/components/{p-e4a97ad5.js → p-143a763f.js} +3 -3
  28. package/dist/components/{p-e4a97ad5.js.map → p-143a763f.js.map} +1 -1
  29. package/dist/components/{p-2d8b46e5.js → p-16b073b8.js} +2 -2
  30. package/dist/components/{p-2d8b46e5.js.map → p-16b073b8.js.map} +1 -1
  31. package/dist/components/{p-e9528d9f.js → p-1d4829fb.js} +3 -3
  32. package/dist/components/{p-e9528d9f.js.map → p-1d4829fb.js.map} +1 -1
  33. package/dist/components/{p-ca3e45f3.js → p-27a8eef0.js} +2 -2
  34. package/dist/components/{p-ca3e45f3.js.map → p-27a8eef0.js.map} +1 -1
  35. package/dist/components/{p-fcf13666.js → p-550377ba.js} +13 -13
  36. package/dist/components/{p-fcf13666.js.map → p-550377ba.js.map} +1 -1
  37. package/dist/components/{p-1ce18a42.js → p-619747d7.js} +2 -2
  38. package/dist/components/{p-1ce18a42.js.map → p-619747d7.js.map} +1 -1
  39. package/dist/components/{p-e95ded6b.js → p-631808d5.js} +18 -15
  40. package/dist/components/p-631808d5.js.map +1 -0
  41. package/dist/components/{p-e4799d51.js → p-7bd7baa6.js} +3 -3
  42. package/dist/components/{p-e4799d51.js.map → p-7bd7baa6.js.map} +1 -1
  43. package/dist/components/{p-1ab01232.js → p-813ed998.js} +3 -3
  44. package/dist/components/{p-1ab01232.js.map → p-813ed998.js.map} +1 -1
  45. package/dist/components/{p-a415ce22.js → p-8c965486.js} +3 -3
  46. package/dist/components/{p-a415ce22.js.map → p-8c965486.js.map} +1 -1
  47. package/dist/components/{p-681e7dd4.js → p-99128b47.js} +3 -3
  48. package/dist/components/{p-681e7dd4.js.map → p-99128b47.js.map} +1 -1
  49. package/dist/components/{p-53168eec.js → p-ac7694c0.js} +2 -2
  50. package/dist/components/{p-53168eec.js.map → p-ac7694c0.js.map} +1 -1
  51. package/dist/components/{p-ecfc85ae.js → p-b5e479db.js} +3 -3
  52. package/dist/components/{p-ecfc85ae.js.map → p-b5e479db.js.map} +1 -1
  53. package/dist/components/{p-f6156f7a.js → p-c422d9a0.js} +3 -3
  54. package/dist/components/{p-f6156f7a.js.map → p-c422d9a0.js.map} +1 -1
  55. package/dist/components/{p-c4c9feda.js → p-c4310332.js} +3 -3
  56. package/dist/components/{p-c4c9feda.js.map → p-c4310332.js.map} +1 -1
  57. package/dist/components/{p-91d65fde.js → p-c5045788.js} +3 -3
  58. package/dist/components/{p-91d65fde.js.map → p-c5045788.js.map} +1 -1
  59. package/dist/components/{p-3828cb31.js → p-d4be87ef.js} +29 -24
  60. package/dist/components/p-d4be87ef.js.map +1 -0
  61. package/dist/components/{p-28e3b2e3.js → p-d54466ed.js} +14 -14
  62. package/dist/components/{p-28e3b2e3.js.map → p-d54466ed.js.map} +1 -1
  63. package/dist/components/{p-eb2ad8d0.js → p-e39c327c.js} +2 -2
  64. package/dist/components/{p-eb2ad8d0.js.map → p-e39c327c.js.map} +1 -1
  65. package/dist/components/{p-eb12a71c.js → p-f238b25b.js} +2 -2
  66. package/dist/components/{p-eb12a71c.js.map → p-f238b25b.js.map} +1 -1
  67. package/dist/components/{p-bfed2f8d.js → p-f7cf2401.js} +2 -2
  68. package/dist/components/{p-bfed2f8d.js.map → p-f7cf2401.js.map} +1 -1
  69. package/dist/components/verdocs-build.js +20 -20
  70. package/dist/components/verdocs-envelope-recipient-link.js +1 -1
  71. package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
  72. package/dist/components/verdocs-envelope-sidebar.js +26 -2
  73. package/dist/components/verdocs-envelope-sidebar.js.map +1 -1
  74. package/dist/components/verdocs-field-attachment.js +1 -1
  75. package/dist/components/verdocs-field-checkbox.js +1 -1
  76. package/dist/components/verdocs-field-date.js +1 -1
  77. package/dist/components/verdocs-field-dropdown.js +1 -1
  78. package/dist/components/verdocs-field-initial.js +1 -1
  79. package/dist/components/verdocs-field-payment.js +2 -2
  80. package/dist/components/verdocs-field-radio.js +1 -1
  81. package/dist/components/verdocs-field-signature.js +1 -1
  82. package/dist/components/verdocs-field-textarea.js +1 -1
  83. package/dist/components/verdocs-field-textbox.js +1 -1
  84. package/dist/components/verdocs-field-timestamp.js +1 -1
  85. package/dist/components/verdocs-preview.js +1 -1
  86. package/dist/components/verdocs-send.js +1 -1
  87. package/dist/components/verdocs-sign.js +8 -8
  88. package/dist/components/verdocs-sign.js.map +1 -1
  89. package/dist/components/verdocs-template-attachments.js +1 -1
  90. package/dist/components/verdocs-template-build-tabs.js +1 -1
  91. package/dist/components/verdocs-template-document-page.js +1 -1
  92. package/dist/components/verdocs-template-field-properties.js +1 -1
  93. package/dist/components/verdocs-template-fields.js +1 -1
  94. package/dist/components/verdocs-template-role-properties.js +1 -1
  95. package/dist/components/verdocs-template-roles.js +1 -1
  96. package/dist/components/verdocs-view.js +1 -1
  97. package/dist/esm/{Datastore-3f924d94.js → Datastore-77cb8d9c.js} +29 -24
  98. package/dist/esm/Datastore-77cb8d9c.js.map +1 -0
  99. package/dist/esm/verdocs-build.entry.js +1 -1
  100. package/dist/esm/verdocs-checkbox_6.entry.js +1 -1
  101. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  102. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
  103. package/dist/esm/verdocs-envelope-sidebar.entry.js +25 -1
  104. package/dist/esm/verdocs-envelope-sidebar.entry.js.map +1 -1
  105. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
  106. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  107. package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
  108. package/dist/esm/verdocs-menu-panel_2.entry.js +1 -1
  109. package/dist/esm/verdocs-preview_6.entry.js +5 -2
  110. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  111. package/dist/esm/verdocs-sign.entry.js +7 -7
  112. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  113. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  114. package/dist/esm-es5/Datastore-77cb8d9c.js +2 -0
  115. package/dist/esm-es5/Datastore-77cb8d9c.js.map +1 -0
  116. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-checkbox_6.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js.map +1 -1
  122. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  128. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  130. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  131. package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js → p-00063a35.entry.js} +2 -2
  132. package/dist/verdocs-web-sdk/{p-1902bf04.entry.js → p-104863b5.entry.js} +2 -2
  133. package/dist/verdocs-web-sdk/p-1f2c019d.system.entry.js +2 -0
  134. package/dist/verdocs-web-sdk/p-1f2c019d.system.entry.js.map +1 -0
  135. package/dist/verdocs-web-sdk/{p-fc29a754.entry.js → p-25aa3bd3.entry.js} +2 -2
  136. package/dist/verdocs-web-sdk/{p-b1a9dc79.entry.js → p-4e9a8e8e.entry.js} +2 -2
  137. package/dist/verdocs-web-sdk/p-4e9a8e8e.entry.js.map +1 -0
  138. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js +2 -0
  139. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js.map +1 -0
  140. package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js → p-578e65d4.system.entry.js} +2 -2
  141. package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js → p-5bcf921b.system.entry.js} +2 -2
  142. package/dist/verdocs-web-sdk/{p-26106576.system.entry.js → p-5c065719.system.entry.js} +2 -2
  143. package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js → p-5ebfe76c.entry.js} +2 -2
  144. package/dist/verdocs-web-sdk/{p-80952d72.system.entry.js → p-6e93814f.system.entry.js} +2 -2
  145. package/dist/verdocs-web-sdk/p-6e93814f.system.entry.js.map +1 -0
  146. package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js → p-6eee289a.system.entry.js} +2 -2
  147. package/dist/verdocs-web-sdk/{p-cc230abf.entry.js → p-6f1e2f2f.entry.js} +2 -2
  148. package/dist/verdocs-web-sdk/p-70247599.system.entry.js +2 -0
  149. package/dist/verdocs-web-sdk/p-70247599.system.entry.js.map +1 -0
  150. package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js → p-8369273d.entry.js} +2 -2
  151. package/dist/verdocs-web-sdk/p-a285560f.entry.js +2 -0
  152. package/dist/verdocs-web-sdk/p-a285560f.entry.js.map +1 -0
  153. package/dist/verdocs-web-sdk/p-b7799ec0.entry.js +2 -0
  154. package/dist/verdocs-web-sdk/p-b7799ec0.entry.js.map +1 -0
  155. package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js → p-b8945173.entry.js} +2 -2
  156. package/dist/verdocs-web-sdk/{p-d4aff253.entry.js → p-b9fee1a7.entry.js} +2 -2
  157. package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js → p-cabfdb9d.system.entry.js} +2 -2
  158. package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js → p-d1d95df4.system.entry.js} +2 -2
  159. package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js → p-d3a8c6b8.entry.js} +2 -2
  160. package/dist/verdocs-web-sdk/p-d4be87ef.js +2 -0
  161. package/dist/verdocs-web-sdk/p-d4be87ef.js.map +1 -0
  162. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  163. package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js → p-e3efeb57.system.entry.js} +2 -2
  164. package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js → p-e83d06d4.system.entry.js} +2 -2
  165. package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js → p-ecfe8987.system.entry.js} +2 -2
  166. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  167. package/package.json +3 -3
  168. package/dist/cjs/Datastore-931fd77e.js.map +0 -1
  169. package/dist/components/p-3828cb31.js.map +0 -1
  170. package/dist/components/p-e95ded6b.js.map +0 -1
  171. package/dist/esm/Datastore-3f924d94.js.map +0 -1
  172. package/dist/esm-es5/Datastore-3f924d94.js +0 -2
  173. package/dist/esm-es5/Datastore-3f924d94.js.map +0 -1
  174. package/dist/verdocs-web-sdk/p-2175c81a.system.entry.js +0 -2
  175. package/dist/verdocs-web-sdk/p-2175c81a.system.entry.js.map +0 -1
  176. package/dist/verdocs-web-sdk/p-23d6f064.entry.js +0 -2
  177. package/dist/verdocs-web-sdk/p-23d6f064.entry.js.map +0 -1
  178. package/dist/verdocs-web-sdk/p-3828cb31.js +0 -2
  179. package/dist/verdocs-web-sdk/p-3828cb31.js.map +0 -1
  180. package/dist/verdocs-web-sdk/p-65be7617.system.js +0 -2
  181. package/dist/verdocs-web-sdk/p-65be7617.system.js.map +0 -1
  182. package/dist/verdocs-web-sdk/p-80952d72.system.entry.js.map +0 -1
  183. package/dist/verdocs-web-sdk/p-b1a9dc79.entry.js.map +0 -1
  184. package/dist/verdocs-web-sdk/p-c4a10e58.system.entry.js +0 -2
  185. package/dist/verdocs-web-sdk/p-c4a10e58.system.entry.js.map +0 -1
  186. package/dist/verdocs-web-sdk/p-db1faf41.entry.js +0 -2
  187. package/dist/verdocs-web-sdk/p-db1faf41.entry.js.map +0 -1
  188. /package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js.map → p-00063a35.entry.js.map} +0 -0
  189. /package/dist/verdocs-web-sdk/{p-1902bf04.entry.js.map → p-104863b5.entry.js.map} +0 -0
  190. /package/dist/verdocs-web-sdk/{p-fc29a754.entry.js.map → p-25aa3bd3.entry.js.map} +0 -0
  191. /package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js.map → p-578e65d4.system.entry.js.map} +0 -0
  192. /package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js.map → p-5bcf921b.system.entry.js.map} +0 -0
  193. /package/dist/verdocs-web-sdk/{p-26106576.system.entry.js.map → p-5c065719.system.entry.js.map} +0 -0
  194. /package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js.map → p-5ebfe76c.entry.js.map} +0 -0
  195. /package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js.map → p-6eee289a.system.entry.js.map} +0 -0
  196. /package/dist/verdocs-web-sdk/{p-cc230abf.entry.js.map → p-6f1e2f2f.entry.js.map} +0 -0
  197. /package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js.map → p-8369273d.entry.js.map} +0 -0
  198. /package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js.map → p-b8945173.entry.js.map} +0 -0
  199. /package/dist/verdocs-web-sdk/{p-d4aff253.entry.js.map → p-b9fee1a7.entry.js.map} +0 -0
  200. /package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js.map → p-cabfdb9d.system.entry.js.map} +0 -0
  201. /package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js.map → p-d1d95df4.system.entry.js.map} +0 -0
  202. /package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js.map → p-d3a8c6b8.entry.js.map} +0 -0
  203. /package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js.map → p-e3efeb57.system.entry.js.map} +0 -0
  204. /package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js.map → p-e83d06d4.system.entry.js.map} +0 -0
  205. /package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js.map → p-ecfe8987.system.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as t,H as r}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getEnvelope as s,getInPersonLink as n,formatFullName as l}from"@verdocs/js-sdk";import{V as c}from"./p-04c07b7b.js";import{S as a}from"./p-fd97809c.js";import{S as d}from"./p-3828cb31.js";const p='@-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%}';const h=p;const b=class{constructor(t){e(this,t);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}async componentWillLoad(){var e,i,t;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(r){console.log("[RECIPIENT_LINK] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(t=r.response)===null||t===void 0?void 0:t.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();d.subscribe("envelopes",this.envelopeId,(()=>s(this.endpoint,this.envelopeId)),false,(e=>{var i;this.envelope=e;this.loading=false;this.recipient=(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).find((e=>e.role_name===this.roleName));this.getLink(this.recipient)}))}unlistenToEnvelope(){if(this.envelopeListenerId){d.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>c("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);c(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLink=true;n(this.endpoint,e.envelope_id,e.role_name).then((e=>{this.gettingLink=false;this.link=e.link})).catch((e=>{this.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);c("Unable to get link: "+e.message,{style:"error"})}))}render(){if(this.loading||!this.recipient){return t(r,null)}const e=l(this.recipient);return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},e," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:()=>this.getLink(this.recipient)})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(this.link)}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};b.style=h;const 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-switch{font-family:"Inter", "Barlow", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(22px);transform:translateX(22px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(2px);transform:translateX(2px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}';const x=f;const m=class{constructor(t){e(this,t);this.checkedChange=i(this,"checkedChange",7);this.checked=false;this.theme="primary";this.disabled=false}render(){return t("button",{key:"e9153549bcee6b924ce7a7d620d1096fa91782d2",value:"on",type:"button",role:"switch",class:`switch ${this.theme} ${this.disabled?"disabled":""}`,"data-state":this.checked?"checked":"unchecked","aria-checked":this.checked?"checked":"unchecked",onClick:()=>{var e;if(!this.disabled){this.checked=!this.checked;(e=this.checkedChange)===null||e===void 0?void 0:e.emit(this.checked)}}},t("span",{key:"61d97d7571b7f52f186ce44daaf0ef7132c6d5f6","data-state":this.checked?"checked":"unchecked",class:"slider"}))}};m.style=x;export{b as verdocs_envelope_recipient_link,m as verdocs_switch};
2
- //# sourceMappingURL=p-d4aff253.entry.js.map
1
+ import{r as e,c as i,h as t,H as r}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getEnvelope as s,getInPersonLink as n,formatFullName as l}from"@verdocs/js-sdk";import{V as c}from"./p-04c07b7b.js";import{S as a}from"./p-fd97809c.js";import{S as d}from"./p-d4be87ef.js";const p='@-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%}';const h=p;const b=class{constructor(t){e(this,t);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}async componentWillLoad(){var e,i,t;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(r){console.log("[RECIPIENT_LINK] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(t=r.response)===null||t===void 0?void 0:t.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();d.subscribe("envelopes",this.envelopeId,(()=>s(this.endpoint,this.envelopeId)),false,(e=>{var i;this.envelope=e;this.loading=false;this.recipient=(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).find((e=>e.role_name===this.roleName));this.getLink(this.recipient)}))}unlistenToEnvelope(){if(this.envelopeListenerId){d.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>c("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);c(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLink=true;n(this.endpoint,e.envelope_id,e.role_name).then((e=>{this.gettingLink=false;this.link=e.link})).catch((e=>{this.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);c("Unable to get link: "+e.message,{style:"error"})}))}render(){if(this.loading||!this.recipient){return t(r,null)}const e=l(this.recipient);return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},e," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:()=>this.getLink(this.recipient)})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(this.link)}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};b.style=h;const 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-switch{font-family:"Inter", "Barlow", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(22px);transform:translateX(22px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(2px);transform:translateX(2px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}';const x=f;const m=class{constructor(t){e(this,t);this.checkedChange=i(this,"checkedChange",7);this.checked=false;this.theme="primary";this.disabled=false}render(){return t("button",{key:"e9153549bcee6b924ce7a7d620d1096fa91782d2",value:"on",type:"button",role:"switch",class:`switch ${this.theme} ${this.disabled?"disabled":""}`,"data-state":this.checked?"checked":"unchecked","aria-checked":this.checked?"checked":"unchecked",onClick:()=>{var e;if(!this.disabled){this.checked=!this.checked;(e=this.checkedChange)===null||e===void 0?void 0:e.emit(this.checked)}}},t("span",{key:"61d97d7571b7f52f186ce44daaf0ef7132c6d5f6","data-state":this.checked?"checked":"unchecked",class:"slider"}))}};m.style=x;export{b as verdocs_envelope_recipient_link,m as verdocs_switch};
2
+ //# sourceMappingURL=p-b9fee1a7.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function l(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(i=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=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++;r=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];r=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-65be7617.system.js"],(function(e){"use strict";var t,n,i,r,o,s,l,a,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.g},function(e){s=e.VerdocsEndpoint;l=e.getTemplate},function(e){a=e.S},function(e){d=e.S}],execute:function(){var c='@-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-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157);box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157)}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';var u=c;var f=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.send=n(this,"send",7);this.templateUpdated=n(this,"templateUpdated",7);this.templateCreated=n(this,"templateCreated",7);this.rolesUpdated=n(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=s.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.onTemplateIdChanged=function(e,t){if(!t&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.onStepChanged=function(){this.loadTemplate(this.templateId).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,r,o;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID, activating upload mode");this.step="attachments";return[2]}try{this.loadTemplate(this.templateId).catch((function(e){return console.log("[BUILD] Unable to load template",e)}))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new a(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(o=e.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.loadTemplate=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){if(e){d.subscribe("templates",this.templateId,(function(){return l(t.endpoint,t.templateId)}),false,(function(e){t.template=e;t.loading=false}))}return[2]}))}))};e.prototype.disconnectedCallback=function(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){d.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(){this.step="preview"};e.prototype.handleTemplateCreated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.loadTemplate(e)];case 1:n.sent();this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles");return[2]}}))}))};e.prototype.handleRolesUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleTemplateUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.handleStepChanged=function(e){var t;this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)};e.prototype.render=function(){var e=this;if(this.loading){return i(r,{class:"loading"},i("verdocs-loader",null))}if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return i(r,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),this.step==="attachments"&&i("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleAttachmentsNext()},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="roles"&&i("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleRolesNext()},onRolesUpdated:function(t){return e.handleRolesUpdated(t)}}),this.step==="settings"&&i("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},i("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}})),this.step==="fields"&&i("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="preview"&&i("div",{class:"preview-container"},i("div",{class:"preview-send-wrapper"},i("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:function(t){var n;return(n=e.send)===null||n===void 0?void 0:n.emit(t.detail)},style:{width:"100%"}})),i("div",{class:"preview-preview-wrapper"},i("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());f.style=u}}}));
2
- //# sourceMappingURL=p-34c2298e.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function l(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(i=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=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++;r=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];r=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-52c3e8b0.system.js"],(function(e){"use strict";var t,n,i,r,o,s,l,a,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.g},function(e){s=e.VerdocsEndpoint;l=e.getTemplate},function(e){a=e.S},function(e){d=e.S}],execute:function(){var c='@-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-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157);box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157)}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';var u=c;var f=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.send=n(this,"send",7);this.templateUpdated=n(this,"templateUpdated",7);this.templateCreated=n(this,"templateCreated",7);this.rolesUpdated=n(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=s.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.onTemplateIdChanged=function(e,t){if(!t&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.onStepChanged=function(){this.loadTemplate(this.templateId).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,r,o;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID, activating upload mode");this.step="attachments";return[2]}try{this.loadTemplate(this.templateId).catch((function(e){return console.log("[BUILD] Unable to load template",e)}))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new a(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(o=e.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.loadTemplate=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){if(e){d.subscribe("templates",this.templateId,(function(){return l(t.endpoint,t.templateId)}),false,(function(e){t.template=e;t.loading=false}))}return[2]}))}))};e.prototype.disconnectedCallback=function(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){d.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(){this.step="preview"};e.prototype.handleTemplateCreated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.loadTemplate(e)];case 1:n.sent();this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles");return[2]}}))}))};e.prototype.handleRolesUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleTemplateUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.handleStepChanged=function(e){var t;this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)};e.prototype.render=function(){var e=this;if(this.loading){return i(r,{class:"loading"},i("verdocs-loader",null))}if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return i(r,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),this.step==="attachments"&&i("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleAttachmentsNext()},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="roles"&&i("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleRolesNext()},onRolesUpdated:function(t){return e.handleRolesUpdated(t)}}),this.step==="settings"&&i("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},i("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}})),this.step==="fields"&&i("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="preview"&&i("div",{class:"preview-container"},i("div",{class:"preview-send-wrapper"},i("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:function(t){var n;return(n=e.send)===null||n===void 0?void 0:n.emit(t.detail)},style:{width:"100%"}})),i("div",{class:"preview-preview-wrapper"},i("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());f.style=u}}}));
2
+ //# sourceMappingURL=p-cabfdb9d.system.entry.js.map
@@ -1,2 +1,2 @@
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 s(e){try{c(o.next(e))}catch(e){a(e)}}function n(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,n)}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,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(i=0)),i)try{if(o=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-65be7617.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var t,i,o,r,a,s,n,c,l,d,u,h,p,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;a=e.F;s=e.g},function(e){n=e.VerdocsEndpoint;c=e.getTemplateDocumentPageDisplayUri;l=e.getTemplate},function(e){d=e.t;u=e.j;h=e.g},function(e){p=e.S},function(e){f=e.c},function(){},function(){},function(){}],execute:function(){var b="@-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-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var v=b;var m=e("verdocs_template_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=n.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,c(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(d((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(function(){return l(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return o(r,null,o("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return o(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var r;return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var i,r;var s=h(t);var n=t.name,c=t.type,l=t.multiline;var d=e,p=d.xScale,f=d.yScale,b=d.templateId,v=d.editable,m=d.disabled,g=d.done,y=d.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){c="textarea";l=true}switch(c){case"textbox":return o("verdocs-field-textbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,multiline:l,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"textarea":return o("verdocs-field-textarea",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"date":return o("verdocs-field-date",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"attachment":return o("verdocs-field-attachment",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"dropdown":return o("verdocs-field-dropdown",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"initial":return o("verdocs-field-initial",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"signature":return o("verdocs-field-signature",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,e.xScale,e.yScale)});case"timestamp":return o("verdocs-field-timestamp",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"checkbox":return o("verdocs-field-checkbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"radio":return o("verdocs-field-radio",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});default:return o(a,null,n)}}))):e.pageDisplayUri?o("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):o("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());m.style=v;var g='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var y=g;var x=e("verdocs_toolbar_icon",function(){function e(e){t(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=f(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(r,{key:"98b2f6b2a2711df2cf8e687e38684d495b6e7d50",class:{}},o("div",{key:"49500d4d3348e2ccd6c9cbe7867645756c6cf5ef","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),o("div",{key:"e64aa823a8a09b10a9166f96be633439d959d3ff",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,o("div",{key:"399156e882824870173ecf3e4bcc35f2ba720b8c","data-popper-arrow":"true",class:"arrow"})))};return e}());x.style=y}}}));
2
- //# sourceMappingURL=p-90690dde.system.entry.js.map
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 s(e){try{c(o.next(e))}catch(e){a(e)}}function n(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,n)}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,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(i=0)),i)try{if(o=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-52c3e8b0.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var t,i,o,r,a,s,n,c,l,d,u,h,p,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;a=e.F;s=e.g},function(e){n=e.VerdocsEndpoint;c=e.getTemplateDocumentPageDisplayUri;l=e.getTemplate},function(e){d=e.t;u=e.j;h=e.g},function(e){p=e.S},function(e){f=e.c},function(){},function(){},function(){}],execute:function(){var b="@-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-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var v=b;var m=e("verdocs_template_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=n.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,c(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(d((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(function(){return l(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return o(r,null,o("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return o(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var r;return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var i,r;var s=h(t);var n=t.name,c=t.type,l=t.multiline;var d=e,p=d.xScale,f=d.yScale,b=d.templateId,v=d.editable,m=d.disabled,g=d.done,y=d.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){c="textarea";l=true}switch(c){case"textbox":return o("verdocs-field-textbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,multiline:l,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"textarea":return o("verdocs-field-textarea",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"date":return o("verdocs-field-date",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"attachment":return o("verdocs-field-attachment",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"dropdown":return o("verdocs-field-dropdown",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"initial":return o("verdocs-field-initial",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"signature":return o("verdocs-field-signature",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,e.xScale,e.yScale)});case"timestamp":return o("verdocs-field-timestamp",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"checkbox":return o("verdocs-field-checkbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"radio":return o("verdocs-field-radio",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});default:return o(a,null,n)}}))):e.pageDisplayUri?o("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):o("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());m.style=v;var g='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var y=g;var x=e("verdocs_toolbar_icon",function(){function e(e){t(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=f(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(r,{key:"98b2f6b2a2711df2cf8e687e38684d495b6e7d50",class:{}},o("div",{key:"49500d4d3348e2ccd6c9cbe7867645756c6cf5ef","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),o("div",{key:"e64aa823a8a09b10a9166f96be633439d959d3ff",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,o("div",{key:"399156e882824870173ecf3e4bcc35f2ba720b8c","data-popper-arrow":"true",class:"arrow"})))};return e}());x.style=y}}}));
2
+ //# sourceMappingURL=p-d1d95df4.system.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as s,H as o}from"./p-b9654a5e.js";import{VerdocsEndpoint as t,getEnvelope as r,getInPersonLink as l,getRecipientsWithActions as n,recipientCanAct as a,formatFullName as c}from"@verdocs/js-sdk";import{S as d}from"./p-fd97809c.js";import{S as p}from"./p-3828cb31.js";const m='@-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%}';const u=m;const h=class{constructor(s){e(this,s);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=t.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`;this.gettingLinks={};this.links={};this.loading=true;this.envelope=null}async componentWillLoad(){var e,i,s;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(o){console.log("[RECIPIENTS] Error loading envelope",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(o.message,(i=o.response)===null||i===void 0?void 0:i.status,(s=o.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();p.subscribe("envelopes",this.envelopeId,(()=>r(this.endpoint,this.envelopeId)),false,(e=>{this.envelope=e;this.loading=false;this.sortEnvelopeRecipients()}))}unlistenToEnvelope(){if(this.envelopeListenerId){p.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}sortEnvelopeRecipients(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}handleAnother(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleView(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:true};l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:false};this.links={...this.links,[e.role_name]:i.link};this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:false};console.log("[RECIPIENTS] Error getting link",i);(s=this.sdkError)===null||s===void 0?void 0:s.emit(i)}))}render(){var e;if(this.loading){return s(o,null)}return s(o,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).map((e=>{const i=n(this.envelope);const o=a(e,i);const t=this.links[e.role_name];const r=this.gettingLinks[e.role_name];const l=c(e);return s("div",{class:"summary-recipient"},s("div",{class:"role-name"},e.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},l," (",e.email||e.phone,")"),o&&!t&&s("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:r,onClick:()=>this.getLink(e)})),t&&s("div",{class:"link-wrapper"},s("div",{class:"link"},t),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(t)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&s("div",{class:"buttons"},this.canSendAnother&&s("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&s("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};h.style=u;export{h as verdocs_envelope_recipient_summary};
2
- //# sourceMappingURL=p-60da8e6b.entry.js.map
1
+ import{r as e,c as i,h as s,H as o}from"./p-b9654a5e.js";import{VerdocsEndpoint as t,getEnvelope as r,getInPersonLink as l,getRecipientsWithActions as n,recipientCanAct as a,formatFullName as c}from"@verdocs/js-sdk";import{S as d}from"./p-fd97809c.js";import{S as p}from"./p-d4be87ef.js";const m='@-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%}';const u=m;const h=class{constructor(s){e(this,s);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=t.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`;this.gettingLinks={};this.links={};this.loading=true;this.envelope=null}async componentWillLoad(){var e,i,s;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(o){console.log("[RECIPIENTS] Error loading envelope",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(o.message,(i=o.response)===null||i===void 0?void 0:i.status,(s=o.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();p.subscribe("envelopes",this.envelopeId,(()=>r(this.endpoint,this.envelopeId)),false,(e=>{this.envelope=e;this.loading=false;this.sortEnvelopeRecipients()}))}unlistenToEnvelope(){if(this.envelopeListenerId){p.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}sortEnvelopeRecipients(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}handleAnother(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleView(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:true};l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:false};this.links={...this.links,[e.role_name]:i.link};this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:false};console.log("[RECIPIENTS] Error getting link",i);(s=this.sdkError)===null||s===void 0?void 0:s.emit(i)}))}render(){var e;if(this.loading){return s(o,null)}return s(o,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).map((e=>{const i=n(this.envelope);const o=a(e,i);const t=this.links[e.role_name];const r=this.gettingLinks[e.role_name];const l=c(e);return s("div",{class:"summary-recipient"},s("div",{class:"role-name"},e.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},l," (",e.email||e.phone,")"),o&&!t&&s("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:r,onClick:()=>this.getLink(e)})),t&&s("div",{class:"link-wrapper"},s("div",{class:"link"},t),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(t)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&s("div",{class:"buttons"},this.canSendAnother&&s("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&s("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};h.style=u;export{h as verdocs_envelope_recipient_summary};
2
+ //# sourceMappingURL=p-d3a8c6b8.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{getTemplate as t}from"@verdocs/js-sdk";const n=t=>typeof t;const s="";const o=n(s);const e=n(true);const c=n(0);const l=n(n);const r="type";const a="default";const i="Listener";const u="add";const f="Has";const d="Ids";const h="Table";const b=h+"s";const g=h+d;const T="Row";const _=T+"Count";const p=T+d;const S="Cell";const w=S+d;const m="Value";const C=m+"s";const V=m+d;const I=t=>s+t;const y=isFinite;const R=(t,n)=>t instanceof n;const v=t=>t==undefined;const J=(t,n,s)=>v(t)?s?.():n(t);const L=t=>t==o||t==e;const E=t=>n(t)==l;const O=t=>Array.isArray(t);const j=(t,n,s)=>t.slice(n,s);const N=t=>t.length;const F=(t,n)=>t.test(n);const M=(t,n)=>t.includes(n);const $=(t,n)=>t.every(n);const x=(t,n)=>N(t)===N(n)&&$(t,((t,s)=>n[s]===t));const A=(t,n)=>t.sort(n);const D=(t,n)=>t.forEach(n);const P=(t,n)=>t.map(n);const k=(t,n,s)=>t.reduce(n,s);const z=(t,...n)=>t.push(...n);const H=t=>t.shift();const W=Object;const q=t=>W.getPrototypeOf(t);const B=W.entries;const G=W.isFrozen;const K=t=>!v(t)&&J(q(t),(t=>t==W.prototype||v(q(t))),(()=>true));const Q=W.keys;const U=W.freeze;const X=(t=[])=>W.fromEntries(t);const Y=(t,n)=>n in t;const Z=(t,n)=>{delete t[n];return t};const tt=(t,n)=>D(B(t),(([t,s])=>n(s,t)));const nt=(t,n)=>P(B(t),(([t,s])=>n(s,t)));const st=(t,n)=>X(nt(t,((t,s)=>[s,n(t,s)])));const ot=t=>N(Q(t));const et=t=>K(t)&&ot(t)==0;const ct=(t,n,s,o=0)=>{if(v(t)||!K(t)||!o&&et(t)||G(t)){s?.();return false}tt(t,((s,o)=>{if(!n(s,o)){Z(t,o)}}));return o?true:!et(t)};const lt=t=>n=>k(ht(n),((n,s)=>n+t(s)),0);const rt=t=>t?.size??0;const at=lt(rt);const it=lt(at);const ut=lt(it);const ft=(t,n)=>t?.has(n)??false;const dt=t=>v(t)||rt(t)==0;const ht=t=>[...t?.values()??[]];const bt=t=>t.clear();const gt=(t,n)=>t?.forEach(n);const Tt=(t,n)=>t?.delete(n);const _t=t=>new Map(t);const pt=t=>[...t?.keys()??[]];const St=(t,n)=>t?.get(n);const wt=(t,n)=>gt(t,((t,s)=>n(s,t)));const mt=(t,n)=>P([...t?.entries()??[]],(([t,s])=>n(s,t)));const Ct=(t,n,s)=>v(s)?(Tt(t,n),t):t?.set(n,s);const Vt=(t,n,s,o)=>{if(!ft(t,n)){Ct(t,n,s())}else{o?.(St(t,n))}return St(t,n)};const It=(t,n,s,o=Ct)=>{st(n,((n,o)=>s(t,o,n)));wt(t,(s=>Y(n,s)?0:o(t,s)));return t};const yt=(t,n,s,o)=>{const e={};gt(t,((t,c)=>{if(!s?.(t,c)){const s=n?n(t,c):t;if(!o?.(s)){e[c]=s}}}));return e};const Rt=(t,n,s)=>yt(t,(t=>yt(t,n,s)),dt,et);const vt=(t,n,s)=>yt(t,(t=>Rt(t,n,s)),dt,et);const Jt=(t,n)=>{const s=_t();gt(t,((t,o)=>s.set(o,n?.(t)??t)));return s};const Lt=t=>Jt(t,Jt);const Et=t=>Jt(t,Lt);const Ot=(t,n,s,o,e=0)=>J((s?Vt:St)(t,n[e],e>N(n)-2?s:_t),(c=>{if(e>N(n)-2){if(o?.(c)){Ct(t,n[e])}return c}const l=Ot(c,n,s,o,e+1);if(dt(c)){Ct(t,n[e])}return l}));const jt=t=>{const s=n(t);return L(s)||s==c&&y(t)?s:undefined};const Nt=(t,n,s,o,e)=>v(e)?t.delCell(n,s,o,true):t.setCell(n,s,o,e);const Ft=(t,n,s)=>v(s)?t.delValue(n):t.setValue(n,s);const Mt=t=>new Set(O(t)||v(t)?t:[t]);const $t=(t,n)=>t?.add(n);const xt=/^\d+$/;const At=()=>{const t=[];let n=0;return[o=>(o?H(t):null)??s+n++,n=>{if(F(xt,n)&&N(t)<1e3){z(t,n)}}]};const Dt=(t,n=[s])=>{const o=[];const e=(t,s)=>s==N(n)?z(o,t):n[s]===null?gt(t,(t=>e(t,s+1))):D([n[s],null],(n=>e(St(t,n),s+1)));e(t,0);return o};const Pt=t=>{let n;const[o,e]=At();const c=_t();const l=(e,l,r,a=[],i=(()=>[]))=>{n??=t();const u=o(1);Ct(c,u,[e,l,r,a,i]);$t(Ot(l,r??[s],Mt),u);return u};const r=(t,s,...o)=>D(Dt(t,s),(t=>gt(t,(t=>St(c,t)[0](n,...s??[],...o)))));const a=t=>J(St(c,t),(([,n,o])=>{Ot(n,o??[s],undefined,(n=>{Tt(n,t);return dt(n)?1:0}));Ct(c,t);e(t);return o}));const i=t=>J(St(c,t),(([t,,s=[],o,e])=>{const c=(...l)=>{const r=N(l);if(r==N(s)){t(n,...l,...e(l))}else if(v(s[r])){D(o[r]?.(...l)??[],(t=>c(...l,t)))}else{c(...l,s[r])}};c()}));return[l,r,a,i]};const kt=(t,n)=>(t??0)<(n??0)?-1:1;const zt=t=>[t,t];const Ht=(t,n=at)=>n(t[0])+n(t[1]);const Wt=()=>[_t(),_t()];const qt=t=>[...t];const Bt=([t,n])=>t===n;const Gt=JSON.stringify;const Kt=JSON.parse;const Qt=t=>Gt(t,((t,n)=>R(n,Map)?W.fromEntries([...n]):n));const Ut=(t,n,s)=>Ct(t,n,St(t,n)==-s?undefined:s);const Xt=()=>{let t;let n;let s=false;let o=false;let e=0;let l=[];const d=_t();const y=_t();const R=_t();const N=_t();const F=_t();const $=_t();const k=_t();const H=_t();const W=_t();const q=_t();const B=_t();const G=_t();const K=_t();const Q=_t();const X=Mt();const tt=_t();const nt=_t();const ot=_t();const lt=_t();const ht=Wt();const Ot=Wt();const xt=Wt();const Dt=Wt();const Gt=Wt();const Yt=Wt();const Zt=Wt();const tn=Wt();const nn=Wt();const sn=Wt();const on=Wt();const en=Wt();const cn=Wt();const ln=Wt();const rn=Wt();const an=Wt();const un=Wt();const fn=Wt();const dn=Wt();const hn=Wt();const bn=Wt();const gn=Wt();const Tn=_t();const _n=Wt();const[pn,Sn,wn,mn]=Pt((()=>jo));const Cn=t=>ct(t,(t=>ct(t,In)));const Vn=t=>ct(t,In);const In=t=>{if(!ct(t,((t,n)=>M([r,a],n)))){return false}const n=t[r];if(!L(n)&&n!=c){return false}if(jt(t[a])!=n){Z(t,a)}return true};const yn=O;const Rn=t=>ct(t,vn,es);const vn=(n,s)=>(!t||ft(B,s)||es(s))&&ct(n,((t,n)=>Jn(s,n,t)),(()=>es(s)));const Jn=(t,n,s,o)=>ct(o?s:jn(s,t,n),((o,e)=>J(Ln(t,n,e,o),(t=>{s[e]=t;return true}),(()=>false))),(()=>es(t,n)));const Ln=(n,s,o,e)=>t?J(St(St(B,n),o),(t=>jt(e)!=t[r]?es(n,s,o,e,t[a]):e),(()=>es(n,s,o,e))):v(jt(e))?es(n,s,o,e):e;const En=(t,n)=>ct(n?t:Nn(t),((n,s)=>J(On(s,n),(n=>{t[s]=n;return true}),(()=>false))),(()=>cs()));const On=(t,s)=>n?J(St(K,t),(n=>jt(s)!=n[r]?cs(t,s,n[a]):s),(()=>cs(t,s))):v(jt(s))?cs(t,s):s;const jn=(t,n,s)=>{J(St(G,n),(([o,e])=>{gt(o,((n,s)=>{if(!Y(t,s)){t[s]=n}}));gt(e,(o=>{if(!Y(t,o)){es(n,s,o)}}))}));return t};const Nn=t=>{if(n){gt(Q,((n,s)=>{if(!Y(t,s)){t[s]=n}}));gt(X,(n=>{if(!Y(t,n)){cs(n)}}))}return t};const Fn=t=>It(B,t,((t,n,s)=>{const o=_t();const e=Mt();It(Vt(B,n,_t),s,((t,n,s)=>{Ct(t,n,s);J(s[a],(t=>Ct(o,n,t)),(()=>$t(e,n)))}));Ct(G,n,[o,e])}),((t,n)=>{Ct(B,n);Ct(G,n)}));const Mn=t=>It(K,t,((t,n,s)=>{Ct(K,n,s);J(s[a],(t=>Ct(Q,n,t)),(()=>$t(X,n)))}),((t,n)=>{Ct(K,n);Ct(Q,n);Tt(X,n)}));const $n=t=>et(t)?eo():zs(t);const xn=([t,n])=>{(et(t)?eo:zs)(t);(et(n)?ao:Ks)(n)};const An=t=>It(ot,t,((t,n,s)=>Dn(n,s)),((t,n)=>Kn(n)));const Dn=(t,n)=>It(Vt(ot,t,(()=>{Yn(t,1);Ct(tt,t,At());Ct(nt,t,_t());return _t()})),n,((n,s,o)=>Pn(t,n,s,o)),((n,s)=>Qn(t,n,s)));const Pn=(t,n,s,o,e)=>It(Vt(n,s,(()=>{Zn(t,s,1);return _t()})),o,((n,o,e)=>kn(t,s,n,o,e)),((o,c)=>Un(t,n,s,o,c,e)));const kn=(t,n,s,o,e)=>{if(!ft(s,o)){ts(t,n,o,1)}const c=St(s,o);if(e!==c){ns(t,n,o,c,e);Ct(s,o,e)}};const zn=(t,n,s,o,e)=>J(St(n,s),(n=>kn(t,s,n,o,e)),(()=>Pn(t,n,s,jn({[o]:e},t,s))));const Hn=t=>et(t)?ao():Ks(t);const Wn=t=>It(lt,t,((t,n,s)=>qn(n,s)),((t,n)=>Xn(n)));const qn=(t,n)=>{if(!ft(lt,t)){ss(t,1)}const s=St(lt,t);if(n!==s){os(t,s,n);Ct(lt,t,n)}};const Bn=(t,n)=>{const[s]=St(tt,t);let o;do{o=s(n)}while(ft(St(ot,t),o));return o};const Gn=t=>St(ot,t)??Dn(t,{});const Kn=t=>Dn(t,{});const Qn=(t,n,s)=>{const[,o]=St(tt,t);o(s);Pn(t,n,s,{},true)};const Un=(t,n,s,o,e,c)=>{const l=St(St(G,t)?.[0],e);if(!v(l)&&!c){return kn(t,s,o,e,l)}const r=n=>{ns(t,s,n,St(o,n));ts(t,s,n,-1);Ct(o,n)};if(v(l)){r(e)}else{wt(o,r)}if(dt(o)){Zn(t,s,-1);if(dt(Ct(n,s))){Yn(t,-1);Ct(ot,t);Ct(tt,t);Ct(nt,t)}}};const Xn=t=>{const n=St(Q,t);if(!v(n)){return qn(t,n)}os(t,St(lt,t));ss(t,-1);Ct(lt,t)};const Yn=(t,n)=>Ut(d,t,n);const Zn=(t,n,s)=>Ut(Vt(N,t,_t),n,s)&&Ct(R,t,Vt(R,t,(()=>0))+s);const ts=(t,n,s,o)=>{const e=St(nt,t);const c=St(e,s)??0;if(c==0&&o==1||c==1&&o==-1){Ut(Vt(y,t,_t),s,o)}Ct(e,s,c!=-o?c+o:null);Ut(Vt(Vt(F,t,_t),n,_t),s,o)};const ns=(t,n,s,o,e)=>{Vt(Vt(Vt($,t,_t),n,_t),s,(()=>[o,0]))[1]=e;l[3]?.(t,n,s,e)};const ss=(t,n)=>Ut(k,t,n);const os=(t,n,s)=>{Vt(H,t,(()=>[n,0]))[1]=s;l[4]?.(t,s)};const es=(t,n,s,o,e)=>{z(Vt(Vt(Vt(W,t,_t),n,_t),s,(()=>[])),o);return e};const cs=(t,n,s)=>{z(Vt(q,t,(()=>[])),n);return s};const ls=(t,n,s)=>J(St(St(St($,t),n),s),(([t,n])=>[true,t,n]),(()=>[false,...zt(Is(t,n,s))]));const rs=t=>J(St(H,t),(([t,n])=>[true,t,n]),(()=>[false,...zt(vs(t))]));const as=t=>!dt(W)&&!dt(an[t])?gt(t?Et(W):W,((n,s)=>gt(n,((n,o)=>gt(n,((n,e)=>Sn(an[t],[s,o,e],n))))))):0;const is=t=>!dt(q)&&!dt(un[t])?gt(t?Jt(q):q,((n,s)=>Sn(un[t],[s],n))):0;const us=(t,n,s,o)=>{if(!dt(t)){Sn(n,o,(()=>yt(t)));wt(t,((t,n)=>Sn(s,[...o??[],t],n==1)));return 1}};const fs=t=>{const n=Js();if(n!=s){Sn(ht[t],undefined,n)}const o=dt(sn[t]);const e=dt(cn[t])&&dt(ln[t])&&dt(nn[t])&&dt(on[t])&&dt(Yt[t])&&dt(Zt[t])&&dt(tn[t])&&o&&dt(xt[t])&&dt(Dt[t]);const c=dt(rn[t])&&dt(en[t])&&dt(Gt[t])&&dt(Ot[t]);if(!e||!c){const n=t?[Jt(d),Lt(y),Jt(R),Lt(N),Et(F),Et($)]:[d,y,R,N,F,$];if(!e){us(n[0],xt[t],Dt[t]);gt(n[1],((n,s)=>us(n,Yt[t],Zt[t],[s])));gt(n[2],((n,s)=>{if(n!=0){Sn(tn[t],[s],Ss(s))}}));const s=Mt();gt(n[3],((n,e)=>{if(us(n,nn[t],on[t],[e])&&!o){Sn(sn[t],[e,null]);$t(s,e)}}));if(!o){gt(n[5],((n,o)=>{if(!ft(s,o)){const s=Mt();gt(n,(t=>gt(t,(([n,o],e)=>o!==n?$t(s,e):Tt(t,e)))));gt(s,(n=>Sn(sn[t],[o,n])))}}))}gt(n[4],((n,s)=>gt(n,((n,o)=>us(n,cn[t],ln[t],[s,o])))))}if(!c){let s;gt(n[5],((n,o)=>{let e;gt(n,((n,c)=>{let l;gt(n,(([n,r],a)=>{if(r!==n){Sn(rn[t],[o,c,a],r,n,ls);s=e=l=1}}));if(l){Sn(en[t],[o,c],ls)}}));if(e){Sn(Gt[t],[o],ls)}}));if(s){Sn(Ot[t],undefined,ls)}}}};const ds=t=>{const n=Ns();if(n!=o){Sn(fn[t],undefined,n)}const s=dt(hn[t])&&dt(bn[t]);const e=dt(gn[t])&&dt(dn[t]);if(!s||!e){const n=t?[Jt(k),Jt(H)]:[k,H];if(!s){us(n[0],hn[t],bn[t])}if(!e){let s;gt(n[1],(([n,o],e)=>{if(o!==n){Sn(gn[t],[e],o,n,rs);s=1}}));if(s){Sn(dn[t],undefined,rs)}}}};const hs=(t,...n)=>{bo((()=>t(...P(n,I))));return jo};const bs=()=>[gs(),ys()];const gs=()=>vt(ot);const Ts=()=>pt(ot);const _s=t=>Rt(St(ot,I(t)));const ps=t=>pt(St(nt,I(t)));const Ss=t=>rt(St(ot,I(t)));const ws=t=>pt(St(ot,I(t)));const ms=(t,n,s,o=0,e)=>P(j(A(mt(St(ot,I(t)),((t,s)=>[v(n)?s:St(t,I(n)),s])),(([t],[n])=>kt(t,n)*(s?-1:1))),o,v(e)?e:o+e),(([,t])=>t));const Cs=(t,n)=>yt(St(St(ot,I(t)),I(n)));const Vs=(t,n)=>pt(St(St(ot,I(t)),I(n)));const Is=(t,n,s)=>St(St(St(ot,I(t)),I(n)),I(s));const ys=()=>yt(lt);const Rs=()=>pt(lt);const vs=t=>St(lt,I(t));const Js=()=>!dt(ot);const Ls=t=>ft(ot,I(t));const Es=(t,n)=>ft(St(nt,I(t)),I(n));const Os=(t,n)=>ft(St(ot,I(t)),I(n));const js=(t,n,s)=>ft(St(St(ot,I(t)),I(n)),I(s));const Ns=()=>!dt(lt);const Fs=t=>ft(lt,I(t));const Ms=()=>Qt(ot);const $s=()=>Qt(lt);const xs=()=>Qt([ot,lt]);const As=()=>Qt(B);const Ds=()=>Qt(K);const Ps=()=>Qt([B,K]);const ks=t=>hs((()=>{const n=E(t)?t():t;if(yn(n)){xn(n)}}));const zs=t=>hs((()=>Rn(t)?An(t):0));const Hs=(t,n)=>hs((t=>vn(n,t)?Dn(t,n):0),t);const Ws=(t,n,s)=>hs(((t,n)=>Jn(t,n,s)?Pn(t,Gn(t),n,s):0),t,n);const qs=(t,n,s=true)=>bo((()=>{let o=undefined;if(Jn(t,o,n)){t=I(t);Pn(t,Gn(t),o=Bn(t,s?1:0),n)}return o}));const Bs=(t,n,s)=>hs(((t,n)=>{if(Jn(t,n,s,1)){const o=Gn(t);st(s,((s,e)=>zn(t,o,n,e,s)))}}),t,n);const Gs=(t,n,s,o)=>hs(((t,n,s)=>J(Ln(t,n,s,E(o)?o(Is(t,n,s)):o),(o=>zn(t,Gn(t),n,s,o)))),t,n,s);const Ks=t=>hs((()=>En(t)?Wn(t):0));const Qs=t=>hs((()=>En(t,1)?st(t,((t,n)=>qn(n,t))):0));const Us=(t,n)=>hs((t=>J(On(t,E(n)?n(vs(t)):n),(n=>qn(t,n)))),t);const Xs=t=>hs((()=>{st(t[0],((t,n)=>v(t)?co(n):st(t,((t,s)=>v(t)?lo(n,s):st(t,((t,o)=>Nt(jo,n,s,o,t)))))));st(t[1],((t,n)=>Ft(jo,n,t)))}));const Ys=t=>{try{$n(Kt(t))}catch{}return jo};const Zs=t=>{try{Hn(Kt(t))}catch{}return jo};const to=t=>hs((()=>{try{const[n,s]=Kt(t);$n(n);Hn(s)}catch{Ys(t)}}));const no=n=>hs((()=>{if(t=Cn(n)){Fn(n);if(!dt(ot)){const t=gs();eo();zs(t)}}}));const so=t=>hs((()=>{if(n=Vn(t)){const s=ys();fo();ao();n=true;Mn(t);Ks(s)}}));const oo=(t,n)=>hs((()=>{no(t);so(n)}));const eo=()=>hs((()=>An({})));const co=t=>hs((t=>ft(ot,t)?Kn(t):0),t);const lo=(t,n)=>hs(((t,n)=>J(St(ot,t),(s=>ft(s,n)?Qn(t,s,n):0))),t,n);const ro=(t,n,s,o)=>hs(((t,n,s)=>J(St(ot,t),(e=>J(St(e,n),(c=>ft(c,s)?Un(t,e,n,c,s,o):0))))),t,n,s);const ao=()=>hs((()=>Wn({})));const io=t=>hs((t=>ft(lt,t)?Xn(t):0),t);const uo=()=>hs((()=>{Fn({});t=false}));const fo=()=>hs((()=>{Mn({});n=false}));const ho=()=>hs((()=>{uo();fo()}));const bo=(t,n)=>{if(e!=-1){go();const s=t();po(n);return s}};const go=()=>{if(e!=-1){e++}if(e==1){l[0]?.();Sn(Tn)}return jo};const To=()=>[yt($,((t,n)=>St(d,n)===-1?undefined:yt(t,((t,s)=>St(St(N,n),s)===-1?undefined:yt(t,(([,t])=>t),(t=>Bt(t)))),dt,et)),dt,et),yt(H,(([,t])=>t),(t=>Bt(t))),1];const _o=()=>[!dt($),!dt(H),vt($,qt,Bt),vt(W),yt(H,qt,Bt),yt(q),yt(d),Rt(N),vt(F),yt(k)];const po=t=>{if(e>0){e--;if(e==0){e=1;as(1);if(!dt($)){fs(1)}is(1);if(!dt(H)){ds(1)}if(t?.(jo)){gt($,((t,n)=>gt(t,((t,s)=>gt(t,(([t],o)=>Nt(jo,n,s,o,t)))))));bt($);gt(H,(([t],n)=>Ft(jo,n,t)));bt(H)}Sn(_n[0],undefined);e=-1;as(0);if(!dt($)){fs(0)}is(0);if(!dt(H)){ds(0)}l[1]?.();Sn(_n[1],undefined);l[2]?.();e=0;s=Js();o=Ns();D([d,y,R,N,F,$,W,k,H,q],bt)}}return jo};const So=t=>gt(ot,((n,s)=>t(s,(t=>gt(n,((n,s)=>t(s,(t=>wt(n,t)))))))));const wo=(t,n)=>wt(St(nt,I(t)),n);const mo=(t,n)=>gt(St(ot,I(t)),((t,s)=>n(s,(n=>wt(t,n)))));const Co=(t,n,s)=>wt(St(St(ot,I(t)),I(n)),s);const Vo=t=>wt(lt,t);const Io=(t,n,s,o,e,c,l)=>{let r=ms(t,n,s,o,e);return pn((()=>{const l=ms(t,n,s,o,e);if(!x(l,r)){r=l;c(jo,t,n,s,o,e,r)}}),sn[l?1:0],[t,n],[Ts])};const yo=t=>pn(t,Tn);const Ro=t=>pn(t,_n[0]);const vo=t=>pn(t,_n[1]);const Jo=t=>{mn(t);return jo};const Lo=t=>{wn(t);return jo};const Eo=()=>({hasTables:Ht(ht),tables:Ht(Ot),tableIds:Ht(xt),hasTable:Ht(Dt),table:Ht(Gt),tableCellIds:Ht(Yt),hasTableCell:Ht(Zt,it),rowCount:Ht(tn),rowIds:Ht(nn),sortedRowIds:Ht(sn),hasRow:Ht(on,it),row:Ht(en,it),cellIds:Ht(cn,it),hasCell:Ht(ln,ut),cell:Ht(rn,ut),invalidCell:Ht(an,ut),hasValues:Ht(fn),values:Ht(dn),valueIds:Ht(hn),hasValue:Ht(bn),value:Ht(gn),invalidValue:Ht(un),transaction:at(Tn)+Ht(_n)});const Oo=(t,n,s,o,e)=>l=[t,n,s,o,e];const jo={getContent:bs,getTables:gs,getTableIds:Ts,getTable:_s,getTableCellIds:ps,getRowCount:Ss,getRowIds:ws,getSortedRowIds:ms,getRow:Cs,getCellIds:Vs,getCell:Is,getValues:ys,getValueIds:Rs,getValue:vs,hasTables:Js,hasTable:Ls,hasTableCell:Es,hasRow:Os,hasCell:js,hasValues:Ns,hasValue:Fs,getTablesJson:Ms,getValuesJson:$s,getJson:xs,getTablesSchemaJson:As,getValuesSchemaJson:Ds,getSchemaJson:Ps,hasTablesSchema:()=>t,hasValuesSchema:()=>n,setContent:ks,setTables:zs,setTable:Hs,setRow:Ws,addRow:qs,setPartialRow:Bs,setCell:Gs,setValues:Ks,setPartialValues:Qs,setValue:Us,applyChanges:Xs,setTablesJson:Ys,setValuesJson:Zs,setJson:to,setTablesSchema:no,setValuesSchema:so,setSchema:oo,delTables:eo,delTable:co,delRow:lo,delCell:ro,delValues:ao,delValue:io,delTablesSchema:uo,delValuesSchema:fo,delSchema:ho,transaction:bo,startTransaction:go,getTransactionChanges:To,getTransactionLog:_o,finishTransaction:po,forEachTable:So,forEachTableCell:wo,forEachRow:mo,forEachCell:Co,forEachValue:Vo,addSortedRowIdsListener:Io,addStartTransactionListener:yo,addWillFinishTransactionListener:Ro,addDidFinishTransactionListener:vo,callListener:Jo,delListener:Lo,getListenerStats:Eo,isMergeable:()=>false,createStore:Xt,addListener:pn,callListeners:Sn,setInternalListeners:Oo};st({[f+b]:[0,ht,[],()=>[Js()]],[b]:[0,Ot],[g]:[0,xt],[f+h]:[1,Dt,[Ts],t=>[Ls(...t)]],[h]:[1,Gt,[Ts]],[h+w]:[1,Yt,[Ts]],[f+h+S]:[2,Zt,[Ts,ps],t=>[Es(...t)]],[_]:[1,tn,[Ts]],[p]:[1,nn,[Ts]],[f+T]:[2,on,[Ts,ws],t=>[Os(...t)]],[T]:[2,en,[Ts,ws]],[w]:[2,cn,[Ts,ws]],[f+S]:[3,ln,[Ts,ws,Vs],t=>[js(...t)]],[S]:[3,rn,[Ts,ws,Vs],t=>zt(Is(...t))],InvalidCell:[3,an],[f+C]:[0,fn,[],()=>[Ns()]],[C]:[0,dn],[V]:[0,hn],[f+m]:[1,bn,[Rs],t=>[Fs(...t)]],[m]:[1,gn,[Rs],t=>zt(vs(t[0]))],InvalidValue:[1,un]},(([t,n,s,o],e)=>{jo[u+e+i]=(...e)=>pn(e[t],n[e[t+1]?1:0],t>0?j(e,0,t):undefined,s,o)}));return U(jo)};const Yt=Xt();Yt.delTables();Yt.delValues();console.log("[STORE] Data store initialized.");const Zt=(t,n)=>{try{return JSON.parse(t)}catch(t){return n||null}};const tn=t=>{const n={};for(let s in t){if(typeof t[s]==="string"||typeof t[s]==="number"||typeof t[s]==="boolean"){n[s]=t[s]}else if(t[s]===null){n[`__null__${s}`]=""}else if(Array.isArray(t[s])){n[`__array__${s}`]=JSON.stringify(t[s])}else if(typeof t[s]==="object"){n[`__object__${s}`]=JSON.stringify(t[s])}}return n};const nn=t=>{const n={};for(let s in t){if(s.startsWith("__null__")){n[s.replace("__null__","")]=null}else if(typeof t[s]==="string"&&s.startsWith("__array__")){n[s.replace("__array__","")]=Zt(t[s])}else if(typeof t[s]==="string"&&s.startsWith("__object__")){n[s.replace("__object__","")]=Zt(t[s])}else{n[s]=t[s]}}return n};const sn={store:Yt,subscribe(t,n,s,o,e){if(Yt.hasRow(t,n)){e(nn(Yt.getRow(t,n)))}const c=Yt.addRowListener(t,n,(()=>{const s=Yt.getRow(t,n);e(nn(s))}));if(!Yt.hasRow(t,n)||o){console.log("[STORE] Loading/reloading",{tableId:t,rowId:n});s().then((s=>{Yt.setRow(t,n,tn(s))})).catch((s=>{console.error("[STORE] Error getting row",{tableId:t,rowId:n,forceReload:o},s)}))}return c},unsubscribe(t){Yt.delListener(t)},async getTemplate(n,s,o=false){if(!o){if(!Yt.hasRow("templates",s)){return null}const t=Yt.getRow("templates",s);return nn(t)}const e=await t(n,s);console.log("[STORE] Reloading template",e);Yt.setRow("templates",s,tn(e));return e},updateTemplate(t,n){Yt.setRow("templates",t,tn(n));return n},async getEnvelope(n,s,o=false){if(!o){if(!Yt.hasRow("envelopes",s)){return null}const t=Yt.getRow("envelopes",s);return nn(t)}const e=await t(n,s);Yt.setRow("envelopes",s,tn(e));return e},updateEnvelope(t,n){Yt.setRow("envelopes",t,tn(n));return n},getField(t,n,s,o){if(t==="template"){const t=Yt.getRow("templates",n);const e=nn(t);const c=(e.fields||[]).find((t=>t.name===s));const l=(e.roles||[]).map((t=>t.name));const r=l.findIndex((t=>t===c.role_name));return{index:Math.max(r,0),field:o||c}}else{const t=Yt.getRow("envelopes",n);const e=nn(t);const c=(e.fields||[]).find((t=>t.name===s));const l=(e.recipients||[]).map((t=>t.role_name));const r=l.findIndex((t=>t===c.role_name));return{index:r,field:o||c}}}};export{sn as S};
2
+ //# sourceMappingURL=p-d4be87ef.js.map