@verdocs/web-sdk 6.9.10 → 6.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +3 -3
  2. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js.map +1 -1
  3. package/dist/cjs/verdocs-auth.cjs.entry.js +4 -0
  4. package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
  5. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +121 -15
  6. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  7. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +9 -8
  8. package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js.map +1 -1
  9. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
  10. package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +7 -7
  13. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-preview_6.cjs.entry.js +4 -0
  15. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  16. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-sign.cjs.entry.js +7 -3
  19. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  20. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
  22. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  25. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js +6 -5
  26. package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js.map +1 -1
  27. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
  28. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
  29. package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js +1 -1
  30. package/dist/collection/components/dialogs/verdocs-passcode-dialog/verdocs-passcode-dialog.js +1 -1
  31. package/dist/collection/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.js +1 -1
  32. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
  33. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
  34. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
  35. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
  36. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +4 -0
  37. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
  38. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +4 -0
  39. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  40. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +7 -3
  41. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  42. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +1 -1
  43. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
  44. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
  45. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
  46. package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js +1 -1
  47. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
  48. package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
  49. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
  50. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  51. package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
  52. package/dist/components/{p-BxOEoXie.js → p-BIc5CIpg.js} +2 -2
  53. package/dist/components/{p-DjOTs59Z.js → p-BcQsqsDy.js} +2 -2
  54. package/dist/components/{p-Dtndevf4.js → p-BfKv6ivN.js} +2 -2
  55. package/dist/components/{p-Ce29XBfJ.js → p-Bkae9I4G.js} +2 -2
  56. package/dist/components/{p-Ce29XBfJ.js.map → p-Bkae9I4G.js.map} +1 -1
  57. package/dist/components/{p-D3qUITiS.js → p-BwUTiBud.js} +2 -2
  58. package/dist/components/{p-BVhOFpVZ.js → p-C8r3qDBh.js} +2 -2
  59. package/dist/components/p-C8r3qDBh.js.map +1 -0
  60. package/dist/components/{p-DsEO0-XR.js → p-CGWVITS0.js} +2 -2
  61. package/dist/components/{p-BvtSJusb.js → p-CGt7KiUu.js} +2 -2
  62. package/dist/components/{p-u16vefxk.js → p-CQUV5gMT.js} +2 -2
  63. package/dist/components/{p-Dmw-lE3L.js → p-CSIVZcVx.js} +2 -2
  64. package/dist/components/{p-C-V6jrel.js → p-DClinO5r.js} +2 -2
  65. package/dist/components/{p-D_8TNtkM.js → p-DGws2Zgt.js} +2 -2
  66. package/dist/components/p-DGws2Zgt.js.map +1 -0
  67. package/dist/components/{p-DVGumEtx.js → p-DRgoGiAA.js} +2 -2
  68. package/dist/components/{p-BT8wzCXz.js → p-DSK9z7EN.js} +2 -2
  69. package/dist/components/{p-tub_01MP.js → p-DXbBz25U.js} +2 -2
  70. package/dist/components/p-DeQsR41s.js +3 -0
  71. package/dist/components/p-DeQsR41s.js.map +1 -0
  72. package/dist/components/{p-DIOVejyL.js → p-DyhyfLyV.js} +2 -2
  73. package/dist/components/{p-Yxa93LOl.js → p-db6IAGB0.js} +2 -2
  74. package/dist/components/{p-CDMCVJys.js → p-qDQgyl7L.js} +2 -2
  75. package/dist/components/{p-CFEw4Xbi.js → p-sPseFic3.js} +2 -2
  76. package/dist/components/verdocs-auth.js +1 -1
  77. package/dist/components/verdocs-auth.js.map +1 -1
  78. package/dist/components/verdocs-build.js +1 -1
  79. package/dist/components/verdocs-contact-picker.js +1 -1
  80. package/dist/components/verdocs-download-dialog.js +1 -1
  81. package/dist/components/verdocs-envelope-document-page.js +1 -1
  82. package/dist/components/verdocs-envelope-sidebar.js +1 -1
  83. package/dist/components/verdocs-envelopes-list.js +1 -1
  84. package/dist/components/verdocs-field-attachment.js +1 -1
  85. package/dist/components/verdocs-initial-dialog.js +1 -1
  86. package/dist/components/verdocs-ok-dialog.js +1 -1
  87. package/dist/components/verdocs-otp-dialog.js +1 -1
  88. package/dist/components/verdocs-passcode-dialog.js +1 -1
  89. package/dist/components/verdocs-preview.js +1 -1
  90. package/dist/components/verdocs-question-dialog.js +1 -1
  91. package/dist/components/verdocs-quick-functions.js +1 -1
  92. package/dist/components/verdocs-search-tabs.js +1 -1
  93. package/dist/components/verdocs-send.js +1 -1
  94. package/dist/components/verdocs-sign-footer.js +1 -1
  95. package/dist/components/verdocs-sign.js +1 -1
  96. package/dist/components/verdocs-sign.js.map +1 -1
  97. package/dist/components/verdocs-signature-dialog.js +1 -1
  98. package/dist/components/verdocs-status-indicator.js +1 -1
  99. package/dist/components/verdocs-template-attachments.js +1 -1
  100. package/dist/components/verdocs-template-card.js +1 -1
  101. package/dist/components/verdocs-template-document-page.js +1 -1
  102. package/dist/components/verdocs-template-fields.js +1 -1
  103. package/dist/components/verdocs-template-role-properties.js +1 -1
  104. package/dist/components/verdocs-template-roles.js +1 -1
  105. package/dist/components/verdocs-template-star.js +1 -1
  106. package/dist/components/verdocs-template-tags.js +1 -1
  107. package/dist/components/verdocs-templates-list.js +1 -1
  108. package/dist/components/verdocs-upload-dialog.js +1 -1
  109. package/dist/components/verdocs-view.js +1 -1
  110. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +3 -3
  111. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
  112. package/dist/esm/verdocs-auth.entry.js +4 -0
  113. package/dist/esm/verdocs-auth.entry.js.map +1 -1
  114. package/dist/esm/verdocs-contact-picker.entry.js +121 -15
  115. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  116. package/dist/esm/verdocs-download-dialog_4.entry.js +9 -8
  117. package/dist/esm/verdocs-download-dialog_4.entry.js.map +1 -1
  118. package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
  119. package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
  120. package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
  121. package/dist/esm/verdocs-menu-panel_2.entry.js +7 -7
  122. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  123. package/dist/esm/verdocs-preview_6.entry.js +4 -0
  124. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  125. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  126. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  127. package/dist/esm/verdocs-sign.entry.js +7 -3
  128. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  129. package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
  130. package/dist/esm/verdocs-status-indicator.entry.js +2 -2
  131. package/dist/esm/verdocs-template-card.entry.js +1 -1
  132. package/dist/esm/verdocs-template-star.entry.js +1 -1
  133. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
  136. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
  138. package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
  139. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  140. package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
  141. package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -1
  142. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  143. package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
  144. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  145. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  146. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  147. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  148. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  149. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  150. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  151. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  152. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  153. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  154. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  155. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  156. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  157. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  158. package/dist/verdocs-web-sdk/{p-2f96e7c9.system.entry.js → p-0625e073.system.entry.js} +2 -2
  159. package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js → p-07a07c6b.system.entry.js} +2 -2
  160. package/dist/verdocs-web-sdk/p-15a1b8b5.system.entry.js +2 -0
  161. package/dist/verdocs-web-sdk/p-15a1b8b5.system.entry.js.map +1 -0
  162. package/dist/verdocs-web-sdk/{p-6abf8f8f.entry.js → p-1f898c53.entry.js} +2 -2
  163. package/dist/verdocs-web-sdk/{p-6abf8f8f.entry.js.map → p-1f898c53.entry.js.map} +1 -1
  164. package/dist/verdocs-web-sdk/p-2fa4010a.system.entry.js +2 -0
  165. package/dist/verdocs-web-sdk/p-2fa4010a.system.entry.js.map +1 -0
  166. package/dist/verdocs-web-sdk/{p-4798c2a5.system.entry.js → p-36aa8081.system.entry.js} +2 -2
  167. package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js +4 -0
  168. package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js.map +1 -0
  169. package/dist/verdocs-web-sdk/{p-c5b70927.system.entry.js → p-3c9a2290.system.entry.js} +2 -2
  170. package/dist/verdocs-web-sdk/p-48e2baa9.entry.js +2 -0
  171. package/dist/verdocs-web-sdk/p-48e2baa9.entry.js.map +1 -0
  172. package/dist/verdocs-web-sdk/{p-d09a4bb9.entry.js → p-4934f908.entry.js} +2 -2
  173. package/dist/verdocs-web-sdk/{p-6754dfcf.system.entry.js → p-4d8bf603.system.entry.js} +2 -2
  174. package/dist/verdocs-web-sdk/p-4fe507ee.entry.js +2 -0
  175. package/dist/verdocs-web-sdk/{p-810e09ca.entry.js → p-5678acd8.entry.js} +2 -2
  176. package/dist/verdocs-web-sdk/{p-cfb275c5.entry.js → p-609527c7.entry.js} +2 -2
  177. package/dist/verdocs-web-sdk/{p-1f1fc6d7.entry.js → p-82d0e009.entry.js} +2 -2
  178. package/dist/verdocs-web-sdk/p-90400330.entry.js +2 -0
  179. package/dist/verdocs-web-sdk/{p-d4f72da9.entry.js → p-98adcb3a.entry.js} +2 -2
  180. package/dist/verdocs-web-sdk/{p-ed953cca.entry.js → p-996cc1f6.entry.js} +2 -2
  181. package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
  182. package/dist/verdocs-web-sdk/p-ae4290c6.entry.js +3 -0
  183. package/dist/verdocs-web-sdk/p-ae4290c6.entry.js.map +1 -0
  184. package/dist/verdocs-web-sdk/{p-9756028f.entry.js → p-ae92881f.entry.js} +2 -2
  185. package/dist/verdocs-web-sdk/p-ae92881f.entry.js.map +1 -0
  186. package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js → p-b1146326.system.entry.js} +2 -2
  187. package/dist/verdocs-web-sdk/{p-1929a794.system.entry.js → p-b2aa0637.system.entry.js} +2 -2
  188. package/dist/verdocs-web-sdk/{p-64034b55.system.entry.js → p-b35a1ea8.system.entry.js} +2 -2
  189. package/dist/verdocs-web-sdk/{p-64034b55.system.entry.js.map → p-b35a1ea8.system.entry.js.map} +1 -1
  190. package/dist/verdocs-web-sdk/{p-1827477d.system.entry.js → p-b6390a11.system.entry.js} +2 -2
  191. package/dist/verdocs-web-sdk/p-b81c87ee.system.entry.js +2 -0
  192. package/dist/verdocs-web-sdk/p-b81c87ee.system.entry.js.map +1 -0
  193. package/dist/verdocs-web-sdk/{p-d3d177d0.system.entry.js → p-ba39a8ce.system.entry.js} +2 -2
  194. package/dist/verdocs-web-sdk/{p-495ed75e.system.entry.js → p-bd17bff7.system.entry.js} +2 -2
  195. package/dist/verdocs-web-sdk/{p-e632e92c.entry.js → p-c2b70cb9.entry.js} +2 -2
  196. package/dist/verdocs-web-sdk/{p-ca03555a.system.entry.js → p-c3660cce.system.entry.js} +2 -2
  197. package/dist/verdocs-web-sdk/{p-421c231a.entry.js → p-cbfc895c.entry.js} +2 -2
  198. package/dist/verdocs-web-sdk/{p-f85f8560.system.entry.js → p-d5cfbdac.system.entry.js} +2 -2
  199. package/dist/verdocs-web-sdk/p-d5cfbdac.system.entry.js.map +1 -0
  200. package/dist/verdocs-web-sdk/{p-842c345c.entry.js → p-e207c469.entry.js} +2 -2
  201. package/dist/verdocs-web-sdk/p-e679a32a.entry.js +2 -0
  202. package/dist/verdocs-web-sdk/p-e679a32a.entry.js.map +1 -0
  203. package/dist/verdocs-web-sdk/{p-d3b798ae.system.entry.js → p-e991121e.system.entry.js} +2 -2
  204. package/dist/verdocs-web-sdk/p-ed5c3f2d.entry.js +2 -0
  205. package/dist/verdocs-web-sdk/p-ed5c3f2d.entry.js.map +1 -0
  206. package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js → p-fff5d042.entry.js} +2 -2
  207. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  208. package/package.json +2 -2
  209. package/dist/components/p-BVhOFpVZ.js.map +0 -1
  210. package/dist/components/p-CT0DHyPw.js +0 -3
  211. package/dist/components/p-CT0DHyPw.js.map +0 -1
  212. package/dist/components/p-D_8TNtkM.js.map +0 -1
  213. package/dist/verdocs-web-sdk/p-0240a6e1.system.entry.js +0 -2
  214. package/dist/verdocs-web-sdk/p-0240a6e1.system.entry.js.map +0 -1
  215. package/dist/verdocs-web-sdk/p-12676649.entry.js +0 -2
  216. package/dist/verdocs-web-sdk/p-12676649.entry.js.map +0 -1
  217. package/dist/verdocs-web-sdk/p-1a6869c9.system.entry.js +0 -2
  218. package/dist/verdocs-web-sdk/p-1a6869c9.system.entry.js.map +0 -1
  219. package/dist/verdocs-web-sdk/p-1e8f1ce4.system.entry.js +0 -4
  220. package/dist/verdocs-web-sdk/p-1e8f1ce4.system.entry.js.map +0 -1
  221. package/dist/verdocs-web-sdk/p-3f5ad836.system.entry.js +0 -2
  222. package/dist/verdocs-web-sdk/p-3f5ad836.system.entry.js.map +0 -1
  223. package/dist/verdocs-web-sdk/p-62b6402f.entry.js +0 -2
  224. package/dist/verdocs-web-sdk/p-682c5a5c.entry.js +0 -2
  225. package/dist/verdocs-web-sdk/p-9756028f.entry.js.map +0 -1
  226. package/dist/verdocs-web-sdk/p-9c6cca6e.entry.js +0 -2
  227. package/dist/verdocs-web-sdk/p-9c6cca6e.entry.js.map +0 -1
  228. package/dist/verdocs-web-sdk/p-b464b598.entry.js +0 -3
  229. package/dist/verdocs-web-sdk/p-b464b598.entry.js.map +0 -1
  230. package/dist/verdocs-web-sdk/p-c89d74b2.entry.js +0 -2
  231. package/dist/verdocs-web-sdk/p-c89d74b2.entry.js.map +0 -1
  232. package/dist/verdocs-web-sdk/p-f85f8560.system.entry.js.map +0 -1
  233. /package/dist/components/{p-BxOEoXie.js.map → p-BIc5CIpg.js.map} +0 -0
  234. /package/dist/components/{p-DjOTs59Z.js.map → p-BcQsqsDy.js.map} +0 -0
  235. /package/dist/components/{p-Dtndevf4.js.map → p-BfKv6ivN.js.map} +0 -0
  236. /package/dist/components/{p-D3qUITiS.js.map → p-BwUTiBud.js.map} +0 -0
  237. /package/dist/components/{p-DsEO0-XR.js.map → p-CGWVITS0.js.map} +0 -0
  238. /package/dist/components/{p-BvtSJusb.js.map → p-CGt7KiUu.js.map} +0 -0
  239. /package/dist/components/{p-u16vefxk.js.map → p-CQUV5gMT.js.map} +0 -0
  240. /package/dist/components/{p-Dmw-lE3L.js.map → p-CSIVZcVx.js.map} +0 -0
  241. /package/dist/components/{p-C-V6jrel.js.map → p-DClinO5r.js.map} +0 -0
  242. /package/dist/components/{p-DVGumEtx.js.map → p-DRgoGiAA.js.map} +0 -0
  243. /package/dist/components/{p-BT8wzCXz.js.map → p-DSK9z7EN.js.map} +0 -0
  244. /package/dist/components/{p-tub_01MP.js.map → p-DXbBz25U.js.map} +0 -0
  245. /package/dist/components/{p-DIOVejyL.js.map → p-DyhyfLyV.js.map} +0 -0
  246. /package/dist/components/{p-Yxa93LOl.js.map → p-db6IAGB0.js.map} +0 -0
  247. /package/dist/components/{p-CDMCVJys.js.map → p-qDQgyl7L.js.map} +0 -0
  248. /package/dist/components/{p-CFEw4Xbi.js.map → p-sPseFic3.js.map} +0 -0
  249. /package/dist/verdocs-web-sdk/{p-2f96e7c9.system.entry.js.map → p-0625e073.system.entry.js.map} +0 -0
  250. /package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js.map → p-07a07c6b.system.entry.js.map} +0 -0
  251. /package/dist/verdocs-web-sdk/{p-4798c2a5.system.entry.js.map → p-36aa8081.system.entry.js.map} +0 -0
  252. /package/dist/verdocs-web-sdk/{p-c5b70927.system.entry.js.map → p-3c9a2290.system.entry.js.map} +0 -0
  253. /package/dist/verdocs-web-sdk/{p-d09a4bb9.entry.js.map → p-4934f908.entry.js.map} +0 -0
  254. /package/dist/verdocs-web-sdk/{p-6754dfcf.system.entry.js.map → p-4d8bf603.system.entry.js.map} +0 -0
  255. /package/dist/verdocs-web-sdk/{p-62b6402f.entry.js.map → p-4fe507ee.entry.js.map} +0 -0
  256. /package/dist/verdocs-web-sdk/{p-810e09ca.entry.js.map → p-5678acd8.entry.js.map} +0 -0
  257. /package/dist/verdocs-web-sdk/{p-cfb275c5.entry.js.map → p-609527c7.entry.js.map} +0 -0
  258. /package/dist/verdocs-web-sdk/{p-1f1fc6d7.entry.js.map → p-82d0e009.entry.js.map} +0 -0
  259. /package/dist/verdocs-web-sdk/{p-682c5a5c.entry.js.map → p-90400330.entry.js.map} +0 -0
  260. /package/dist/verdocs-web-sdk/{p-d4f72da9.entry.js.map → p-98adcb3a.entry.js.map} +0 -0
  261. /package/dist/verdocs-web-sdk/{p-ed953cca.entry.js.map → p-996cc1f6.entry.js.map} +0 -0
  262. /package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js.map → p-b1146326.system.entry.js.map} +0 -0
  263. /package/dist/verdocs-web-sdk/{p-1929a794.system.entry.js.map → p-b2aa0637.system.entry.js.map} +0 -0
  264. /package/dist/verdocs-web-sdk/{p-1827477d.system.entry.js.map → p-b6390a11.system.entry.js.map} +0 -0
  265. /package/dist/verdocs-web-sdk/{p-d3d177d0.system.entry.js.map → p-ba39a8ce.system.entry.js.map} +0 -0
  266. /package/dist/verdocs-web-sdk/{p-495ed75e.system.entry.js.map → p-bd17bff7.system.entry.js.map} +0 -0
  267. /package/dist/verdocs-web-sdk/{p-e632e92c.entry.js.map → p-c2b70cb9.entry.js.map} +0 -0
  268. /package/dist/verdocs-web-sdk/{p-ca03555a.system.entry.js.map → p-c3660cce.system.entry.js.map} +0 -0
  269. /package/dist/verdocs-web-sdk/{p-421c231a.entry.js.map → p-cbfc895c.entry.js.map} +0 -0
  270. /package/dist/verdocs-web-sdk/{p-842c345c.entry.js.map → p-e207c469.entry.js.map} +0 -0
  271. /package/dist/verdocs-web-sdk/{p-d3b798ae.system.entry.js.map → p-e991121e.system.entry.js.map} +0 -0
  272. /package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js.map → p-fff5d042.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{V as o,d as s}from"./p-BT8wzCXz.js";const t=o;const p=s;export{t as VerdocsFieldAttachment,p as defineCustomElement};
1
+ import{V as o,d as s}from"./p-DSK9z7EN.js";const t=o;const p=s;export{t as VerdocsFieldAttachment,p as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-field-attachment.js.map
@@ -1,2 +1,2 @@
1
- import{p as i,H as e,c as t,h as a,d as s,t as o}from"./p-yZBlG3YQ.js";import{d as n}from"./p-Bdf8pPWm.js";import{d}from"./p-CioaaWeS.js";import{d as c}from"./p-DYtSnUj9.js";const r=()=>`verdocs-initial-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-initial-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);background:#f9f9f9}verdocs-initial-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-initial-dialog .content{font-size:14px;padding:20px}verdocs-initial-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-initial-dialog .buttons verdocs-button{margin-left:16px}verdocs-initial-dialog canvas{background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275)}verdocs-initial-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-initial-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-initial-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-initial-dialog .tabs .tab:hover{color:#55bc81}`;const l=i(class i extends e{constructor(i){super();if(i!==false){this.__registerHost()}this.next=t(this,"next");this.exit=t(this,"exit");this.initials="";this.fontLoaded=false;this.enteredInitials="";this.mode="type"}componentWillLoad(){this.enteredInitials=this.initials.toUpperCase();const i=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");i.load().then((i=>{document.fonts.add(i);this.fontLoaded=true}))}componentDidLoad(){this.redrawSignature()}componentDidUpdate(){this.redrawSignature()}redrawSignature(){if(!this.canvasElement){return}const i=this.canvasElement.width;const e=this.canvasElement.getContext("2d");e.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);let t=100;do{t-=2;e.font=`${t}px Dancing Script`}while(e.measureText(this.enteredInitials).width>i-32);e.textAlign="center";e.textBaseline="middle";e.font=`${t}px Dancing Script`;e.fillText(this.enteredInitials,this.canvasElement.width/2,this.canvasElement.height/2)}handleNameChange(i){this.enteredInitials=i.target.value}handleCancel(i){i.stopPropagation();i.preventDefault();this.exit.emit()}handleAdopt(i){i.stopPropagation();i.preventDefault();const e=this.canvasElement.toDataURL("image/png");this.next.emit(e)}render(){return a(s,{key:"0b6dd491d0af99d1abe6292f4a6d012a71cd62c7",onClick:i=>this.handleCancel(i)},a("div",{key:"3d2d6486887d049ba2c5f60197aa5f476b922fde",class:"dialog"},a("div",{key:"186ef3be7f6026cad0bfaa244cd98d8c7183c169",class:"heading"},"Create Your Initial"),a("div",{key:"c5e37a3ddbdcac2db94cd56d41db0ecdf58df624",class:"content"},a("verdocs-text-input",{key:"ed1c4cc75029610ba03931449e37b7fc3aa437ad",placeholder:"Initials...",label:"Initials",value:this.enteredInitials,onInput:i=>this.handleNameChange(i),onClick:i=>i.stopPropagation()}),a("div",{key:"1597920974326992c60180a83c63b9ae54280113",class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?a("canvas",{ref:i=>this.canvasElement=i}):a("div",{style:{display:"none"}}),a("div",{key:"d388ed076550e566c711e15a832bd954dd80ba17",class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),a("div",{key:"1bab8f70eaa8b7bb7eabfd5a64b837ada9879733",class:"buttons"},a("verdocs-button",{key:"37864544ac1d1b57c67e316cfe1bf524286d5aae",label:"CANCEL",size:"normal",variant:"outline",onClick:i=>this.handleCancel(i)}),a("verdocs-button",{key:"586ce5016c2b9b0eaee12c0bfe1757fbffad564f",label:"Adopt & Sign",size:"normal",onClick:i=>this.handleAdopt(i)})))))}static get style(){return r()}},[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]);function p(){if(typeof customElements==="undefined"){return}const i=["verdocs-initial-dialog","verdocs-button","verdocs-help-icon","verdocs-text-input"];i.forEach((i=>{switch(i){case"verdocs-initial-dialog":if(!customElements.get(o(i))){customElements.define(o(i),l)}break;case"verdocs-button":if(!customElements.get(o(i))){n()}break;case"verdocs-help-icon":if(!customElements.get(o(i))){d()}break;case"verdocs-text-input":if(!customElements.get(o(i))){c()}break}}))}const b=l;const f=p;export{b as VerdocsInitialDialog,f as defineCustomElement};
1
+ import{p as i,H as e,c as t,h as s,d as o,t as a}from"./p-yZBlG3YQ.js";import{d as n}from"./p-Bdf8pPWm.js";import{d}from"./p-CioaaWeS.js";import{d as c}from"./p-DYtSnUj9.js";const r=()=>`verdocs-initial-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-initial-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);background:#f9f9f9}verdocs-initial-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-initial-dialog .content{font-size:14px;padding:20px}verdocs-initial-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-initial-dialog .buttons verdocs-button{margin-left:16px}verdocs-initial-dialog canvas{background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275)}verdocs-initial-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-initial-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-initial-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-initial-dialog .tabs .tab:hover{color:#55bc81}`;const l=i(class i extends e{constructor(i){super();if(i!==false){this.__registerHost()}this.next=t(this,"next");this.exit=t(this,"exit");this.initials="";this.fontLoaded=false;this.enteredInitials="";this.mode="type"}componentWillLoad(){this.enteredInitials=this.initials.toUpperCase();const i=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");i.load().then((i=>{document.fonts.add(i);this.fontLoaded=true}))}componentDidLoad(){this.redrawSignature()}componentDidUpdate(){this.redrawSignature()}redrawSignature(){if(!this.canvasElement){return}const i=this.canvasElement.width;const e=this.canvasElement.getContext("2d");e.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);let t=100;do{t-=2;e.font=`${t}px Dancing Script`}while(e.measureText(this.enteredInitials).width>i-32);e.textAlign="center";e.textBaseline="middle";e.font=`${t}px Dancing Script`;e.fillText(this.enteredInitials,this.canvasElement.width/2,this.canvasElement.height/2)}handleNameChange(i){this.enteredInitials=i.target.value}handleCancel(i){i.stopPropagation();i.preventDefault();this.exit.emit()}handleAdopt(i){i.stopPropagation();i.preventDefault();const e=this.canvasElement.toDataURL("image/png");this.next.emit(e)}render(){return s(o,{key:"ae9dcf54059a7234ded4498b3965ad8a85e0051f",onClick:i=>this.handleCancel(i)},s("div",{key:"74d0274fcf4f9a4c4fff63df263215906d091019",class:"dialog"},s("div",{key:"d7d9b3d881e9985c1856cbb48f36c13c22c96d51",class:"heading"},"Create Your Initial"),s("div",{key:"77891434cf3c6dfb72583a366c73fbe718f3df55",class:"content"},s("verdocs-text-input",{key:"b563cd6c996cab38ed00b763a94ba15966a0dd46",placeholder:"Initials...",label:"Initials",value:this.enteredInitials,onInput:i=>this.handleNameChange(i),onClick:i=>i.stopPropagation()}),s("div",{key:"b8b94dbd7da516dc16647857535234fc4bc09490",class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?s("canvas",{ref:i=>this.canvasElement=i}):s("div",{style:{display:"none"}}),s("div",{key:"9305001c42ef179fd2e9200457b2d5e39dbb861e",class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),s("div",{key:"df368934a000f369217d02dfce8fea68aba87a99",class:"buttons"},s("verdocs-button",{key:"6312e5608fa0cee507364aad8259ab52ba89f543",label:"CANCEL",size:"normal",variant:"outline",onClick:i=>this.handleCancel(i)}),s("verdocs-button",{key:"9e7f1cf8e2f855e761560353b363d1790f15ba09",label:"Adopt & Sign",size:"normal",onClick:i=>this.handleAdopt(i)})))))}static get style(){return r()}},[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]);function p(){if(typeof customElements==="undefined"){return}const i=["verdocs-initial-dialog","verdocs-button","verdocs-help-icon","verdocs-text-input"];i.forEach((i=>{switch(i){case"verdocs-initial-dialog":if(!customElements.get(a(i))){customElements.define(a(i),l)}break;case"verdocs-button":if(!customElements.get(a(i))){n()}break;case"verdocs-help-icon":if(!customElements.get(a(i))){d()}break;case"verdocs-text-input":if(!customElements.get(a(i))){c()}break}}))}const f=l;const b=p;export{f as VerdocsInitialDialog,b as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-initial-dialog.js.map
@@ -1,2 +1,2 @@
1
- import{V as o,d as s}from"./p-D3qUITiS.js";const t=o;const p=s;export{t as VerdocsOkDialog,p as defineCustomElement};
1
+ import{V as o,d as s}from"./p-BwUTiBud.js";const t=o;const p=s;export{t as VerdocsOkDialog,p as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-ok-dialog.js.map
@@ -1,2 +1,2 @@
1
- import{V as o,d as s}from"./p-Dmw-lE3L.js";const t=o;const m=s;export{t as VerdocsOtpDialog,m as defineCustomElement};
1
+ import{V as o,d as s}from"./p-CSIVZcVx.js";const t=o;const c=s;export{t as VerdocsOtpDialog,c as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-otp-dialog.js.map
@@ -1,2 +1,2 @@
1
- import{V as o,d as s}from"./p-BxOEoXie.js";const t=o;const p=s;export{t as VerdocsPasscodeDialog,p as defineCustomElement};
1
+ import{V as o,d as s}from"./p-BIc5CIpg.js";const p=o;const t=s;export{p as VerdocsPasscodeDialog,t as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-passcode-dialog.js.map
@@ -1,2 +1,2 @@
1
- import{V as s,d as o}from"./p-DjOTs59Z.js";const t=s;const p=o;export{t as VerdocsPreview,p as defineCustomElement};
1
+ import{V as s,d as o}from"./p-BcQsqsDy.js";const t=s;const c=o;export{t as VerdocsPreview,c as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-preview.js.map
@@ -1,2 +1,2 @@
1
- import{V as s,d as o}from"./p-DsEO0-XR.js";const t=s;const p=o;export{t as VerdocsQuestionDialog,p as defineCustomElement};
1
+ import{V as o,d as s}from"./p-CGWVITS0.js";const t=o;const p=s;export{t as VerdocsQuestionDialog,p as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-question-dialog.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as n,h as s,t as i}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as o}from"@verdocs/js-sdk";const c=()=>`verdocs-quick-functions{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}`;const r=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;const f=`<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>`;const a=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.createTemplate=n(this,"createTemplate");this.createDocument=n(this,"createDocument");this.endpoint=o.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return s("div",{key:"94b16b2b493647b77e5397227476bed8bae878bb",class:"container"},s("p",{key:"eb42b99fda2fd850e1dece61013f0366f7a2ffd0",class:"title"},"Quick Create"),s("button",{key:"602e51e8e73ff308c46785a1d22c1f61af2b04ca",onClick:()=>this.handleCreateTemplate(),innerHTML:f},"Template"),s("button",{key:"b64dc770646621c16795ba35ee655403cfe05577",onClick:()=>this.handleCreateDocument(),innerHTML:r},"Document"))}static get style(){return c()}},[0,"verdocs-quick-functions",{endpoint:[16]}]);function l(){if(typeof customElements==="undefined"){return}const e=["verdocs-quick-functions"];e.forEach((e=>{switch(e){case"verdocs-quick-functions":if(!customElements.get(i(e))){customElements.define(i(e),a)}break}}))}const p=a;const d=l;export{p as VerdocsQuickFunctions,d as defineCustomElement};
1
+ import{p as e,H as t,c as n,h as s,t as c}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as i}from"@verdocs/js-sdk";const o=()=>`verdocs-quick-functions{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}`;const f=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;const r=`<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>`;const a=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.createTemplate=n(this,"createTemplate");this.createDocument=n(this,"createDocument");this.endpoint=i.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return s("div",{key:"f84b61c6ed8b9ee03dd7a6c0f2fae2ab8fcc6e2b",class:"container"},s("p",{key:"32f24fccbfc6785dfbc299722113e91c641d8e67",class:"title"},"Quick Create"),s("button",{key:"0fb580f067177603bb30ab163d1f93caf50967a1",onClick:()=>this.handleCreateTemplate(),innerHTML:r},"Template"),s("button",{key:"60849ad3405b4fe90271c5eefecc17e304f44697",onClick:()=>this.handleCreateDocument(),innerHTML:f},"Document"))}static get style(){return o()}},[0,"verdocs-quick-functions",{endpoint:[16]}]);function l(){if(typeof customElements==="undefined"){return}const e=["verdocs-quick-functions"];e.forEach((e=>{switch(e){case"verdocs-quick-functions":if(!customElements.get(c(e))){customElements.define(c(e),a)}break}}))}const p=a;const d=l;export{p as VerdocsQuickFunctions,d as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-quick-functions.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,h as t,t as r}from"./p-yZBlG3YQ.js";const c=()=>`verdocs-search-tabs{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:block}`;const a=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.selected="all"}render(){return t("div",{key:"41e102b159819e379c7d5acba227163528709e50"}," ")}static get style(){return c()}},[0,"verdocs-search-tabs",{selected:[32]}]);function o(){if(typeof customElements==="undefined"){return}const s=["verdocs-search-tabs"];s.forEach((s=>{switch(s){case"verdocs-search-tabs":if(!customElements.get(r(s))){customElements.define(r(s),a)}break}}))}const n=a;const i=o;export{n as VerdocsSearchTabs,i as defineCustomElement};
1
+ import{p as s,H as e,h as t,t as c}from"./p-yZBlG3YQ.js";const r=()=>`verdocs-search-tabs{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:block}`;const o=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.selected="all"}render(){return t("div",{key:"434e08fb0ce4a00df6c11d3495c500d54874c494"}," ")}static get style(){return r()}},[0,"verdocs-search-tabs",{selected:[32]}]);function a(){if(typeof customElements==="undefined"){return}const s=["verdocs-search-tabs"];s.forEach((s=>{switch(s){case"verdocs-search-tabs":if(!customElements.get(c(s))){customElements.define(c(s),o)}break}}))}const n=o;const d=a;export{n as VerdocsSearchTabs,d as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-search-tabs.js.map
@@ -1,2 +1,2 @@
1
- import{V as o,d as s}from"./p-D_8TNtkM.js";const t=o;const p=s;export{t as VerdocsSend,p as defineCustomElement};
1
+ import{V as s,d as o}from"./p-DGws2Zgt.js";const t=s;const p=o;export{t as VerdocsSend,p as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-send.js.map
@@ -1,2 +1,2 @@
1
- import{V as s,d as o}from"./p-BvtSJusb.js";const t=s;const p=o;export{t as VerdocsSignFooter,p as defineCustomElement};
1
+ import{V as o,d as s}from"./p-CGt7KiUu.js";const t=o;const p=s;export{t as VerdocsSignFooter,p as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-sign-footer.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as i,h as s,d as o,F as n,t as a}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as r,DEFAULT_DISCLOSURES as l,startSigningSession as d,envelopeRecipientAgree as c,getEnvelope as h,updateEnvelopeField as p,createSignature as u,createInitials as g,sortFields as f,envelopeRecipientSubmit as v,isFieldValid as m,isFieldFilled as b,uploadEnvelopeFieldAttachment as x,deleteEnvelopeFieldAttachment as w,formatFullName as y,fullNameToInitials as k,verifySigner as C,getEnvelopesZip as S,getEnvelopeDocumentDownloadLink as I,getCombinedEnvelopeDocumentDownloadLink as N,delegateRecipient as z,envelopeRecipientDecline as E,integerSequence as L,askQuestion as j}from"@verdocs/js-sdk";import{u as G,g as D,r as F,a as H,d as T}from"./p-BCwFpXpV.js";import{D as M}from"./p-17OorOnH.js";import{D as V,C as O}from"./p-BDv5kBUR.js";import{V as q}from"./p-D97GxsI-.js";import{S as P}from"./p-C1sRVZWv.js";import{S as R}from"./p-C7hFgM52.js";import{d as U}from"./p-COfQ1FzC.js";import{d as A}from"./p-Bdf8pPWm.js";import{d as B}from"./p-REnrt0JM.js";import{d as Z}from"./p-B_dAoCMu.js";import{d as $}from"./p-DT0LGcPi.js";import{d as Y}from"./p-CQUMhFM4.js";import{d as _}from"./p-BVhOFpVZ.js";import{d as Q}from"./p-DFXK-FYy.js";import{d as W}from"./p-DIOVejyL.js";import{d as X}from"./p-wUsR0Dpa.js";import{d as J}from"./p-CioaaWeS.js";import{d as K}from"./p-CrONbj5k.js";import{d as ee}from"./p-B-_kYJtC.js";import{d as te}from"./p-D3qUITiS.js";import{d as ie}from"./p-Dmw-lE3L.js";import{d as se}from"./p-BxOEoXie.js";import{d as oe}from"./p-DQTI8vRX.js";import{d as ne}from"./p-DsEO0-XR.js";import{d as ae}from"./p-BaH_hK8j.js";import{d as re}from"./p-BXGNkmyr.js";import{d as le}from"./p-BvtSJusb.js";import{d as de}from"./p-BXQO5Vza.js";import{d as ce}from"./p-DYtSnUj9.js";import{d as he}from"./p-Ce29XBfJ.js";const pe=()=>`verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;padding-right:140px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;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);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}@media (max-width: 670px){#verdocs-sign-header .title{font-size:14px}}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}@media (max-width: 670px){#verdocs-sign-header .remaining-count .review-optional{display:none}}@media (max-width: 670px){#verdocs-sign-header .remaining-count{font-size:12px}}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}@media (max-width: 670px){#verdocs-sign-header .icon-button.magnify{display:none}}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}`;const ue=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>`;const ge=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>`;const fe=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>`;const ve=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>`;const me=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.sdkError=i(this,"sdkError");this.envelopeLoaded=i(this,"envelopeLoaded");this.envelopeUpdated=i(this,"envelopeUpdated");this.endpoint=new r({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=l;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}async componentDidLoad(){var e,t,i,s,o,n;this.updateZoomFromWindow();window.addEventListener("resize",(()=>this.updateZoomFromWindow()));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new P("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new P("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new P("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const e=await d(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);this.processAuthResponse(e)}catch(e){console.log("[SIGN] Error with signing session",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new P(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(n=e.response)===null||n===void 0?void 0:n.data));this.showLoadError=true}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}this.setupIntersectionObserver()}disconnectedCallback(){var e,t,i;this.stopPolling();(e=this.observer)===null||e===void 0?void 0:e.disconnect();window.removeEventListener("resize",(()=>this.updateZoomFromWindow()));(t=document.getElementById(this.getOrgStyleOverridesId()))===null||t===void 0?void 0:t.remove();(i=document.getElementById(this.getBrandStyleOverridesId()))===null||i===void 0?void 0:i.remove()}updateZoomFromWindow(){const e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}}setupIntersectionObserver(){const e=this.el.querySelectorAll("verdocs-envelope-document-page");if(e.length===0)return;if(this.observer){this.observer.disconnect()}const t=this.el.querySelector(".signed-document-container");const i={root:t,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;const i=parseInt(t.replace("page-",""),10);if(!isNaN(i)&&this.pageNumber!==i){this.pageNumber=i}}}))}),i);e.forEach((e=>this.observer.observe(e)))}getOrgStyleOverridesId(){return`verdocs-org-style-overrides-${this.envelopeId}`}getBrandStyleOverridesId(){return`verdocs-brand-style-overrides-${this.envelopeId}`}applyOrgStyleOverrides(){var e,t;const i=this.getOrgStyleOverridesId();const s=document.getElementById(i);const o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){const e=s||document.createElement("style");e.id=i;e.textContent=o;if(!s){document.head.appendChild(e)}}else if(s){s.remove()}}applyBrandStyleOverrides(e){const t=this.getBrandStyleOverridesId();const i=document.getElementById(t);const s=e===null||e===void 0?void 0:e.style_overrides;if(typeof s==="string"&&s.length>0){const e=i||document.createElement("style");e.id=t;e.textContent=s;if(!i){document.head.appendChild(e)}}else if(i){i.remove()}}processAuthResponse(e){var t,i,s,o;const{envelope:n,recipient:a,brand:r}=e;(t=n.documents)===null||t===void 0?void 0:t.sort(((e,t)=>e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)));const{auth_step:d}=a;this.recipient=a;this.envelope=n;this.disclosures=((s=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||s===void 0?void 0:s.disclaimer)||l;this.applyOrgStyleOverrides();this.applyBrandStyleOverrides(r);this.authStep=d;this.delegated=!!a.delegated_to;this.agreed=a.agreed;this.signatureId=null;this.initialId=null;this.submitted=a.status==="submitted";this.loading=false;this.isDone=this.submitted;this.showDone=this.submitted;R.updateEnvelope(this.envelopeId,n);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=a.auth_method_states||{};this.kbaQuestions=a.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(a.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})}handleClickAgree(){this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);c(this.endpoint,this.envelopeId,this.roleId,this.disclosures).then((()=>{var e;this.nextButtonLabel="Next";this.recipient.agreed=true;this.submitting=false;this.agreed=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var t,i,s;console.log("[SIGN] Unable to accept disclosures",e);q("Unable to accept disclosures, please try again later",{style:"error"});(t=this.sdkError)===null||t===void 0?void 0:t.emit(new P(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(s=e.response)===null||s===void 0?void 0:s.data));this.submitting=false}))}handlePageSelect(e){const t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;const e=this.el.querySelector(".signed-document-container");const i=this.el.querySelector(`#page-${t}`);if(e&&i){const t=i.offsetTop-20;e.scrollTo({top:t,behavior:"smooth"})}}}async handleOptionSelected(e){var t,i;switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}}startPolling(){this.stopPolling();const e=()=>{var e,t,i,s,o,n;const a=((e=this.envelope)===null||e===void 0?void 0:e.status)==="complete"||!!((t=this.envelope)===null||t===void 0?void 0:t.signed);const r=(s=(i=this.envelope)===null||i===void 0?void 0:i.documents)===null||s===void 0?void 0:s.some((e=>e.type==="certificate"));const l=(n=(o=this.envelope)===null||o===void 0?void 0:o.recipients)===null||n===void 0?void 0:n.every((e=>e.status==="submitted"));if(a&&r)return false;if(!l)return false;return true};if(!e()){return}this.polling=true;this.pollingInterval=setInterval((async()=>{try{const t=await h(this.endpoint,this.envelopeId);this.envelope=t;R.updateEnvelope(this.envelopeId,t);this.checkRecipientFields();if(!e()){this.stopPolling()}}catch(e){console.error("[SIGN] Polling error",e);this.stopPolling()}}),5e3)}stopPolling(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false}handleZoomIn(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}}handleZoomOut(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}}updateRecipientFieldValue(e,t){console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((i=>{if(i.name===e){i.value=t.value;i.settings=t.settings;G(i);this.fieldUpdateCounter++;this.markEnvelopeStarted();this.checkRecipientFields()}}))}getStartedKey(){var e;return`${this.envelopeId}:${((e=this.recipient)===null||e===void 0?void 0:e.role_name)||""}`}markEnvelopeStarted(){const e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");const t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}}saveFieldChange(e,t,i){const s=this.getRecipientFields().find((t=>t.name===e));if(s===null||s===void 0?void 0:s.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});p(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((t=>this.updateRecipientFieldValue(e,t))).catch((e=>{var t,i,s,o,n,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(i=e.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");this.fatalErrorHeader="Signing Session Expired";this.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);q("Unable to save change, please try again later",{style:"error"})}(o=this.sdkError)===null||o===void 0?void 0:o.emit(new P(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(a=e.response)===null||a===void 0?void 0:a.data))}))}async handleFieldChange(e,t){if(!t.target){return}const{value:i,checked:s}=t.target;switch(e.type){case"textarea":case"textbox":return this.saveFieldChange(e.name,i,false);case"checkbox":{return this.saveFieldChange(e.name,String(t.target.checked),false)}case"radio":{return this.saveFieldChange(e.name,String(t.target.checked),false)}case"dropdown":console.log("Saving dropdown",e.name,t.detail);return this.saveFieldChange(e.name,t.detail,false);case"initial":if(t.detail===undefined){return}if(t.detail===null){console.log("[SIGN] Clearing initial");const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,null,false);return this.updateRecipientFieldValue(e.name,t)}if(this.initialId){console.log("[SIGN] Reusing initial",this.initialId);const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false);return this.updateRecipientFieldValue(e.name,t)}if(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)){console.log("[SIGN] Reusing initial",t.detail);const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false);this.initialId=t.detail;return this.updateRecipientFieldValue(e.name,i)}this.showSpinner=true;const o=await(await fetch(t.detail)).blob();return g(this.endpoint,"initial",o).then((async t=>{const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false);this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false})).catch((e=>{console.log("Error updating initials",e);q("Unable to save initials, please try again later",{style:"error"});this.showSpinner=false}));case"signature":if(t.detail===undefined){return}if(t.detail===null){console.log("[SIGN] Clearing signature");const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,null,false);return this.updateRecipientFieldValue(e.name,t)}if(this.signatureId){console.log("[SIGN] Reusing signature",this.signatureId);const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false);return this.updateRecipientFieldValue(e.name,t)}if(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)){console.log("[SIGN] Reusing signature",t.detail);const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false);this.signatureId=t.detail;return this.updateRecipientFieldValue(e.name,i)}this.showSpinner=true;const n=await(await fetch(t.detail)).blob();console.log("[SIGN] Creating new signature");return u(this.endpoint,"signature",n).then((async t=>{console.log("Signature update result",t);const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false);this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false})).catch((e=>{console.warn("[SIGN] Error updating signature",e);q("Unable to save signature, please try again later",{style:"error"});this.showSpinner=false}));case"date":const{formattedDate:a}=t.detail;if(a){return this.saveFieldChange(e.name,a,false)}break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:i,checked:s},e);break}}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"&&!e.readonly));f(e);return e}getSortedDisplayableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"));f(e);return e}async handleNext(){var e;if(this.nextSubmits){try{(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;const t=await v(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",t);window.location.reload()}catch(e){console.log("[SIGN] Error submitting",e);this.submitting=false;q("Unable to submit document, please try again.",{style:"error"})}return}const t=this.getSortedFillableFields().filter((e=>!this.isFieldActuallyFilled(e)));const i=this.getNextFieldFromList(t);if(i){const e=D(i);const t=document.getElementById(e);t===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});t===null||t===void 0?void 0:t.focusField();this.focusedField=i.name}}handleNextOptional(){const e=this.getSortedFillableFields().filter((e=>!e.required&&!this.isFieldActuallyFilled(e)));const t=this.getNextFieldFromList(e);if(t){const e=D(t);const i=document.getElementById(e);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});i===null||i===void 0?void 0:i.focusField();this.focusedField=t.name}}getRecipientFields(){var e;return((e=this.envelope)===null||e===void 0?void 0:e.fields.filter((e=>e.role_name===this.recipient.role_name)))||[]}getRequiredTotalCount(){return this.getSortedFillableFields().filter((e=>e.required)).length}getRequiredFilledCount(){return this.getSortedFillableFields().filter((e=>e.required&&this.isFieldActuallyFilled(e))).length}getOptionalUnfilledCount(){return this.getSortedFillableFields().filter((e=>!e.required&&!this.isFieldActuallyFilled(e))).length}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!m(e,this.getRecipientFields())));if(e.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();const t=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");const i=t.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(i){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}}isFieldActuallyFilled(e){if(e.type==="radio"&&e.group){const t=this.getRecipientFields().some((t=>t.group===e.group&&t.value==="true"));if(t){return true}}return b(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")}getNextRequiredField(){const e=this.getSortedFillableFields().filter((e=>e.required&&!this.isFieldActuallyFilled(e)));f(e);if(e.length===0){const e=this.getSortedFillableFields().filter((e=>!this.isFieldActuallyFilled(e)));f(e);if(e.length>0){return this.getNextFieldFromList(e)}return null}return this.getNextFieldFromList(e)}getNextFieldFromList(e){const t=e.findIndex((e=>e.name===this.focusedField));let i=t+1;if(i>=e.length){i=0}return e[i]}handlePrev(){var e;const t=this.getSortedFillableFields();const i=t.findIndex((e=>e.name===this.focusedField));if(i>0){const s=t[i-1];const o=D(s);const n=document.getElementById(o);n===null||n===void 0?void 0:n.scrollIntoView({behavior:"smooth",block:"center"});(e=n===null||n===void 0?void 0:n.focusField)===null||e===void 0?void 0:e.call(n);this.focusedField=s.name}}updateAllFlags(){Object.values(this.renderedPages).forEach((e=>{this.updateFlagsForPage(e)}))}updateFlagsForPage(e){if(!e)return;const t=document.getElementById(e.containerId+"-controls");if(!t)return;const i=t.querySelectorAll(".verdocs-flag-instance");i.forEach((e=>e.remove()));let s=this.getNextRequiredField();const o=this.getRecipientFields().find((e=>e.name===this.focusedField));if(o&&!b(o,this.getRecipientFields())){s=o}if(s&&s.page===e.pageNumber&&s.document_id===e.documentId){const t="fill";let i="FILL";let o=false;switch(s.type){case"signature":i="SIGN";break;case"initial":i="INITIAL";break;case"checkbox":i="CHECK";break;case"radio":i="SELECT";break;case"date":case"dropdown":i="SELECT";break;case"attachment":i="ATTACH";break;case"payment":i="PAY";break}if(!s.required){o=true}F(e,s.y,s.height||T(s.type),{variant:t,label:i,showSkip:o,onSkip:()=>{this.handleNext()},onClick:()=>{var e;const t=D(s);const i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}}attachFieldAttributes(e,t,i){if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(e=>{if(e.target.type==="radio"||e.target.type==="checkbox"){this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}else{this.checkRecipientFields()}}));i.addEventListener("attached",(async i=>{console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;try{const s=await x(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail);this.updateRecipientFieldValue(t.name,s);this.checkRecipientFields();const o=H("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false}catch(i){console.log("Error uploading attachment",i);q("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));i.addEventListener("deleted",(async i=>{console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;try{const i=await w(this.endpoint,this.envelopeId,this.roleId,t.name);console.log("[SIGN] Deleted attachment",i);this.updateRecipientFieldValue(t.name,i);this.checkRecipientFields();const s=H("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false}catch(i){console.log("Error uploading attachment",i);q("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));i.addEventListener("focusout",(e=>{if(t.type!=="dropdown"&&t.type!=="attachment"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}}));i.addEventListener("fieldChange",(e=>{this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}));i.addEventListener("adopt",(()=>{this.focusedField=t.name;this.adoptingSignature=true}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);const s=y(this.recipient);i.setAttribute("initials",k(s));i.setAttribute("name",s);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}}handlePageRendered(e){const t=e.detail;this.renderedPages[`${t.documentId}:${t.pageNumber}`]=t;const i=this.getSortedDisplayableFields();i.filter((e=>e&&e.document_id===t.documentId&&e.page===t.pageNumber)).forEach(((e,i)=>{const s=H("envelope",e,t,{disabled:false,editable:false,draggable:false,done:this.isDone},i);if(!s){return}if(Array.isArray(s)){s.map((i=>this.attachFieldAttributes(t,e,i)))}else{this.attachFieldAttributes(t,e,s)}}));this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending"))).forEach((()=>{this.getRecipientFields().filter((e=>e.document_id===t.documentId&&e.page===t.pageNumber)).forEach((e=>{const i=H("envelope",e,t,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!i){return}if(Array.isArray(i)){i.map((i=>this.attachFieldAttributes(t,e,i)))}else{this.attachFieldAttributes(t,e,i)}}))}));this.checkRecipientFields();this.updateFlagsForPage(t)}handleAuthenticateSigner(e){console.log("[SIGN] Submitting authentication step",e);C(this.endpoint,e).then((e=>{console.log("[SIGN] Verification successful",e);this.processAuthResponse(e)})).catch((e=>{var t,i,s,o,n,a;console.log("[SIGN] Error submitting authentication step",e);console.log((t=e.response)===null||t===void 0?void 0:t.data);if((o=(s=(i=e.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.error)===null||o===void 0?void 0:o.includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{q(((a=(n=e.response)===null||n===void 0?void 0:n.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))}async handleOnDownload(e){var t,i;const{action:s,documentId:o}=e.detail;console.log("[SIGN] Download action selected:",s,o);try{switch(s){case M.certificate:const e=this.envelope.documents.find((e=>e.type==="certificate"));if(e){const t=await I(this.endpoint,e.id);window.open(t,"_blank")}else{q("Certificate not yet available.",{style:"info"})}break;case M.combined:const s=o||((t=this.envelope.documents.find((e=>e.type==="certificate")))===null||t===void 0?void 0:t.id);const n=await N(this.endpoint,s);window.open(n,"_blank");break;case M.document:const a=o||((i=this.envelope.documents.find((e=>e.type==="attachment")))===null||i===void 0?void 0:i.id);if(a){const e=await I(this.endpoint,a);window.open(e,"_blank")}break;case M.zip:const r=await S(this.endpoint,[this.envelopeId]);const l=window.URL.createObjectURL(r.data);const d=document.createElement("a");d.href=l;d.download=`${this.envelope.name}.zip`;document.body.appendChild(d);d.click();d.remove();window.URL.revokeObjectURL(l);break}}catch(e){console.error("Download error",e);q("Unable to complete download request.",{style:"error"})}}render(){var e;if(this.showLoadError){return s(o,null,s("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`,buttonLabel:"OK",onNext:()=>{window.location.reload()}}))}if(!this.envelope){return s(o,null,s("verdocs-loader",null))}if(this.fatalErrorMessage){return s(o,{class:{agreed:this.agreed}},s("div",{class:"fatal-error"},s("div",{class:"message"},s("div",{class:"header"},this.fatalErrorHeader),s("p",null,this.fatalErrorMessage))))}if(this.delegated){return s(o,{class:{agreed:false}},s("div",{class:"fatal-error"},s("div",{class:"message"},s("div",{class:"header"},"Delegated Signing Request"),s("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return s(o,{class:{agreed:this.agreed}},s("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var t;return(t=this.sdkError)===null||t===void 0?void 0:t.emit(e.detail)}}),this.showDone&&s("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:e=>{e.preventDefault();e.stopPropagation();this.showDone=false;this.isDone=true}}),this.submitting&&s("div",{class:"loading-indicator"},s("verdocs-loader",null)))}if(this.delegating){return s(o,{class:"agreed"},s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:()=>this.delegating=false,onNext:e=>{z(this.endpoint,this.envelopeId,this.roleId,e.detail).then((e=>{q("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",e);this.delegated=true;this.delegating=false})).catch((e=>{console.log("[SIGN] Error delegating request",e);q("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return s(o,{class:"agreed"},s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("verdocs-ok-dialog",{heading:"Decline Signing Request",message:`If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.`,buttonLabel:"OK",showCancel:true,onExit:()=>this.declining=false,onNext:()=>{E(this.endpoint,this.envelopeId,this.roleId).then((e=>{console.log("[SIGN] Decline result",e);window.location.reload()})).catch((e=>{console.warn("[SIGN] Error declining signing session",e);q("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return s(o,{class:"agreed"},s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:()=>this.delegating=true,onDecline:()=>this.declining=true,onAccept:()=>this.handleClickAgree()}))}if(this.authStep==="passcode"){return s("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:e=>this.processAuthResponse(e.detail.response)})}if(this.authStep==="email"){return s("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:async e=>{this.processAuthResponse(e.detail.response)}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return s(o,{class:"kba"},s("div",{id:"verdocs-sign-header"},s("div",{class:"inner"},s("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),s("div",{class:"title"},this.envelope.name))),s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("div",{class:"cover"},s("div",{class:"kba"},s("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:async e=>{const t=e.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:t.first_name,last_name:t.last_name,address:t.address,city:t.city,state:t.state,zip:t.zip,dob:t.dob})}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){const e=this.kbaChoices.length;const t=this.kbaQuestions[e];return s(o,{class:"kba"},s("div",{id:"verdocs-sign-header"},s("div",{class:"inner"},s("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),s("div",{class:"title"},this.envelope.name))),s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("div",{class:"cover"},s("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?s("verdocs-spinner",null):s("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(t===null||t===void 0?void 0:t.prompt)||"Please select one of the options below.",choices:(t===null||t===void 0?void 0:t.answer)||["Skip Question"],step:e+1,steps:this.kbaQuestions.length,onNext:async e=>{const t=e.detail;this.kbaChoices=[...this.kbaChoices,t];if(this.kbaChoices.length>=this.kbaQuestions.length){const e=this.kbaQuestions.map(((e,t)=>({type:e.type,answer:this.kbaChoices[t]})));console.log("Submitting KBA responses",this.kbaChoices,e);this.handleAuthenticateSigner({auth_method:"kba",responses:e})}}}))))}const t=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];const i=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){t.unshift({id:"delegate",label:"Delegate"})}const a=this.getRecipientFields().filter((e=>!m(e,this.getRecipientFields())));a.length>0?console.log("[SIGN] Invalid fields remaining",a.map((e=>e.name))):console.log("[SIGN] All field valid");const r=this.envelope.documents.reduce(((e,t)=>e+t.pages),0);const l=L(1,r).map((e=>({label:e.toString(),value:e.toString()})));let d=0;return s(o,null,this.toolbarStyle==="menu"&&s("div",{id:"verdocs-sign-header"},s("div",{class:"inner"},s("div",{class:"title"},this.envelope.name),s("div",{style:{flex:"1"}}),!this.finishLater&&(()=>{const e=this.getRequiredTotalCount()-this.getRequiredFilledCount();const t=this.getOptionalUnfilledCount();if(e>0){return s("span",{class:"remaining-count"},e," required field",e===1?"":"s"," left")}return s("span",{class:"remaining-count"},s("span",{class:"check-icon",innerHTML:O}),"All required fields complete",t>0&&s("div",{class:"review-optional"},s("span",{class:"separator"},"| "),s("span",{onClick:()=>this.handleNextOptional()},"Review ",t," optional")))})(),!this.finishLater&&s("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),s("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal",magnify:true},innerHTML:ue,onClick:()=>this.handleZoomOut()}),s("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2",magnify:true},innerHTML:ge,onClick:()=>this.handleZoomIn()}),s("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?t:i,onOptionSelected:e=>this.handleOptionSelected(e)}))),this.toolbarStyle==="controls"&&s("div",{class:"controls-toolbar"},s("div",{class:"left-controls"},s("div",{class:"title"},this.envelope.name)),s("div",{class:"center-controls"},s("span",{class:"label"},"Page"),s("div",{class:"select-wrapper"},s("verdocs-select-input",{options:l,value:this.pageNumber.toString(),onInput:e=>this.handlePageSelect(e)})),s("span",{class:"count"},"of ",r)),s("div",{class:"right-controls"},s("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),s("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:ue,onClick:()=>this.handleZoomOut()}),s("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:ge,onClick:()=>this.handleZoomIn()}),s("div",{class:"icon-button download",innerHTML:fe,onClick:()=>this.handleOptionSelected({detail:{id:"download"}})}),s("div",{class:"icon-button print",innerHTML:ve,onClick:()=>this.handleOptionSelected({detail:{id:"print"}})}))),s("div",{class:`document signed-document-container zoom-${this.zoomLevel}`},(this.envelope.documents||[]).map((e=>{const t=L(1,e.pages);return s(n,null,this.envelope.documents.length>1&&s("div",{class:"document-separator"},s("div",{innerHTML:V}),s("span",null,e.name)),t.map((t=>{var i;const o=((i=e.page_sizes)===null||i===void 0?void 0:i[t])||{width:612,height:792};d++;return s("verdocs-envelope-document-page",{id:`page-${d}`,envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:t,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&s("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>{this.isDone=true;this.showFinishLater=false}}),this.showDone&&s("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=false;this.isDone=true}}),this.adoptingSignature&&s("verdocs-adopt-signature-dialog",{name:y(this.recipient),nameLocked:!!((e=this.recipient)===null||e===void 0?void 0:e.name_locked),onNext:async e=>{console.log("[SIGN] Adopting signature/initials block",e.detail);this.showSpinner=true;const t=await(await fetch(e.detail.signature)).blob();const i=await(await fetch(e.detail.initials)).blob();const s=await u(this.endpoint,"signature",t);console.log("[SIGN] Created signature",s);this.signatureId=s.id;const o=await g(this.endpoint,"initial",i);console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(this.focusedField){const e=this.getRecipientFields().find((e=>e.name===this.focusedField));if(e){const t=e.type==="signature"?this.signatureId:e.type==="initial"?this.initialId:null;if(t){const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t,false);this.updateRecipientFieldValue(e.name,i)}}this.focusedField=""}const n=this.el.querySelectorAll("verdocs-field-signature");n.forEach((e=>e.setAttribute("signatureid",this.signatureId)));const a=this.el.querySelectorAll("verdocs-field-initial");a.forEach((e=>e.setAttribute("initialid",this.initialId)));this.checkRecipientFields()},onExit:()=>this.adoptingSignature=false}),(this.submitting||this.showSpinner)&&s("verdocs-portal",null,s("div",{class:"spinner-overlay"},s("verdocs-spinner",null))),this.showDownloadDialog&&s("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:()=>{this.showDownloadDialog=false;this.stopPolling()},onDownload:this.handleOnDownload}),!this.loading&&!this.isDone&&s("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:e=>{j(this.endpoint,this.envelopeId,this.roleId,{question:e.detail.question}).then((()=>q("Your question has been sent.",{style:"success"}))).catch((e=>{console.log("Error asking question",e);q("Unable to send question, please try again later.",{style:"error"})}))},onDecline:()=>this.declining=true,onFinishLater:()=>this.showFinishLater=true}))}get el(){return this}static get style(){return pe()}},[0,"verdocs-sign",{endpoint:[1040],envelopeId:[513,"envelope-id"],roleId:[513,"role-id"],inviteCode:[513,"invite-code"],headerTargetId:[1,"header-target-id"],toolbarStyle:[1,"toolbar-style"],recipient:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],fatalErrorHeader:[32],fatalErrorMessage:[32],focusedField:[32],disclosures:[32],fieldUpdateCounter:[32],submitting:[32],submitted:[32],isDone:[32],showDone:[32],adoptingSignature:[32],showLoadError:[32],finishLater:[32],showFinishLater:[32],agreed:[32],signatureId:[32],initialId:[32],documentsSingularPlural:[32],authStep:[32],authMethodStates:[32],pageNumber:[32],kbaQuestions:[32],showSpinner:[32],declining:[32],delegating:[32],delegated:[32],kbaChoices:[32],showDownloadDialog:[32],loading:[32],envelope:[32],zoomLevel:[32],signingProgressMode:[32],polling:[32]}]);function be(){if(typeof customElements==="undefined"){return}const e=["verdocs-sign","verdocs-adopt-signature-dialog","verdocs-button","verdocs-checkbox","verdocs-delegate-dialog","verdocs-dialog","verdocs-disclosure-dialog","verdocs-download-dialog","verdocs-dropdown","verdocs-envelope-document-page","verdocs-flag","verdocs-help-icon","verdocs-kba-dialog","verdocs-loader","verdocs-ok-dialog","verdocs-otp-dialog","verdocs-passcode-dialog","verdocs-portal","verdocs-question-dialog","verdocs-radio-button","verdocs-select-input","verdocs-sign-footer","verdocs-spinner","verdocs-text-input","verdocs-view"];e.forEach((e=>{switch(e){case"verdocs-sign":if(!customElements.get(a(e))){customElements.define(a(e),me)}break;case"verdocs-adopt-signature-dialog":if(!customElements.get(a(e))){U()}break;case"verdocs-button":if(!customElements.get(a(e))){A()}break;case"verdocs-checkbox":if(!customElements.get(a(e))){B()}break;case"verdocs-delegate-dialog":if(!customElements.get(a(e))){Z()}break;case"verdocs-dialog":if(!customElements.get(a(e))){$()}break;case"verdocs-disclosure-dialog":if(!customElements.get(a(e))){Y()}break;case"verdocs-download-dialog":if(!customElements.get(a(e))){_()}break;case"verdocs-dropdown":if(!customElements.get(a(e))){Q()}break;case"verdocs-envelope-document-page":if(!customElements.get(a(e))){W()}break;case"verdocs-flag":if(!customElements.get(a(e))){X()}break;case"verdocs-help-icon":if(!customElements.get(a(e))){J()}break;case"verdocs-kba-dialog":if(!customElements.get(a(e))){K()}break;case"verdocs-loader":if(!customElements.get(a(e))){ee()}break;case"verdocs-ok-dialog":if(!customElements.get(a(e))){te()}break;case"verdocs-otp-dialog":if(!customElements.get(a(e))){ie()}break;case"verdocs-passcode-dialog":if(!customElements.get(a(e))){se()}break;case"verdocs-portal":if(!customElements.get(a(e))){oe()}break;case"verdocs-question-dialog":if(!customElements.get(a(e))){ne()}break;case"verdocs-radio-button":if(!customElements.get(a(e))){ae()}break;case"verdocs-select-input":if(!customElements.get(a(e))){re()}break;case"verdocs-sign-footer":if(!customElements.get(a(e))){le()}break;case"verdocs-spinner":if(!customElements.get(a(e))){de()}break;case"verdocs-text-input":if(!customElements.get(a(e))){ce()}break;case"verdocs-view":if(!customElements.get(a(e))){he()}break}}))}const xe=me;const we=be;export{xe as VerdocsSign,we as defineCustomElement};
1
+ import{p as e,H as t,c as i,h as s,d as o,F as n,t as a}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as r,DEFAULT_DISCLOSURES as l,startSigningSession as d,envelopeRecipientAgree as c,getEnvelope as h,updateEnvelopeField as p,createSignature as u,createInitials as g,sortFields as f,envelopeRecipientSubmit as v,isFieldValid as m,isFieldFilled as b,uploadEnvelopeFieldAttachment as x,deleteEnvelopeFieldAttachment as w,formatFullName as y,fullNameToInitials as k,verifySigner as C,getEnvelopesZip as S,getEnvelopeDocumentDownloadLink as I,getCombinedEnvelopeDocumentDownloadLink as N,delegateRecipient as z,envelopeRecipientDecline as E,integerSequence as G,askQuestion as L}from"@verdocs/js-sdk";import{u as j,g as D,r as T,a as F,d as H}from"./p-BCwFpXpV.js";import{D as M}from"./p-17OorOnH.js";import{D as V,C as q}from"./p-BDv5kBUR.js";import{V as P}from"./p-D97GxsI-.js";import{S as O}from"./p-C1sRVZWv.js";import{S as R}from"./p-C7hFgM52.js";import{d as U}from"./p-COfQ1FzC.js";import{d as B}from"./p-Bdf8pPWm.js";import{d as A}from"./p-REnrt0JM.js";import{d as Z}from"./p-B_dAoCMu.js";import{d as $}from"./p-DT0LGcPi.js";import{d as Y}from"./p-CQUMhFM4.js";import{d as _}from"./p-C8r3qDBh.js";import{d as W}from"./p-DFXK-FYy.js";import{d as K}from"./p-DyhyfLyV.js";import{d as Q}from"./p-wUsR0Dpa.js";import{d as J}from"./p-CioaaWeS.js";import{d as X}from"./p-CrONbj5k.js";import{d as ee}from"./p-B-_kYJtC.js";import{d as te}from"./p-BwUTiBud.js";import{d as ie}from"./p-CSIVZcVx.js";import{d as se}from"./p-BIc5CIpg.js";import{d as oe}from"./p-DQTI8vRX.js";import{d as ne}from"./p-CGWVITS0.js";import{d as ae}from"./p-BaH_hK8j.js";import{d as re}from"./p-BXGNkmyr.js";import{d as le}from"./p-CGt7KiUu.js";import{d as de}from"./p-BXQO5Vza.js";import{d as ce}from"./p-DYtSnUj9.js";import{d as he}from"./p-Bkae9I4G.js";const pe=()=>`verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;padding-right:140px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;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);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}@media (max-width: 670px){#verdocs-sign-header .title{font-size:14px}}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}@media (max-width: 670px){#verdocs-sign-header .remaining-count .review-optional{display:none}}@media (max-width: 670px){#verdocs-sign-header .remaining-count{font-size:12px}}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}@media (max-width: 670px){#verdocs-sign-header .icon-button.magnify{display:none}}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}`;const ue=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>`;const ge=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>`;const fe=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>`;const ve=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>`;const me=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.sdkError=i(this,"sdkError");this.envelopeLoaded=i(this,"envelopeLoaded");this.envelopeUpdated=i(this,"envelopeUpdated");this.endpoint=new r({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=l;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}async componentDidLoad(){var e,t,i,s,o,n;this.updateZoomFromWindow();window.addEventListener("resize",(()=>this.updateZoomFromWindow()));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new O("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new O("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new O("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const e=await d(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);this.processAuthResponse(e)}catch(e){console.log("[SIGN] Error with signing session",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new O(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(n=e.response)===null||n===void 0?void 0:n.data));this.showLoadError=true}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}this.setupIntersectionObserver()}disconnectedCallback(){var e,t,i;this.stopPolling();(e=this.observer)===null||e===void 0?void 0:e.disconnect();window.removeEventListener("resize",(()=>this.updateZoomFromWindow()));(t=document.getElementById(this.getOrgStyleOverridesId()))===null||t===void 0?void 0:t.remove();(i=document.getElementById(this.getBrandStyleOverridesId()))===null||i===void 0?void 0:i.remove()}updateZoomFromWindow(){const e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}}setupIntersectionObserver(){const e=this.el.querySelectorAll("verdocs-envelope-document-page");if(e.length===0)return;if(this.observer){this.observer.disconnect()}const t=this.el.querySelector(".signed-document-container");const i={root:t,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;const i=parseInt(t.replace("page-",""),10);if(!isNaN(i)&&this.pageNumber!==i){this.pageNumber=i}}}))}),i);e.forEach((e=>this.observer.observe(e)))}getOrgStyleOverridesId(){return`verdocs-org-style-overrides-${this.envelopeId}`}getBrandStyleOverridesId(){return`verdocs-brand-style-overrides-${this.envelopeId}`}applyOrgStyleOverrides(){var e,t;const i=this.getOrgStyleOverridesId();const s=document.getElementById(i);const o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){const e=s||document.createElement("style");e.id=i;e.textContent=o;if(!s){document.head.appendChild(e)}}else if(s){s.remove()}}applyBrandStyleOverrides(e){const t=this.getBrandStyleOverridesId();const i=document.getElementById(t);const s=e===null||e===void 0?void 0:e.style_overrides;if(typeof s==="string"&&s.length>0){const e=i||document.createElement("style");e.id=t;e.textContent=s;if(!i){document.head.appendChild(e)}}else if(i){i.remove()}}processAuthResponse(e){var t,i,s,o;const{envelope:n,recipient:a,brand:r}=e;(t=n.documents)===null||t===void 0?void 0:t.sort(((e,t)=>e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)));const{auth_step:d}=a;this.recipient=a;this.envelope=n;this.disclosures=((s=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||s===void 0?void 0:s.disclaimer)||l;this.applyOrgStyleOverrides();this.applyBrandStyleOverrides(r);this.authStep=d;this.delegated=!!a.delegated_to;this.agreed=a.agreed;this.signatureId=null;this.initialId=null;this.submitted=a.status==="submitted";this.loading=false;this.isDone=this.submitted;this.showDone=this.submitted;R.updateEnvelope(this.envelopeId,n);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=a.auth_method_states||{};this.kbaQuestions=a.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(a.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})}handleClickAgree(){this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);const e=Intl.DateTimeFormat().resolvedOptions();c(this.endpoint,this.envelopeId,this.roleId,this.disclosures,{locale:e.locale,timezone:e.timeZone}).then((()=>{var e;this.nextButtonLabel="Next";this.recipient.agreed=true;this.submitting=false;this.agreed=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var t,i,s;console.log("[SIGN] Unable to accept disclosures",e);P("Unable to accept disclosures, please try again later",{style:"error"});(t=this.sdkError)===null||t===void 0?void 0:t.emit(new O(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(s=e.response)===null||s===void 0?void 0:s.data));this.submitting=false}))}handlePageSelect(e){const t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;const e=this.el.querySelector(".signed-document-container");const i=this.el.querySelector(`#page-${t}`);if(e&&i){const t=i.offsetTop-20;e.scrollTo({top:t,behavior:"smooth"})}}}async handleOptionSelected(e){var t,i;switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}}startPolling(){this.stopPolling();const e=()=>{var e,t,i,s,o,n;const a=((e=this.envelope)===null||e===void 0?void 0:e.status)==="complete"||!!((t=this.envelope)===null||t===void 0?void 0:t.signed);const r=(s=(i=this.envelope)===null||i===void 0?void 0:i.documents)===null||s===void 0?void 0:s.some((e=>e.type==="certificate"));const l=(n=(o=this.envelope)===null||o===void 0?void 0:o.recipients)===null||n===void 0?void 0:n.every((e=>e.status==="submitted"));if(a&&r)return false;if(!l)return false;return true};if(!e()){return}this.polling=true;this.pollingInterval=setInterval((async()=>{try{const t=await h(this.endpoint,this.envelopeId);this.envelope=t;R.updateEnvelope(this.envelopeId,t);this.checkRecipientFields();if(!e()){this.stopPolling()}}catch(e){console.error("[SIGN] Polling error",e);this.stopPolling()}}),5e3)}stopPolling(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false}handleZoomIn(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}}handleZoomOut(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}}updateRecipientFieldValue(e,t){console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((i=>{if(i.name===e){i.value=t.value;i.settings=t.settings;j(i);this.fieldUpdateCounter++;this.markEnvelopeStarted();this.checkRecipientFields()}}))}getStartedKey(){var e;return`${this.envelopeId}:${((e=this.recipient)===null||e===void 0?void 0:e.role_name)||""}`}markEnvelopeStarted(){const e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");const t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}}saveFieldChange(e,t,i){const s=this.getRecipientFields().find((t=>t.name===e));if(s===null||s===void 0?void 0:s.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});p(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((t=>this.updateRecipientFieldValue(e,t))).catch((e=>{var t,i,s,o,n,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(i=e.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");this.fatalErrorHeader="Signing Session Expired";this.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);P("Unable to save change, please try again later",{style:"error"})}(o=this.sdkError)===null||o===void 0?void 0:o.emit(new O(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(a=e.response)===null||a===void 0?void 0:a.data))}))}async handleFieldChange(e,t){if(!t.target){return}const{value:i,checked:s}=t.target;switch(e.type){case"textarea":case"textbox":return this.saveFieldChange(e.name,i,false);case"checkbox":{return this.saveFieldChange(e.name,String(t.target.checked),false)}case"radio":{return this.saveFieldChange(e.name,String(t.target.checked),false)}case"dropdown":console.log("Saving dropdown",e.name,t.detail);return this.saveFieldChange(e.name,t.detail,false);case"initial":if(t.detail===undefined){return}if(t.detail===null){console.log("[SIGN] Clearing initial");const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,null,false);return this.updateRecipientFieldValue(e.name,t)}if(this.initialId){console.log("[SIGN] Reusing initial",this.initialId);const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false);return this.updateRecipientFieldValue(e.name,t)}if(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)){console.log("[SIGN] Reusing initial",t.detail);const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false);this.initialId=t.detail;return this.updateRecipientFieldValue(e.name,i)}this.showSpinner=true;const o=await(await fetch(t.detail)).blob();return g(this.endpoint,"initial",o).then((async t=>{const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false);this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false})).catch((e=>{console.log("Error updating initials",e);P("Unable to save initials, please try again later",{style:"error"});this.showSpinner=false}));case"signature":if(t.detail===undefined){return}if(t.detail===null){console.log("[SIGN] Clearing signature");const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,null,false);return this.updateRecipientFieldValue(e.name,t)}if(this.signatureId){console.log("[SIGN] Reusing signature",this.signatureId);const t=await p(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false);return this.updateRecipientFieldValue(e.name,t)}if(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)){console.log("[SIGN] Reusing signature",t.detail);const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false);this.signatureId=t.detail;return this.updateRecipientFieldValue(e.name,i)}this.showSpinner=true;const n=await(await fetch(t.detail)).blob();console.log("[SIGN] Creating new signature");return u(this.endpoint,"signature",n).then((async t=>{console.log("Signature update result",t);const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false);this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false})).catch((e=>{console.warn("[SIGN] Error updating signature",e);P("Unable to save signature, please try again later",{style:"error"});this.showSpinner=false}));case"date":const{formattedDate:a}=t.detail;if(a){return this.saveFieldChange(e.name,a,false)}break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:i,checked:s},e);break}}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"&&!e.readonly));f(e);return e}getSortedDisplayableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"));f(e);return e}async handleNext(){var e;if(this.nextSubmits){try{(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;const t=Intl.DateTimeFormat().resolvedOptions();const i=await v(this.endpoint,this.envelopeId,this.roleId,{locale:t.locale,timezone:t.timeZone});console.log("[SIGN] Submitted successfully",i);window.location.reload()}catch(e){console.log("[SIGN] Error submitting",e);this.submitting=false;P("Unable to submit document, please try again.",{style:"error"})}return}const t=this.getSortedFillableFields().filter((e=>!this.isFieldActuallyFilled(e)));const i=this.getNextFieldFromList(t);if(i){const e=D(i);const t=document.getElementById(e);t===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});t===null||t===void 0?void 0:t.focusField();this.focusedField=i.name}}handleNextOptional(){const e=this.getSortedFillableFields().filter((e=>!e.required&&!this.isFieldActuallyFilled(e)));const t=this.getNextFieldFromList(e);if(t){const e=D(t);const i=document.getElementById(e);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});i===null||i===void 0?void 0:i.focusField();this.focusedField=t.name}}getRecipientFields(){var e;return((e=this.envelope)===null||e===void 0?void 0:e.fields.filter((e=>e.role_name===this.recipient.role_name)))||[]}getRequiredTotalCount(){return this.getSortedFillableFields().filter((e=>e.required)).length}getRequiredFilledCount(){return this.getSortedFillableFields().filter((e=>e.required&&this.isFieldActuallyFilled(e))).length}getOptionalUnfilledCount(){return this.getSortedFillableFields().filter((e=>!e.required&&!this.isFieldActuallyFilled(e))).length}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!m(e,this.getRecipientFields())));if(e.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();const t=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");const i=t.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(i){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}}isFieldActuallyFilled(e){if(e.type==="radio"&&e.group){const t=this.getRecipientFields().some((t=>t.group===e.group&&t.value==="true"));if(t){return true}}return b(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")}getNextRequiredField(){const e=this.getSortedFillableFields().filter((e=>e.required&&!this.isFieldActuallyFilled(e)));f(e);if(e.length===0){const e=this.getSortedFillableFields().filter((e=>!this.isFieldActuallyFilled(e)));f(e);if(e.length>0){return this.getNextFieldFromList(e)}return null}return this.getNextFieldFromList(e)}getNextFieldFromList(e){const t=e.findIndex((e=>e.name===this.focusedField));let i=t+1;if(i>=e.length){i=0}return e[i]}handlePrev(){var e;const t=this.getSortedFillableFields();const i=t.findIndex((e=>e.name===this.focusedField));if(i>0){const s=t[i-1];const o=D(s);const n=document.getElementById(o);n===null||n===void 0?void 0:n.scrollIntoView({behavior:"smooth",block:"center"});(e=n===null||n===void 0?void 0:n.focusField)===null||e===void 0?void 0:e.call(n);this.focusedField=s.name}}updateAllFlags(){Object.values(this.renderedPages).forEach((e=>{this.updateFlagsForPage(e)}))}updateFlagsForPage(e){if(!e)return;const t=document.getElementById(e.containerId+"-controls");if(!t)return;const i=t.querySelectorAll(".verdocs-flag-instance");i.forEach((e=>e.remove()));let s=this.getNextRequiredField();const o=this.getRecipientFields().find((e=>e.name===this.focusedField));if(o&&!b(o,this.getRecipientFields())){s=o}if(s&&s.page===e.pageNumber&&s.document_id===e.documentId){const t="fill";let i="FILL";let o=false;switch(s.type){case"signature":i="SIGN";break;case"initial":i="INITIAL";break;case"checkbox":i="CHECK";break;case"radio":i="SELECT";break;case"date":case"dropdown":i="SELECT";break;case"attachment":i="ATTACH";break;case"payment":i="PAY";break}if(!s.required){o=true}T(e,s.y,s.height||H(s.type),{variant:t,label:i,showSkip:o,onSkip:()=>{this.handleNext()},onClick:()=>{var e;const t=D(s);const i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}}attachFieldAttributes(e,t,i){if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(e=>{if(e.target.type==="radio"||e.target.type==="checkbox"){this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}else{this.checkRecipientFields()}}));i.addEventListener("attached",(async i=>{console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;try{const s=await x(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail);this.updateRecipientFieldValue(t.name,s);this.checkRecipientFields();const o=F("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false}catch(i){console.log("Error uploading attachment",i);P("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));i.addEventListener("deleted",(async i=>{console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;try{const i=await w(this.endpoint,this.envelopeId,this.roleId,t.name);console.log("[SIGN] Deleted attachment",i);this.updateRecipientFieldValue(t.name,i);this.checkRecipientFields();const s=F("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false}catch(i){console.log("Error uploading attachment",i);P("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));i.addEventListener("focusout",(e=>{if(t.type!=="dropdown"&&t.type!=="attachment"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}}));i.addEventListener("fieldChange",(e=>{this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}));i.addEventListener("adopt",(()=>{this.focusedField=t.name;this.adoptingSignature=true}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);const s=y(this.recipient);i.setAttribute("initials",k(s));i.setAttribute("name",s);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}}handlePageRendered(e){const t=e.detail;this.renderedPages[`${t.documentId}:${t.pageNumber}`]=t;const i=this.getSortedDisplayableFields();i.filter((e=>e&&e.document_id===t.documentId&&e.page===t.pageNumber)).forEach(((e,i)=>{const s=F("envelope",e,t,{disabled:false,editable:false,draggable:false,done:this.isDone},i);if(!s){return}if(Array.isArray(s)){s.map((i=>this.attachFieldAttributes(t,e,i)))}else{this.attachFieldAttributes(t,e,s)}}));this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending"))).forEach((()=>{this.getRecipientFields().filter((e=>e.document_id===t.documentId&&e.page===t.pageNumber)).forEach((e=>{const i=F("envelope",e,t,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!i){return}if(Array.isArray(i)){i.map((i=>this.attachFieldAttributes(t,e,i)))}else{this.attachFieldAttributes(t,e,i)}}))}));this.checkRecipientFields();this.updateFlagsForPage(t)}handleAuthenticateSigner(e){console.log("[SIGN] Submitting authentication step",e);C(this.endpoint,e).then((e=>{console.log("[SIGN] Verification successful",e);this.processAuthResponse(e)})).catch((e=>{var t,i,s,o,n,a;console.log("[SIGN] Error submitting authentication step",e);console.log((t=e.response)===null||t===void 0?void 0:t.data);if((o=(s=(i=e.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.error)===null||o===void 0?void 0:o.includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{P(((a=(n=e.response)===null||n===void 0?void 0:n.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))}async handleOnDownload(e){var t,i;const{action:s,documentId:o}=e.detail;console.log("[SIGN] Download action selected:",s,o);try{switch(s){case M.certificate:const e=this.envelope.documents.find((e=>e.type==="certificate"));if(e){const t=await I(this.endpoint,e.id);window.open(t,"_blank")}else{P("Certificate not yet available.",{style:"info"})}break;case M.combined:const s=o||((t=this.envelope.documents.find((e=>e.type==="certificate")))===null||t===void 0?void 0:t.id);const n=await N(this.endpoint,s);window.open(n,"_blank");break;case M.document:const a=o||((i=this.envelope.documents.find((e=>e.type==="attachment")))===null||i===void 0?void 0:i.id);if(a){const e=await I(this.endpoint,a);window.open(e,"_blank")}break;case M.zip:const r=await S(this.endpoint,[this.envelopeId]);const l=window.URL.createObjectURL(r.data);const d=document.createElement("a");d.href=l;d.download=`${this.envelope.name}.zip`;document.body.appendChild(d);d.click();d.remove();window.URL.revokeObjectURL(l);break}}catch(e){console.error("Download error",e);P("Unable to complete download request.",{style:"error"})}}render(){var e;if(this.showLoadError){return s(o,null,s("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`,buttonLabel:"OK",onNext:()=>{window.location.reload()}}))}if(!this.envelope){return s(o,null,s("verdocs-loader",null))}if(this.fatalErrorMessage){return s(o,{class:{agreed:this.agreed}},s("div",{class:"fatal-error"},s("div",{class:"message"},s("div",{class:"header"},this.fatalErrorHeader),s("p",null,this.fatalErrorMessage))))}if(this.delegated){return s(o,{class:{agreed:false}},s("div",{class:"fatal-error"},s("div",{class:"message"},s("div",{class:"header"},"Delegated Signing Request"),s("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return s(o,{class:{agreed:this.agreed}},s("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var t;return(t=this.sdkError)===null||t===void 0?void 0:t.emit(e.detail)}}),this.showDone&&s("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:e=>{e.preventDefault();e.stopPropagation();this.showDone=false;this.isDone=true}}),this.submitting&&s("div",{class:"loading-indicator"},s("verdocs-loader",null)))}if(this.delegating){return s(o,{class:"agreed"},s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:()=>this.delegating=false,onNext:e=>{z(this.endpoint,this.envelopeId,this.roleId,e.detail).then((e=>{P("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",e);this.delegated=true;this.delegating=false})).catch((e=>{console.log("[SIGN] Error delegating request",e);P("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return s(o,{class:"agreed"},s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("verdocs-ok-dialog",{heading:"Decline Signing Request",message:`If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.`,buttonLabel:"OK",showCancel:true,onExit:()=>this.declining=false,onNext:()=>{E(this.endpoint,this.envelopeId,this.roleId).then((e=>{console.log("[SIGN] Decline result",e);window.location.reload()})).catch((e=>{console.warn("[SIGN] Error declining signing session",e);P("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return s(o,{class:"agreed"},s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:()=>this.delegating=true,onDecline:()=>this.declining=true,onAccept:()=>this.handleClickAgree()}))}if(this.authStep==="passcode"){return s("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:e=>this.processAuthResponse(e.detail.response)})}if(this.authStep==="email"){return s("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:async e=>{this.processAuthResponse(e.detail.response)}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return s(o,{class:"kba"},s("div",{id:"verdocs-sign-header"},s("div",{class:"inner"},s("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),s("div",{class:"title"},this.envelope.name))),s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("div",{class:"cover"},s("div",{class:"kba"},s("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:async e=>{const t=e.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:t.first_name,last_name:t.last_name,address:t.address,city:t.city,state:t.state,zip:t.zip,dob:t.dob})}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){const e=this.kbaChoices.length;const t=this.kbaQuestions[e];return s(o,{class:"kba"},s("div",{id:"verdocs-sign-header"},s("div",{class:"inner"},s("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),s("div",{class:"title"},this.envelope.name))),s("div",{class:"document",style:{paddingTop:"15px"}},s("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),s("div",{class:"cover"},s("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?s("verdocs-spinner",null):s("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(t===null||t===void 0?void 0:t.prompt)||"Please select one of the options below.",choices:(t===null||t===void 0?void 0:t.answer)||["Skip Question"],step:e+1,steps:this.kbaQuestions.length,onNext:async e=>{const t=e.detail;this.kbaChoices=[...this.kbaChoices,t];if(this.kbaChoices.length>=this.kbaQuestions.length){const e=this.kbaQuestions.map(((e,t)=>({type:e.type,answer:this.kbaChoices[t]})));console.log("Submitting KBA responses",this.kbaChoices,e);this.handleAuthenticateSigner({auth_method:"kba",responses:e})}}}))))}const t=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];const i=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){t.unshift({id:"delegate",label:"Delegate"})}const a=this.getRecipientFields().filter((e=>!m(e,this.getRecipientFields())));a.length>0?console.log("[SIGN] Invalid fields remaining",a.map((e=>e.name))):console.log("[SIGN] All field valid");const r=this.envelope.documents.reduce(((e,t)=>e+t.pages),0);const l=G(1,r).map((e=>({label:e.toString(),value:e.toString()})));let d=0;return s(o,null,this.toolbarStyle==="menu"&&s("div",{id:"verdocs-sign-header"},s("div",{class:"inner"},s("div",{class:"title"},this.envelope.name),s("div",{style:{flex:"1"}}),!this.finishLater&&(()=>{const e=this.getRequiredTotalCount()-this.getRequiredFilledCount();const t=this.getOptionalUnfilledCount();if(e>0){return s("span",{class:"remaining-count"},e," required field",e===1?"":"s"," left")}return s("span",{class:"remaining-count"},s("span",{class:"check-icon",innerHTML:q}),"All required fields complete",t>0&&s("div",{class:"review-optional"},s("span",{class:"separator"},"| "),s("span",{onClick:()=>this.handleNextOptional()},"Review ",t," optional")))})(),!this.finishLater&&s("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),s("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal",magnify:true},innerHTML:ue,onClick:()=>this.handleZoomOut()}),s("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2",magnify:true},innerHTML:ge,onClick:()=>this.handleZoomIn()}),s("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?t:i,onOptionSelected:e=>this.handleOptionSelected(e)}))),this.toolbarStyle==="controls"&&s("div",{class:"controls-toolbar"},s("div",{class:"left-controls"},s("div",{class:"title"},this.envelope.name)),s("div",{class:"center-controls"},s("span",{class:"label"},"Page"),s("div",{class:"select-wrapper"},s("verdocs-select-input",{options:l,value:this.pageNumber.toString(),onInput:e=>this.handlePageSelect(e)})),s("span",{class:"count"},"of ",r)),s("div",{class:"right-controls"},s("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),s("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:ue,onClick:()=>this.handleZoomOut()}),s("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:ge,onClick:()=>this.handleZoomIn()}),s("div",{class:"icon-button download",innerHTML:fe,onClick:()=>this.handleOptionSelected({detail:{id:"download"}})}),s("div",{class:"icon-button print",innerHTML:ve,onClick:()=>this.handleOptionSelected({detail:{id:"print"}})}))),s("div",{class:`document signed-document-container zoom-${this.zoomLevel}`},(this.envelope.documents||[]).map((e=>{const t=G(1,e.pages);return s(n,null,this.envelope.documents.length>1&&s("div",{class:"document-separator"},s("div",{innerHTML:V}),s("span",null,e.name)),t.map((t=>{var i;const o=((i=e.page_sizes)===null||i===void 0?void 0:i[t])||{width:612,height:792};d++;return s("verdocs-envelope-document-page",{id:`page-${d}`,envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:t,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&s("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>{this.isDone=true;this.showFinishLater=false}}),this.showDone&&s("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=false;this.isDone=true}}),this.adoptingSignature&&s("verdocs-adopt-signature-dialog",{name:y(this.recipient),nameLocked:!!((e=this.recipient)===null||e===void 0?void 0:e.name_locked),onNext:async e=>{console.log("[SIGN] Adopting signature/initials block",e.detail);this.showSpinner=true;const t=await(await fetch(e.detail.signature)).blob();const i=await(await fetch(e.detail.initials)).blob();const s=await u(this.endpoint,"signature",t);console.log("[SIGN] Created signature",s);this.signatureId=s.id;const o=await g(this.endpoint,"initial",i);console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(this.focusedField){const e=this.getRecipientFields().find((e=>e.name===this.focusedField));if(e){const t=e.type==="signature"?this.signatureId:e.type==="initial"?this.initialId:null;if(t){const i=await p(this.endpoint,this.envelopeId,this.roleId,e.name,t,false);this.updateRecipientFieldValue(e.name,i)}}this.focusedField=""}const n=this.el.querySelectorAll("verdocs-field-signature");n.forEach((e=>e.setAttribute("signatureid",this.signatureId)));const a=this.el.querySelectorAll("verdocs-field-initial");a.forEach((e=>e.setAttribute("initialid",this.initialId)));this.checkRecipientFields()},onExit:()=>this.adoptingSignature=false}),(this.submitting||this.showSpinner)&&s("verdocs-portal",null,s("div",{class:"spinner-overlay"},s("verdocs-spinner",null))),this.showDownloadDialog&&s("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:()=>{this.showDownloadDialog=false;this.stopPolling()},onDownload:e=>this.handleOnDownload(e)}),!this.loading&&!this.isDone&&s("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:e=>{L(this.endpoint,this.envelopeId,this.roleId,{question:e.detail.question}).then((()=>P("Your question has been sent.",{style:"success"}))).catch((e=>{console.log("Error asking question",e);P("Unable to send question, please try again later.",{style:"error"})}))},onDecline:()=>this.declining=true,onFinishLater:()=>this.showFinishLater=true}))}get el(){return this}static get style(){return pe()}},[0,"verdocs-sign",{endpoint:[1040],envelopeId:[513,"envelope-id"],roleId:[513,"role-id"],inviteCode:[513,"invite-code"],headerTargetId:[1,"header-target-id"],toolbarStyle:[1,"toolbar-style"],recipient:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],fatalErrorHeader:[32],fatalErrorMessage:[32],focusedField:[32],disclosures:[32],fieldUpdateCounter:[32],submitting:[32],submitted:[32],isDone:[32],showDone:[32],adoptingSignature:[32],showLoadError:[32],finishLater:[32],showFinishLater:[32],agreed:[32],signatureId:[32],initialId:[32],documentsSingularPlural:[32],authStep:[32],authMethodStates:[32],pageNumber:[32],kbaQuestions:[32],showSpinner:[32],declining:[32],delegating:[32],delegated:[32],kbaChoices:[32],showDownloadDialog:[32],loading:[32],envelope:[32],zoomLevel:[32],signingProgressMode:[32],polling:[32]}]);function be(){if(typeof customElements==="undefined"){return}const e=["verdocs-sign","verdocs-adopt-signature-dialog","verdocs-button","verdocs-checkbox","verdocs-delegate-dialog","verdocs-dialog","verdocs-disclosure-dialog","verdocs-download-dialog","verdocs-dropdown","verdocs-envelope-document-page","verdocs-flag","verdocs-help-icon","verdocs-kba-dialog","verdocs-loader","verdocs-ok-dialog","verdocs-otp-dialog","verdocs-passcode-dialog","verdocs-portal","verdocs-question-dialog","verdocs-radio-button","verdocs-select-input","verdocs-sign-footer","verdocs-spinner","verdocs-text-input","verdocs-view"];e.forEach((e=>{switch(e){case"verdocs-sign":if(!customElements.get(a(e))){customElements.define(a(e),me)}break;case"verdocs-adopt-signature-dialog":if(!customElements.get(a(e))){U()}break;case"verdocs-button":if(!customElements.get(a(e))){B()}break;case"verdocs-checkbox":if(!customElements.get(a(e))){A()}break;case"verdocs-delegate-dialog":if(!customElements.get(a(e))){Z()}break;case"verdocs-dialog":if(!customElements.get(a(e))){$()}break;case"verdocs-disclosure-dialog":if(!customElements.get(a(e))){Y()}break;case"verdocs-download-dialog":if(!customElements.get(a(e))){_()}break;case"verdocs-dropdown":if(!customElements.get(a(e))){W()}break;case"verdocs-envelope-document-page":if(!customElements.get(a(e))){K()}break;case"verdocs-flag":if(!customElements.get(a(e))){Q()}break;case"verdocs-help-icon":if(!customElements.get(a(e))){J()}break;case"verdocs-kba-dialog":if(!customElements.get(a(e))){X()}break;case"verdocs-loader":if(!customElements.get(a(e))){ee()}break;case"verdocs-ok-dialog":if(!customElements.get(a(e))){te()}break;case"verdocs-otp-dialog":if(!customElements.get(a(e))){ie()}break;case"verdocs-passcode-dialog":if(!customElements.get(a(e))){se()}break;case"verdocs-portal":if(!customElements.get(a(e))){oe()}break;case"verdocs-question-dialog":if(!customElements.get(a(e))){ne()}break;case"verdocs-radio-button":if(!customElements.get(a(e))){ae()}break;case"verdocs-select-input":if(!customElements.get(a(e))){re()}break;case"verdocs-sign-footer":if(!customElements.get(a(e))){le()}break;case"verdocs-spinner":if(!customElements.get(a(e))){de()}break;case"verdocs-text-input":if(!customElements.get(a(e))){ce()}break;case"verdocs-view":if(!customElements.get(a(e))){he()}break}}))}const xe=me;const we=be;export{xe as VerdocsSign,we as defineCustomElement};
2
2
  //# sourceMappingURL=verdocs-sign.js.map