@verdocs/web-sdk 2.2.46 → 2.3.0

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 (249) hide show
  1. package/dist/cjs/{TemplateStore-d9936a68.js → TemplateStore-6110ad1f.js} +1 -1
  2. package/dist/cjs/{Types-ee5afdf8.js → Types-fb95ed6b.js} +2 -1
  3. package/dist/cjs/{VerdocsEndpoint-2d85658d.js → VerdocsEndpoint-6441c5c0.js} +286 -425
  4. package/dist/cjs/{_commonjsHelpers-0c557e26.js → _commonjsHelpers-1fbbf0eb.js} +0 -5
  5. package/dist/cjs/interact.min-7c05ff8a.js +12 -0
  6. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  7. package/dist/cjs/{utils-2ddfdf9e.js → utils-a3f0b70a.js} +2 -2
  8. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-auth.cjs.entry.js +5 -8
  10. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +3 -3
  12. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +4 -4
  13. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +4 -4
  14. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +4 -4
  17. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +3 -3
  18. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
  19. package/dist/cjs/verdocs-field-date.cjs.entry.js +4 -4
  20. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
  21. package/dist/cjs/verdocs-field-initial.cjs.entry.js +5 -5
  22. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  23. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +7 -7
  26. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +7 -7
  27. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +4 -4
  28. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +3 -3
  30. package/dist/cjs/verdocs-preview_8.cjs.entry.js +5 -5
  31. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  32. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +44 -33
  34. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  35. package/dist/cjs/verdocs-sign.cjs.entry.js +4 -4
  36. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +4 -4
  37. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +11 -11
  38. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  39. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  40. package/dist/cjs/verdocs-view.cjs.entry.js +4 -4
  41. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +4 -7
  42. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +1 -0
  43. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +2 -2
  44. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.css +1 -0
  45. package/dist/collection/utils/Types.js +2 -1
  46. package/dist/components/Types2.js +2 -1
  47. package/dist/components/VerdocsEndpoint.js +286 -425
  48. package/dist/components/_commonjsHelpers.js +1 -5
  49. package/dist/components/index3.js +40 -29
  50. package/dist/components/interact.min.js +5 -6
  51. package/dist/components/verdocs-auth.js +4 -7
  52. package/dist/components/verdocs-field-date.js +1 -1
  53. package/dist/components/verdocs-field-initial.js +2 -2
  54. package/dist/components/verdocs-field-textarea.js +3 -3
  55. package/dist/components/verdocs-field-textbox.js +3 -3
  56. package/dist/components/verdocs-field-timestamp.js +1 -1
  57. package/dist/components/verdocs-template-fields2.js +3 -3
  58. package/dist/components/verdocs-template-roles2.js +4 -4
  59. package/dist/custom-elements.json +2059 -0
  60. package/dist/docs.json +1 -1
  61. package/dist/esm/{TemplateStore-018fc1db.js → TemplateStore-03608883.js} +1 -1
  62. package/dist/esm/Types-1628dc71.js +5 -0
  63. package/dist/esm/{VerdocsEndpoint-b011af25.js → VerdocsEndpoint-6f42e6a8.js} +286 -425
  64. package/dist/esm/{_commonjsHelpers-5ec8f9b7.js → _commonjsHelpers-8a9f3b18.js} +1 -5
  65. package/dist/esm/interact.min-ef5402f3.js +10 -0
  66. package/dist/esm/ipc-test.entry.js +2 -2
  67. package/dist/esm/{utils-d269cea3.js → utils-e0ce2c22.js} +2 -2
  68. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  69. package/dist/esm/verdocs-auth.entry.js +5 -8
  70. package/dist/esm/verdocs-build.entry.js +2 -2
  71. package/dist/esm/verdocs-button-panel_2.entry.js +3 -3
  72. package/dist/esm/verdocs-contact-picker_2.entry.js +4 -4
  73. package/dist/esm/verdocs-envelope-document-page.entry.js +4 -4
  74. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  75. package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -2
  76. package/dist/esm/verdocs-envelopes-list.entry.js +4 -4
  77. package/dist/esm/verdocs-field-attachment.entry.js +3 -3
  78. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  79. package/dist/esm/verdocs-field-date.entry.js +4 -4
  80. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  81. package/dist/esm/verdocs-field-initial.entry.js +5 -5
  82. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  83. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  84. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  85. package/dist/esm/verdocs-field-textarea.entry.js +7 -7
  86. package/dist/esm/verdocs-field-textbox.entry.js +7 -7
  87. package/dist/esm/verdocs-field-timestamp.entry.js +4 -4
  88. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  89. package/dist/esm/verdocs-pagination_2.entry.js +3 -3
  90. package/dist/esm/verdocs-preview_8.entry.js +5 -5
  91. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  92. package/dist/esm/verdocs-search.entry.js +1 -1
  93. package/dist/esm/verdocs-settings-api-keys_4.entry.js +44 -33
  94. package/dist/esm/verdocs-settings.entry.js +1 -1
  95. package/dist/esm/verdocs-sign.entry.js +4 -4
  96. package/dist/esm/verdocs-template-document-page_2.entry.js +4 -4
  97. package/dist/esm/verdocs-template-fields_4.entry.js +11 -11
  98. package/dist/esm/verdocs-template-star.entry.js +1 -1
  99. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  100. package/dist/esm/verdocs-view.entry.js +4 -4
  101. package/dist/esm-es5/{TemplateStore-018fc1db.js → TemplateStore-03608883.js} +1 -1
  102. package/dist/esm-es5/Types-1628dc71.js +1 -0
  103. package/dist/esm-es5/VerdocsEndpoint-6f42e6a8.js +1 -0
  104. package/dist/esm-es5/_commonjsHelpers-8a9f3b18.js +1 -0
  105. package/dist/esm-es5/interact.min-ef5402f3.js +1 -0
  106. package/dist/esm-es5/ipc-test.entry.js +1 -1
  107. package/dist/esm-es5/{utils-d269cea3.js → utils-e0ce2c22.js} +1 -1
  108. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  141. package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +1 -1
  142. package/dist/types/utils/Types.d.ts +1 -1
  143. package/dist/types/utils/utils.d.ts +1 -1
  144. package/dist/verdocs-web-sdk/{p-35769d0c.system.entry.js → p-026eb575.system.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/{p-89aa696c.system.entry.js → p-0494ee4f.system.entry.js} +1 -1
  146. package/dist/verdocs-web-sdk/{p-eb595245.system.js → p-0ffb2c57.system.js} +1 -1
  147. package/dist/verdocs-web-sdk/{p-7805f0e0.entry.js → p-112cd2f5.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-af3e9624.entry.js → p-120f75b1.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-aa51514f.system.entry.js → p-16849f44.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-76907130.entry.js → p-1831cb38.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-343672f5.system.entry.js → p-1983855b.system.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-126ba5d2.system.entry.js → p-19f8d4eb.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/p-1ba9f457.system.js +1 -0
  154. package/dist/verdocs-web-sdk/{p-77abc3ce.entry.js → p-1eb38c2e.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/p-208fd2e2.js +1 -0
  156. package/dist/verdocs-web-sdk/{p-10af7aec.system.entry.js → p-262d513f.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-409e992a.entry.js → p-2979d6eb.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-0df58c57.entry.js → p-2ec8a9be.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/p-32b26f8f.system.entry.js +1 -0
  160. package/dist/verdocs-web-sdk/{p-b73415c3.system.entry.js → p-393a9a2a.system.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/p-3a7fa389.js +1 -0
  162. package/dist/verdocs-web-sdk/{p-23be436b.entry.js → p-3b96b2c9.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/{p-5c50a778.system.entry.js → p-3eb191fd.system.entry.js} +1 -1
  164. package/dist/verdocs-web-sdk/{p-0e5449d1.system.entry.js → p-43d14a05.system.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/p-4f08ceaf.system.js +1 -0
  166. package/dist/verdocs-web-sdk/{p-3abfff14.entry.js → p-5b70ff97.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-79dc4f76.entry.js → p-5c38d5cc.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-6307e6ae.entry.js → p-5dfefab6.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-e3a9d167.system.entry.js → p-5f736f85.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/{p-04d7d759.system.entry.js → p-6653aa42.system.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/{p-0f94d635.entry.js → p-686139a0.entry.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-a310f65b.entry.js → p-75541556.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-3a702f79.entry.js → p-7b3fed68.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/{p-a0b02d83.system.entry.js → p-7c3a05f6.system.entry.js} +1 -1
  175. package/dist/verdocs-web-sdk/p-7cbd2c3a.system.entry.js +1 -0
  176. package/dist/verdocs-web-sdk/p-7d5dbd9a.js +1 -0
  177. package/dist/verdocs-web-sdk/{p-2f04fb38.system.entry.js → p-7d6f7f4b.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/p-80540240.entry.js +1 -0
  179. package/dist/verdocs-web-sdk/{p-17d0e5f4.entry.js → p-82b74dc0.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/{p-ace35be6.entry.js → p-83225bcb.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/p-839f6f0d.js +1 -0
  182. package/dist/verdocs-web-sdk/p-8439bf7b.entry.js +1 -0
  183. package/dist/verdocs-web-sdk/{p-df6a373e.system.entry.js → p-87008226.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-f1257cd0.system.entry.js → p-8a80d243.system.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-609c7fab.system.entry.js → p-8b1b3ffd.system.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-14aefeb2.system.entry.js → p-8e0d6152.system.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-1406ffd2.entry.js → p-8f8504e2.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-01166179.system.entry.js → p-947d60dc.system.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-ee195e5e.entry.js → p-965ec85a.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/p-999fbe79.js +1 -0
  191. package/dist/verdocs-web-sdk/{p-bd0bc3dd.system.entry.js → p-99c10bba.system.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-cf765153.entry.js → p-9aff3ff0.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/{p-a171983b.system.entry.js → p-9b66a84a.system.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-4f439363.entry.js → p-a2531ddc.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/p-a5ce0030.entry.js +1 -0
  196. package/dist/verdocs-web-sdk/{p-3f9fbf94.entry.js → p-a7134b10.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-261d376e.system.entry.js → p-a75490f4.system.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/p-aaf87ce4.system.entry.js +1 -0
  199. package/dist/verdocs-web-sdk/{p-62f090c7.system.entry.js → p-ad0805b6.system.entry.js} +1 -1
  200. package/dist/verdocs-web-sdk/{p-c694cf93.system.js → p-b0bf091c.system.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-7b40bf68.system.entry.js → p-b4238a4c.system.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/{p-5df0fa7a.system.entry.js → p-b8732502.system.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-4a94ee00.system.entry.js → p-b88f9ff5.system.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-39cbfe15.entry.js → p-c37f1a93.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-d735df79.system.entry.js → p-c58916d2.system.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-6bda7dce.entry.js → p-c89bf71d.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-a5425a9b.entry.js → p-cdf1efe7.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-0ad1fd33.entry.js → p-d01e5b64.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-37187046.system.entry.js → p-d5e28045.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-eef694e8.entry.js → p-d841fd4b.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/p-d8cd6b59.system.js +1 -0
  212. package/dist/verdocs-web-sdk/{p-fde6b724.entry.js → p-dab1e29a.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/{p-ecf04564.system.entry.js → p-dceba864.system.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-b17a20b8.entry.js → p-de82e80e.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-50ac71f3.system.entry.js → p-e1dc1460.system.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/p-ed639a7c.entry.js +1 -0
  217. package/dist/verdocs-web-sdk/{p-a35314fe.js → p-ee159b14.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-9b07a2a7.entry.js → p-eea1dd87.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  220. package/dist/verdocs-web-sdk/{p-bb2c866b.system.entry.js → p-f6c3da25.system.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-961708ac.entry.js → p-f80b83e7.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-dd8845d4.system.entry.js → p-f83a0c6e.system.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-8da1555a.entry.js → p-fa0d27b1.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/p-fcd0a40a.system.js +1 -0
  225. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  226. package/package.json +7 -6
  227. package/dist/cjs/interact.min-ba5cc513.js +0 -13
  228. package/dist/esm/Types-de18e225.js +0 -4
  229. package/dist/esm/interact.min-cf83fa88.js +0 -11
  230. package/dist/esm-es5/Types-de18e225.js +0 -1
  231. package/dist/esm-es5/VerdocsEndpoint-b011af25.js +0 -1
  232. package/dist/esm-es5/_commonjsHelpers-5ec8f9b7.js +0 -1
  233. package/dist/esm-es5/interact.min-cf83fa88.js +0 -1
  234. package/dist/verdocs-web-sdk/p-0d28cf05.js +0 -1
  235. package/dist/verdocs-web-sdk/p-15cb963a.system.entry.js +0 -1
  236. package/dist/verdocs-web-sdk/p-30b4bd45.js +0 -1
  237. package/dist/verdocs-web-sdk/p-3305a941.system.js +0 -1
  238. package/dist/verdocs-web-sdk/p-66d66e2b.entry.js +0 -1
  239. package/dist/verdocs-web-sdk/p-70a3a6c1.entry.js +0 -1
  240. package/dist/verdocs-web-sdk/p-7b63017c.js +0 -1
  241. package/dist/verdocs-web-sdk/p-7fd7152d.system.js +0 -1
  242. package/dist/verdocs-web-sdk/p-9934f3ec.system.entry.js +0 -1
  243. package/dist/verdocs-web-sdk/p-b2d698f7.system.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-bbee73c8.system.js +0 -1
  245. package/dist/verdocs-web-sdk/p-bfcf8ad2.entry.js +0 -1
  246. package/dist/verdocs-web-sdk/p-ca807155.entry.js +0 -1
  247. package/dist/verdocs-web-sdk/p-cbbf849f.system.js +0 -1
  248. package/dist/verdocs-web-sdk/p-de60d3a8.js +0 -1
  249. package/dist/verdocs-web-sdk/p-eab67c09.js +0 -1
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-cbbf849f.system.js","./p-7e8d64fb.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-2ccbcfeb.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-4f08ceaf.system.js","./p-7e8d64fb.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-2ccbcfeb.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=o[0]&2?s["return"]:o[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,o[1])).done)return r;if(s=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-05eb4fed.system.js","./p-c694cf93.system.js","./p-bbee73c8.system.js","./p-2ccbcfeb.system.js","./p-54498887.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,n,s,r,o;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){r=e.g},function(e){o=e.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var a='verdocs-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var l=e("verdocs_field_payment",function(){function e(e){t(this,e);this.signatureComplete=i(this,"signatureComplete",7);this.initialComplete=i(this,"initialComplete",7);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this._fields=[];this.signatureFile=null;this.initialFile=null;this.focusOrderNumber=-1;this.focusFieldName="";this.activeElement=null;this.showError={pageNum:-1,fieldIndex:-1,type:null};this.dialogOpened=false;this.closeAllErrors=false;this.fieldsMap={};this.fieldsForCurrentSigner=[];this.fontSize=11;this.averageFontWidth=5;this.requiredFields=[];this.templateid="";this.field=null;this.disabled=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.focused=false;this.signed=false;this.rerender=0;this.preparedMessage=undefined;this.signatureUrl="";this.roleindex=0}e.prototype.componentWillLoad=function(){console.log("sign field",this.field);if(this.recipients&&this.recipients.length>0){var e=this.recipients.find((function(e){return e.type==="preparer"}));console.log("Found preparer",e);if(e){this.preparedMessage="Prepared by ".concat(e["full_name"])}}};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.render=function(){var e,t;var i=o(this.field);var a=(t=(e=this.disabled)!==null&&e!==void 0?e:i.disabled)!==null&&t!==void 0?t:false;console.log("Payment field",i);var l=this.field["rgba"]||r(this.roleindex);return n(s,{class:{focused:this.focused,disabled:a},style:{backgroundColor:l}},n("button",{class:{hide:this.signed}},"$"),this.signed?n("div",{class:"frame"}):n("div",{style:{display:"none"}}),n("img",{width:"100%",height:"100%",src:this.signatureUrl}))};return e}());l.style=a}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=o[0]&2?s["return"]:o[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,o[1])).done)return r;if(s=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-05eb4fed.system.js","./p-b0bf091c.system.js","./p-1ba9f457.system.js","./p-2ccbcfeb.system.js","./p-54498887.system.js","./p-327858f0.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,n,s,r,o;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){r=e.g},function(e){o=e.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var a='verdocs-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var l=e("verdocs_field_payment",function(){function e(e){t(this,e);this.signatureComplete=i(this,"signatureComplete",7);this.initialComplete=i(this,"initialComplete",7);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this._fields=[];this.signatureFile=null;this.initialFile=null;this.focusOrderNumber=-1;this.focusFieldName="";this.activeElement=null;this.showError={pageNum:-1,fieldIndex:-1,type:null};this.dialogOpened=false;this.closeAllErrors=false;this.fieldsMap={};this.fieldsForCurrentSigner=[];this.fontSize=11;this.averageFontWidth=5;this.requiredFields=[];this.templateid="";this.field=null;this.disabled=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.focused=false;this.signed=false;this.rerender=0;this.preparedMessage=undefined;this.signatureUrl="";this.roleindex=0}e.prototype.componentWillLoad=function(){console.log("sign field",this.field);if(this.recipients&&this.recipients.length>0){var e=this.recipients.find((function(e){return e.type==="preparer"}));console.log("Found preparer",e);if(e){this.preparedMessage="Prepared by ".concat(e["full_name"])}}};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.render=function(){var e,t;var i=o(this.field);var a=(t=(e=this.disabled)!==null&&e!==void 0?e:i.disabled)!==null&&t!==void 0?t:false;console.log("Payment field",i);var l=this.field["rgba"]||r(this.roleindex);return n(s,{class:{focused:this.focused,disabled:a},style:{backgroundColor:l}},n("button",{class:{hide:this.signed}},"$"),this.signed?n("div",{class:"frame"}):n("div",{style:{display:"none"}}),n("img",{width:"100%",height:"100%",src:this.signatureUrl}))};return e}());l.style=a}}}));
@@ -1 +1 @@
1
- import{r as i,c as e,h as s,H as t,a as o}from"./p-14b44491.js";import{i as r}from"./p-5e808a0b.js";import{e as l}from"./p-a35314fe.js";import{c as n}from"./p-7c0dcd00.js";import"./p-eab67c09.js";import"./p-5a91bf23.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";const a=({page:i,selected:e,onClick:t})=>{let o;return o="first"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>':"last"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>':String(i+1),s("div",{class:"page-button "+(i===e?"selected":""),onClick:()=>t(i),innerHTML:o})},c=class{constructor(s){i(this,s),this.selectPage=e(this,"selectPage",7),this.selectedPage=0,this.itemCount=1,this.perPage=10}handleSelectPage(i){var e;this.selectedPage=i,null===(e=this.selectPage)||void 0===e||e.emit({selectedPage:i})}render(){const i=Math.max(0,this.selectedPage-2),e=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0,o=r(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+5);return s(t,null,this.selectedPage>0&&s(a,{page:"first",selected:this.selectedPage,onClick:()=>this.handleSelectPage(0)}),i>0&&s("div",{class:"ellipsis"},"..."),o.map((i=>s(a,{page:i,selected:this.selectedPage,onClick:i=>this.handleSelectPage(+i)}))),this.selectedPage<e-1&&s("div",{class:"ellipsis"},"..."),this.selectedPage<e-1&&s(a,{page:"last",selected:this.selectedPage,onClick:()=>this.handleSelectPage(e-1)}))}get el(){return o(this)}};c.style='verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';const d=class{constructor(s){i(this,s),this.optionSelected=e(this,"optionSelected",7),this.clickListenerSymbol=new AbortController,this.options=[],this.label="Filter",this.value="",this.placeholder="Select...",this.open=void 0}componentDidLoad(){this.popper=n(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]}),window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})}disconnectedCallback(){this.clickListenerSymbol.abort()}clickListener(i){i.target!=this.el&&!this.el.contains(i.target)&&this.hide()}handleSelectOption(i,e){i.stopPropagation(),this.optionSelected.emit(e),this.value=e.value,this.hide()}showDropdown(){var i,e;this.open=!0,this.dropdownMenu.setAttribute("data-show",""),this.dropdownMenu.removeAttribute("aria-hidden"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!0}]}))).catch((()=>{})),null===(e=this.popper)||void 0===e||e.update().catch((()=>{}))}handleHideDropdown(i){var e,s;"button"===(null===(e=null==i?void 0:i.target)||void 0===e?void 0:e.localName)&&"arrow"===(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.className)||this.hide()}toggleDropdown(i){i.stopPropagation(),this.open?this.hide():this.showDropdown()}hide(){var i;this.open=!1,this.dropdownMenu.removeAttribute("data-show"),this.dropdownMenu.setAttribute("aria-hidden","true"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!1}]}))).catch((()=>{}))}render(){var i,e,o;const r=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===this.value)),n=null===(e=this.options)||void 0===e?void 0:e.reduce(((i,e)=>i.label.length>e.label.length?i:e)),a=`${l((null==n?void 0:n.label)||"FILLER","14px Inter, Barlow, sans-serif")+l(this.label,"14px Inter, Barlow, sans-serif")+40}px`;return s(t,{class:{open:!!this.open},style:{minWidth:a,display:"inline-block"}},s("div",{class:"control",onClick:i=>this.toggleDropdown(i),onBlur:i=>this.handleHideDropdown(i)},s("div",{class:"title",ref:i=>this.dropdownButton=i},s("span",{class:"prefix"},this.label,":"),r?r.label:this.placeholder),s("div",{style:{flex:"1"}}),s("div",{class:"separator"}),s("div",{class:"arrow",innerHTML:'<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>',"aria-label":"Open Menu"})),s("div",{class:"items","aria-hidden":!this.open,ref:i=>this.dropdownMenu=i,style:{minWidth:a}},null===(o=this.options)||void 0===o?void 0:o.map((i=>i.label?s("button",{onClick:e=>this.handleSelectOption(e,i),class:"option "+(i.value===this.value?"selected":""),disabled:i.disabled},i.label):s("div",{class:"separator"})))))}get el(){return o(this)}};d.style='verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:#4c56cb3f}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';export{c as verdocs_pagination,d as verdocs_quick_filter}
1
+ import{r as i,c as e,h as s,H as t,a as o}from"./p-14b44491.js";import{i as r}from"./p-5e808a0b.js";import{e as l}from"./p-ee159b14.js";import{c as n}from"./p-7c0dcd00.js";import"./p-7d5dbd9a.js";import"./p-5a91bf23.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-839f6f0d.js";import"./p-c220af42.js";const a=({page:i,selected:e,onClick:t})=>{let o;return o="first"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>':"last"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>':String(i+1),s("div",{class:"page-button "+(i===e?"selected":""),onClick:()=>t(i),innerHTML:o})},c=class{constructor(s){i(this,s),this.selectPage=e(this,"selectPage",7),this.selectedPage=0,this.itemCount=1,this.perPage=10}handleSelectPage(i){var e;this.selectedPage=i,null===(e=this.selectPage)||void 0===e||e.emit({selectedPage:i})}render(){const i=Math.max(0,this.selectedPage-2),e=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0,o=r(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+5);return s(t,null,this.selectedPage>0&&s(a,{page:"first",selected:this.selectedPage,onClick:()=>this.handleSelectPage(0)}),i>0&&s("div",{class:"ellipsis"},"..."),o.map((i=>s(a,{page:i,selected:this.selectedPage,onClick:i=>this.handleSelectPage(+i)}))),this.selectedPage<e-1&&s("div",{class:"ellipsis"},"..."),this.selectedPage<e-1&&s(a,{page:"last",selected:this.selectedPage,onClick:()=>this.handleSelectPage(e-1)}))}get el(){return o(this)}};c.style='verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';const d=class{constructor(s){i(this,s),this.optionSelected=e(this,"optionSelected",7),this.clickListenerSymbol=new AbortController,this.options=[],this.label="Filter",this.value="",this.placeholder="Select...",this.open=void 0}componentDidLoad(){this.popper=n(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]}),window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})}disconnectedCallback(){this.clickListenerSymbol.abort()}clickListener(i){i.target!=this.el&&!this.el.contains(i.target)&&this.hide()}handleSelectOption(i,e){i.stopPropagation(),this.optionSelected.emit(e),this.value=e.value,this.hide()}showDropdown(){var i,e;this.open=!0,this.dropdownMenu.setAttribute("data-show",""),this.dropdownMenu.removeAttribute("aria-hidden"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!0}]}))).catch((()=>{})),null===(e=this.popper)||void 0===e||e.update().catch((()=>{}))}handleHideDropdown(i){var e,s;"button"===(null===(e=null==i?void 0:i.target)||void 0===e?void 0:e.localName)&&"arrow"===(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.className)||this.hide()}toggleDropdown(i){i.stopPropagation(),this.open?this.hide():this.showDropdown()}hide(){var i;this.open=!1,this.dropdownMenu.removeAttribute("data-show"),this.dropdownMenu.setAttribute("aria-hidden","true"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!1}]}))).catch((()=>{}))}render(){var i,e,o;const r=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===this.value)),n=null===(e=this.options)||void 0===e?void 0:e.reduce(((i,e)=>i.label.length>e.label.length?i:e)),a=`${l((null==n?void 0:n.label)||"FILLER","14px Inter, Barlow, sans-serif")+l(this.label,"14px Inter, Barlow, sans-serif")+40}px`;return s(t,{class:{open:!!this.open},style:{minWidth:a,display:"inline-block"}},s("div",{class:"control",onClick:i=>this.toggleDropdown(i),onBlur:i=>this.handleHideDropdown(i)},s("div",{class:"title",ref:i=>this.dropdownButton=i},s("span",{class:"prefix"},this.label,":"),r?r.label:this.placeholder),s("div",{style:{flex:"1"}}),s("div",{class:"separator"}),s("div",{class:"arrow",innerHTML:'<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>',"aria-label":"Open Menu"})),s("div",{class:"items","aria-hidden":!this.open,ref:i=>this.dropdownMenu=i,style:{minWidth:a}},null===(o=this.options)||void 0===o?void 0:o.map((i=>i.label?s("button",{onClick:e=>this.handleSelectOption(e,i),class:"option "+(i.value===this.value?"selected":""),disabled:i.disabled},i.label):s("div",{class:"separator"})))))}get el(){return o(this)}};d.style='verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:#4c56cb3f}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';export{c as verdocs_pagination,d as verdocs_quick_filter}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-3305a941.system.js","./p-54498887.system.js","./p-cbbf849f.system.js","./p-b1288daf.system.js","./p-3bcd86ea.system.js","./p-c694cf93.system.js","./p-eb595245.system.js","./p-187b20b7.system.js","./p-05eb4fed.system.js","./p-bbee73c8.system.js","./p-2ccbcfeb.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-dc9c4361.system.js","./p-3af6b910.system.js"],(function(e){"use strict";var t,o,i,n,r,s,a,l,d,c,p,u,h,v,m,f,g,x,b,w,y,E;return{setters:[function(e){t=e.r;o=e.c;i=e.h;n=e.H;r=e.F;s=e.a},function(e){a=e.i},function(){},function(e){l=e.V;d=e.T;c=e.u},function(e){p=e.u;u=e.c},function(e){h=e.i},function(e){v=e.b;m=e.r;f=e.f;g=e.h;x=e.i},function(e){b=e.g;w=e.a},function(e){y=e.S},function(e){E=e.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var k;var q=function(e,t,o){return e.api.post("/templates/".concat(t,"/roles"),o).then((function(e){return e.data}))};var _=function(e,t,o,i){return e.api.put("/templates/".concat(t,"/roles/").concat(o),i).then((function(e){return e.data}))};var R=function(e,t,o){return e.api.delete("/templates/".concat(t,"/roles/").concat(o)).then((function(e){return e.data}))};var C="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var I='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var N='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>';var T='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var H='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var V=[{id:"signature",tooltip:"Signature",icon:Z},{id:"initial",tooltip:"Initials",icon:N},{id:"sep1",tooltip:"",icon:H},{id:"textbox",tooltip:"Text Box",icon:S},{id:"textarea",tooltip:"Text Area",icon:I},{id:"checkbox_group",tooltip:"Check Box",icon:M},{id:"radio_button_group",tooltip:"Radio Button",icon:A},{id:"dropdown",tooltip:"Dropdown",icon:T},{id:"sep2",tooltip:"",icon:H},{id:"date",tooltip:"Date",icon:L},{id:"timestamp",tooltip:"Timestamp",icon:z}];var D=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.pageHeights={};this.store=null;this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,a,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,b(this.endpoint,this.templateId,true)];case 1:a.store=d.sent();console.log("[FIELDS] Loaded template ".concat(this.templateId),this.store.state);this.selectedRoleName=((i=(o=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles)===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.name)||"";console.log("[FIELDS] Starting with role",this.selectedRoleName);return[3,3];case 2:l=d.sent();console.log("[FIELDS] Error with preview session",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new y(l.message,(r=l.response)===null||r===void 0?void 0:r.status,(s=l.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.componentWillUpdate=function(){var e=this;var t,o,i,n,r,s;if(!this.selectedRoleName||!(((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles)||[]).find((function(t){return t.name===e.selectedRoleName}))){this.selectedRoleName=((s=(r=(n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.roles)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){console.log("[FIELDS] handleFieldChange",e,t,o);this.rerender++;return[2]}))}))};e.prototype.handleFieldSettingsChange=function(e,t,o,i,n){var r,s,a,l;console.log("[FIELDS] Field settings changed",t.name,n);Object.assign(t,n);i.field=n;this.selectedRoleName=t.role_name;i.setAttribute("roleindex",v(w(this.store),t.role_name));i.field=(s=(r=this.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.fields.find((function(e){return e.name===t.name}));this.rerender++;i.setAttribute("rerender",this.rerender);(a=this.templateUpdated)===null||a===void 0?void 0:a.emit({endpoint:this.endpoint,template:(l=this.store)===null||l===void 0?void 0:l.state,event:"updated-field"});console.log("[FIELDS] Re-rendering field",t.name,e.pageNumber);this.reRenderField(t,e.pageNumber);var d=m(t,e,o,{disabled:true,editable:true,draggable:true});if(!d){return}};e.prototype.attachFieldAttributes=function(e,t,o,i){var n=this;i.addEventListener("input",(function(e){return n.handleFieldChange(t,e)}));i.addEventListener("settingsChanged",(function(r){return n.handleFieldSettingsChange(e,t,o,i,r.detail.field)}));i.addEventListener("deleted",(function(){var e,o;console.log("[FIELDS] Deleted",n,t);i.remove();n.rerender++;(e=n.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:n.endpoint,template:(o=n.store)===null||o===void 0?void 0:o.state,event:"updated-field"})}));i.setAttribute("templateid",this.templateId);i.setAttribute("roleindex",o);i.setAttribute("pageNumber",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var o;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var n=(o=this.store)===null||o===void 0?void 0:o.state.fields.filter((function(e){return e.page_sequence===i.pageNumber}));n.forEach((function(e){return t.reRenderField(e,i.pageNumber)}))};e.prototype.reRenderField=function(e,t){var o=this;var i=this.cachedPageInfo[t];var n=v(w(this.store),e.role_name);var r=m(e,i,n,{disabled:true,editable:true,draggable:true});if(!r){return}if(Array.isArray(r)){r.forEach((function(t){o.attachFieldAttributes(i,e,n,t);o.makeDraggable(t)}))}else{this.attachFieldAttributes(i,e,n,r);this.makeDraggable(r)}};e.prototype.makeDraggable=function(e){a(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,n,r,s;return __generator(this,(function(a){t=+(e.target.getAttribute("posX")||0);o=+(e.target.getAttribute("posY")||0);i=+(e.target.getAttribute("xScale")||1);n=+(e.target.getAttribute("yScale")||1);r=e.dx/i+t;s=e.dy/n+o;e.target.setAttribute("posX",r);e.target.setAttribute("posy",s);f(e.target,"translate","".concat(r,"px, ").concat(s,"px"));return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,n,r,s,a,l,d,c,u,h,m,f,g,x,b,y,E,k,q,_,R,C;return __generator(this,(function(S){switch(S.label){case 0:o=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[o],n=i.naturalWidth,r=n===void 0?612:n,s=i.naturalHeight,a=s===void 0?792:s,l=i.renderedHeight,d=l===void 0?792:l;c=e.target.getBoundingClientRect();u=e.target.parentElement;h=u.getBoundingClientRect();m=Math.max(c.left-h.left,0);f=Math.max(d-(h.bottom-c.bottom),0);g=this.viewCoordinatesToPageCoordinates(m,f,o,r-e.rect.width,a-e.rect.height),x=g.x,b=g.y;y=e.target.getAttribute("name");E=+(e.target.getAttribute("option")||"0");k=(t=this.store)===null||t===void 0?void 0:t.state.fields.find((function(e){return e.name===y}));if(!k)return[3,2];switch(k.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":k.setting.x=x;k.setting.y=b;break;case"checkbox_group":case"radio_button_group":{q=k.setting.options[E];if(q){q.x=x;q.y=b}}break}console.log("[FIELDS] Will update",y,E,k);return[4,p(this.endpoint,this.templateId,y,k)];case 1:_=S.sent();R=this.cachedPageInfo[o];C=v(w(this.store),k.role_name);this.handleFieldSettingsChange(R,k,C,e.target,_);e.target.removeAttribute("posX");e.target.removeAttribute("posY");S.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var o;var i=1;var n;do{n="".concat(e,"P").concat(t,"-").concat(i);i++}while((o=this.store)===null||o===void 0?void 0:o.state.fields.some((function(e){return e.name===n})));return n};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,o,i,n){var r=this.cachedPageInfo[o],s=r.xScale,a=s===void 0?1:s,l=r.yScale,d=l===void 0?1:l,c=r.renderedHeight,p=c===void 0?792:c;var u=Math.floor(Math.min(e/a,i));var h=Math.floor(Math.min(Math.max(p-t,0)/d,n));return{x:u,y:h}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var o,i,n,r,s,a,l,d,c,p,h,v,m,f,b,w,y;return __generator(this,(function(E){switch(E.label){case 0:if(!this.placing)return[3,2];r=e.offsetX;s=e.offsetY;a=g(this.placing);l=x(this.placing);d=this.cachedPageInfo[t];c=d.naturalWidth,p=c===void 0?612:c,h=d.naturalHeight,v=h===void 0?792:h;m=this.viewCoordinatesToPageCoordinates(r,s,t,p-a,v-l);f=Math.floor(m.x);b=Math.floor(m.y);w={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:d.documentId,type:this.placing,required:true,page_sequence:t,validator:null,setting:{x:f,y:b},x:f,y:b,tabindex:0,width:a,height:l};switch(w.type){case"attachment":case"payment":w.setting={x:f,y:b};break;case"initial":case"signature":w.setting={x:f,y:b,result:""};break;case"checkbox_group":w.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(w.name,"-1"),value:"Option 1",checked:false,x:f,y:b}]};break;case"date":w.setting={x:f,y:b,width:a,height:l,result:""};break;case"dropdown":w.required=false;w.setting={x:f,y:b,width:a,height:l,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":w.setting={options:[{id:"".concat(w.name,"-1"),value:"Option 1",selected:false,x:f,y:b}]};break;case"textarea":case"textbox":w.setting={x:f,y:b,width:a,height:l,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":w.setting={x:f,y:b,width:a,height:l};break}if(w.type==="textarea"){w.setting.leading=16;w.type="textbox"}return[4,u(this.endpoint,this.templateId,w)];case 1:y=E.sent();console.log("Saved field",y);if(this.store.state){this.store.state.fields=__spreadArray(__spreadArray([],(o=this.store)===null||o===void 0?void 0:o.state.fields,true),[y],false)}this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:(n=this.store)===null||n===void 0?void 0:n.state,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[t]});E.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var o,r,s,a,l,d,c,p;console.log("[FIELDS] Rendering",this.selectedRoleName);if(!this.endpoint.session){return i(n,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((o=this.store)===null||o===void 0?void 0:o.state.isLoaded)){return i(n,null,i("verdocs-loader",null))}var u=(s=(r=this.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.roles.map((function(e){return{value:e.name,label:e.name}}));return i(n,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},i("div",{id:"verdocs-template-fields-toolbar"},i("div",{class:"add-for"},"Add field:"),i("verdocs-select-input",{value:this.selectedRoleName,options:u,onInput:function(e){return t.selectedRoleName=e.target.value}}),V.map((function(e){return i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){if(t.selectedRoleName){t.placing=e.id}else{t.showMustSelectRole=true}}}})}))),i("div",{class:"pages"},(((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.template_documents)||[]).map((function(e){var o=h(1,e.page_numbers);return o.map((function(o){return i("verdocs-template-document-page",{templateId:t.templateId,documentId:e.id,pageNumber:o,virtualWidth:612,virtualHeight:792,onClick:function(e){return t.handleClickPage(e,o)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))}))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.roles)===null||p===void 0?void 0:p.length)>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:function(){return t.showMustSelectRole=false}}))};return e}());D.style=C;var O='verdocs-template-role-properties{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var P='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var F=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.delete=o(this,"delete",7);this.sdkError=o(this,"sdkError",7);this.store=null;this.endpoint=l.getDefault();this.templateId="";this.roleName="";this.sender=d.EVERYONE;this.dirty=false;this.saving=false;this.name="";this.type="signer";this.fullName="";this.email="";this.phone="";this.allowDelegation=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLE_PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,b(this.endpoint,this.templateId,false)];case 1:r.store=d.sent();s=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.find((function(e){return e.name===l.roleName}));if(s){this.name=s.name;this.type=s.type;this.fullName=s.full_name;this.email=s.email;this.phone=s.phone;this.allowDelegation=s.delegator;console.log("[ROLES] Editing role",s)}return[3,3];case 2:a=d.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new y(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.name=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.name;this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();this.saving=true;_(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:console.log("[ROLE_PROPERTIES] Update result",e);this.saving=false;this.dirty=false;o=this;return[4,b(this.endpoint,this.templateId,true)];case 1:o.store=i.sent();(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}}))}))})).catch((function(e){console.log("Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){R(this.endpoint,this.templateId,this.roleName).then((function(e){var o;console.log("Role deleted",e);t.store.state.roles=__spreadArray([],t.store.state.roles.filter((function(e){return e.name!==t.roleName})),true);(o=t.delete)===null||o===void 0?void 0:o.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t=(this.store.state.fields||[]).findIndex((function(t){return t.role_name===e.roleName}))!==-1;return i(n,null,i("div",{class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},i("div",{class:"dialog"},i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",disabled:t,helpText:t?"This role has fields assigned and can no longer be renamed.":"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),i("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:function(t){e.fullName=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:function(t){e.allowDelegation=t.target.checked;e.dirty=true}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:P}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());F.style=O;var B='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';var j=(k={},k[d.EVERYONE]="Everyone",k[d.EVERYONE_AS_CREATOR]="Everyone as Me",k[d.ORGANIZATION_MEMBER]="Organization member",k[d.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",k[d.CREATOR]="Me",k);var U='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var Q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var Y='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var W='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var G='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var X='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var K='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var J='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var $=e("verdocs_template_roles",function(){function e(e){t(this,e);this.next=o(this,"next",7);this.exit=o(this,"exit",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.sequences=[];this.store=null;this.endpoint=l.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}return[4,this.reloadStore()];case 1:n.sent();return[3,3];case 2:i=n.sent();console.log("[FIELDS] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new y(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(o=i.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.reloadStore=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,b(this.endpoint,this.templateId,true)];case 1:e.store=t.sent();this.sortTemplateRoles();this.renumberTemplateRoles();return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var o=+(t.target.getAttribute("posX")||0);var i=+(t.target.getAttribute("posY")||0);var n=t.dx+o;var r=t.dy+i;t.target.setAttribute("posX",n);t.target.setAttribute("posy",r);t.target.style.transform="translate(".concat(n+100,"px, ").concat(r-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});a(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var o=this;var i,n,r,s,a;t.target.classList.remove("active");var l=t.relatedTarget.dataset.rolename;var d=+t.target.dataset.sequence;var c=+t.target.dataset.order;var p=(r=(n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.roles)===null||r===void 0?void 0:r.find((function(e){return e.name===l}));if(p){p.sequence=d;p.order=c;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all((a=(s=this.store)===null||s===void 0?void 0:s.state)===null||a===void 0?void 0:a.roles.map((function(e){return _(o.endpoint,o.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){var e,t;console.log("[ROLES] Updated roles");(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({event:"updated-role",endpoint:o.endpoint,template:(t=o.store)===null||t===void 0?void 0:t.state});o.reloadStore().catch((function(e){return console.log("Unknown error",e)}))})).catch((function(e){return console.log("[ROLES] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()};e.prototype.handleSubmit=function(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()};e.prototype.sortTemplateRoles=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;var t,o;this.sequences=[];(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){var e=this;this.extractSequenceNumbers();var t=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(o,i){var n,r;(r=(n=e.store)===null||n===void 0?void 0:n.state)===null||r===void 0?void 0:r.roles.filter((function(e){return e.sequence===o})).forEach((function(e,o){if(!t.includes(e.name)){e.sequence=i+1;e.order=o+1;t.push(e.name)}}))}));this.extractSequenceNumbers()};e.prototype.getNextRoleName=function(){var e,t,o,i;var n="";var r=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.length;do{r++;n="Recipient ".concat(r)}while(!n||((i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.roles.some((function(e){return e.name===n}))));return n};e.prototype.callCreateRole=function(e,t,o){var i=this;console.log("[ROLES] Will create role",{name:e,sequence:t,order:o});q(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:o,full_name:"",email:"",phone:"",type:"signer",delegator:false}).then((function(e){return __awaiter(i,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(n){switch(n.label){case 0:console.log("[ROLES] Created role",e);i=this;return[4,b(this.endpoint,this.templateId,true)];case 1:i.store=n.sent();this.sortTemplateRoles();this.renumberTemplateRoles();(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({event:"created-role",endpoint:this.endpoint,template:(o=this.store)===null||o===void 0?void 0:o.state});this.reloadStore().catch((function(e){return console.log("Unknown error",e)}));return[2]}}))}))})).catch((function(e){console.log("[ROLES] Error creating role",e)}))};e.prototype.handleAddRole=function(e,t){var o;e.stopPropagation();var i=((o=this.store)===null||o===void 0?void 0:o.state.roles.filter((function(e){return e.sequence===t})).length)+1;var n=this.getNextRoleName();this.callCreateRole(n,t,i)};e.prototype.handleAddStep=function(e,t){e.stopPropagation();var o=1;var i=this.getNextRoleName();this.callCreateRole(i,t,o)};e.prototype.render=function(){var e=this;var t,o,s,a,l,d;console.log("[ROLES] Rendering");if(!this.endpoint.session){return i(n,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((t=this.store)===null||t===void 0?void 0:t.state.isLoaded)){return i(n,{class:"loading"},i("verdocs-loader",null))}var c=(((s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.roles)||[]).map((function(e){return e.name}));return i(n,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":(a=this.store.state)===null||a===void 0?void 0:a.updateCount},i("h5",null,"Roles and Workflow"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("div",{class:"icon",innerHTML:Q}),i("div",{class:"row-roles"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",j[(d=(l=this.store)===null||l===void 0?void 0:l.state)===null||d===void 0?void 0:d.sender]," ",i("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:G}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(t){var o,n;return i(r,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:Y}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-order":.5,"data-sequence":t}),(n=(o=e.store)===null||o===void 0?void 0:o.state)===null||n===void 0?void 0:n.roles.filter((function(e){return e.sequence===t})).map((function(o){var n=!o.email;return n?i(r,null,i("div",{class:"recipient",style:{backgroundColor:E(v(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?X:o.type==="cc"?J:K}),o.name," ",i("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t})):i(r,null,i("div",{class:"recipient",style:{borderColor:E(v(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?X:o.type==="cc"?J:K}),o.full_name," ",i("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t}))})),i("button",{class:"add-role",innerHTML:G,onClick:function(o){return e.handleAddRole(o,t)}}))),e.sequences.length>0&&i("div",{class:"row add-sequence","data-sequence":t},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:G}),i("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step"))))})),i("div",{class:"row","data-sequence":this.sequences.length+1},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:G}),i("button",{class:"add-step",innerHTML:G,onClick:function(t){return e.handleAddStep(t,e.sequences.length+1)}}))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:W}),i("div",{class:"row-roles"},i("div",{class:"complete"},"Document Complete")))),c.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:G})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(){return e.handleCancel()}}),i("verdocs-button",{label:"OK",size:"small",onClick:function(){return e.handleSubmit()},disabled:c.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null},onDelete:function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:return[4,b(this.endpoint,this.templateId,true)];case 1:o.sent();this.renumberTemplateRoles();this.showingRoleDialog=null;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({event:"deleted-role",endpoint:this.endpoint,template:(t=this.store)===null||t===void 0?void 0:t.state});this.reloadStore().catch((function(e){return console.log("Unknown error",e)}));return[2]}}))}))}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());$.style=B;var ee='verdocs-template-sender{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var te=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.store=null;this.endpoint=l.getDefault();this.templateId="";this.sender=d.EVERYONE;this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SENDER] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,b(this.endpoint,this.templateId,false)];case 1:r.store=a.sent();this.sender=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.sender;return[3,3];case 2:s=a.sent();console.log("[SENDER] Error with preview session",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new y(s.message,(i=s.response)===null||i===void 0?void 0:i.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){this.saving=true;c(this.endpoint,this.templateId,{sender:e}).then((function(o){var i;console.log("Update result",o);if((i=t.store)===null||i===void 0?void 0:i.state){t.store.state.sender=e}t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return i(n,null,i("div",{class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.EVERYONE,checked:this.sender===d.EVERYONE,onInput:function(){return e.handleSelectSetting(d.EVERYONE)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.EVERYONE_AS_CREATOR,checked:this.sender===d.EVERYONE_AS_CREATOR,onInput:function(){return e.handleSelectSetting(d.EVERYONE_AS_CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.ORGANIZATION_MEMBER,checked:this.sender===d.ORGANIZATION_MEMBER,onInput:function(){return e.handleSelectSetting(d.ORGANIZATION_MEMBER)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===d.ORGANIZATION_MEMBER_AS_CREATOR,onInput:function(){return e.handleSelectSetting(d.ORGANIZATION_MEMBER_AS_CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.CREATOR,checked:this.sender===d.CREATOR,onInput:function(){return e.handleSelectSetting(d.CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());te.style=ee}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-fcd0a40a.system.js","./p-54498887.system.js","./p-4f08ceaf.system.js","./p-b1288daf.system.js","./p-3bcd86ea.system.js","./p-b0bf091c.system.js","./p-0ffb2c57.system.js","./p-187b20b7.system.js","./p-05eb4fed.system.js","./p-1ba9f457.system.js","./p-2ccbcfeb.system.js","./p-327858f0.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js","./p-3af6b910.system.js"],(function(e){"use strict";var t,o,i,n,r,s,a,l,d,c,p,u,h,v,m,f,g,x,b,w,y,E;return{setters:[function(e){t=e.r;o=e.c;i=e.h;n=e.H;r=e.F;s=e.a},function(e){a=e.i},function(){},function(e){l=e.V;d=e.T;c=e.u},function(e){p=e.u;u=e.c},function(e){h=e.i},function(e){v=e.b;m=e.r;f=e.f;g=e.h;x=e.i},function(e){b=e.g;w=e.a},function(e){y=e.S},function(e){E=e.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var k;var q=function(e,t,o){return e.api.post("/templates/".concat(t,"/roles"),o).then((function(e){return e.data}))};var _=function(e,t,o,i){return e.api.put("/templates/".concat(t,"/roles/").concat(o),i).then((function(e){return e.data}))};var R=function(e,t,o){return e.api.delete("/templates/".concat(t,"/roles/").concat(o)).then((function(e){return e.data}))};var C="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var I='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var N='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>';var T='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var H='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var V=[{id:"signature",tooltip:"Signature",icon:Z},{id:"initial",tooltip:"Initials",icon:N},{id:"sep1",tooltip:"",icon:H},{id:"textbox",tooltip:"Text Box",icon:S},{id:"textarea",tooltip:"Text Area",icon:I},{id:"checkbox_group",tooltip:"Check Box",icon:M},{id:"radio_button_group",tooltip:"Radio Button",icon:A},{id:"dropdown",tooltip:"Dropdown",icon:T},{id:"sep2",tooltip:"",icon:H},{id:"date",tooltip:"Date",icon:L},{id:"timestamp",tooltip:"Timestamp",icon:z}];var D=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.pageHeights={};this.store=null;this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,a,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,b(this.endpoint,this.templateId,true)];case 1:a.store=d.sent();console.log("[FIELDS] Loaded template ".concat(this.templateId),this.store.state);this.selectedRoleName=((i=(o=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles)===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.name)||"";console.log("[FIELDS] Starting with role",this.selectedRoleName);return[3,3];case 2:l=d.sent();console.log("[FIELDS] Error with preview session",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new y(l.message,(r=l.response)===null||r===void 0?void 0:r.status,(s=l.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.componentWillUpdate=function(){var e=this;var t,o,i,n,r,s;if(!this.selectedRoleName||!(((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles)||[]).find((function(t){return t.name===e.selectedRoleName}))){this.selectedRoleName=((s=(r=(n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.roles)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){console.log("[FIELDS] handleFieldChange",e,t,o);this.rerender++;return[2]}))}))};e.prototype.handleFieldSettingsChange=function(e,t,o,i,n){var r,s,a,l;console.log("[FIELDS] Field settings changed",t.name,n);Object.assign(t,n);i.field=n;this.selectedRoleName=t.role_name;i.setAttribute("roleindex",v(w(this.store),t.role_name));i.field=(s=(r=this.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.fields.find((function(e){return e.name===t.name}));this.rerender++;i.setAttribute("rerender",this.rerender);(a=this.templateUpdated)===null||a===void 0?void 0:a.emit({endpoint:this.endpoint,template:(l=this.store)===null||l===void 0?void 0:l.state,event:"updated-field"});console.log("[FIELDS] Re-rendering field",t.name,e.pageNumber);this.reRenderField(t,e.pageNumber);var d=m(t,e,o,{disabled:true,editable:true,draggable:true});if(!d){return}};e.prototype.attachFieldAttributes=function(e,t,o,i){var n=this;i.addEventListener("input",(function(e){return n.handleFieldChange(t,e)}));i.addEventListener("settingsChanged",(function(r){return n.handleFieldSettingsChange(e,t,o,i,r.detail.field)}));i.addEventListener("deleted",(function(){var e,o;console.log("[FIELDS] Deleted",n,t);i.remove();n.rerender++;(e=n.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:n.endpoint,template:(o=n.store)===null||o===void 0?void 0:o.state,event:"updated-field"})}));i.setAttribute("templateid",this.templateId);i.setAttribute("roleindex",o);i.setAttribute("pageNumber",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var o;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var n=(o=this.store)===null||o===void 0?void 0:o.state.fields.filter((function(e){return e.page_sequence===i.pageNumber}));n.forEach((function(e){return t.reRenderField(e,i.pageNumber)}))};e.prototype.reRenderField=function(e,t){var o=this;var i=this.cachedPageInfo[t];var n=v(w(this.store),e.role_name);var r=m(e,i,n,{disabled:true,editable:true,draggable:true});if(!r){return}if(Array.isArray(r)){r.forEach((function(t){o.attachFieldAttributes(i,e,n,t);o.makeDraggable(t)}))}else{this.attachFieldAttributes(i,e,n,r);this.makeDraggable(r)}};e.prototype.makeDraggable=function(e){a(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,n,r,s;return __generator(this,(function(a){t=+(e.target.getAttribute("posX")||0);o=+(e.target.getAttribute("posY")||0);i=+(e.target.getAttribute("xScale")||1);n=+(e.target.getAttribute("yScale")||1);r=e.dx/i+t;s=e.dy/n+o;e.target.setAttribute("posX",r);e.target.setAttribute("posy",s);f(e.target,"translate","".concat(r,"px, ").concat(s,"px"));return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,n,r,s,a,l,d,c,u,h,m,f,g,x,b,y,E,k,q,_,R,C;return __generator(this,(function(S){switch(S.label){case 0:o=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[o],n=i.naturalWidth,r=n===void 0?612:n,s=i.naturalHeight,a=s===void 0?792:s,l=i.renderedHeight,d=l===void 0?792:l;c=e.target.getBoundingClientRect();u=e.target.parentElement;h=u.getBoundingClientRect();m=Math.max(c.left-h.left,0);f=Math.max(d-(h.bottom-c.bottom),0);g=this.viewCoordinatesToPageCoordinates(m,f,o,r-e.rect.width,a-e.rect.height),x=g.x,b=g.y;y=e.target.getAttribute("name");E=+(e.target.getAttribute("option")||"0");k=(t=this.store)===null||t===void 0?void 0:t.state.fields.find((function(e){return e.name===y}));if(!k)return[3,2];switch(k.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":k.setting.x=x;k.setting.y=b;break;case"checkbox_group":case"radio_button_group":{q=k.setting.options[E];if(q){q.x=x;q.y=b}}break}console.log("[FIELDS] Will update",y,E,k);return[4,p(this.endpoint,this.templateId,y,k)];case 1:_=S.sent();R=this.cachedPageInfo[o];C=v(w(this.store),k.role_name);this.handleFieldSettingsChange(R,k,C,e.target,_);e.target.removeAttribute("posX");e.target.removeAttribute("posY");S.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var o;var i=1;var n;do{n="".concat(e,"P").concat(t,"-").concat(i);i++}while((o=this.store)===null||o===void 0?void 0:o.state.fields.some((function(e){return e.name===n})));return n};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,o,i,n){var r=this.cachedPageInfo[o],s=r.xScale,a=s===void 0?1:s,l=r.yScale,d=l===void 0?1:l,c=r.renderedHeight,p=c===void 0?792:c;var u=Math.floor(Math.min(e/a,i));var h=Math.floor(Math.min(Math.max(p-t,0)/d,n));return{x:u,y:h}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var o,i,n,r,s,a,l,d,c,p,h,v,m,f,b,w,y;return __generator(this,(function(E){switch(E.label){case 0:if(!this.placing)return[3,2];r=e.offsetX;s=e.offsetY;a=g(this.placing);l=x(this.placing);d=this.cachedPageInfo[t];c=d.naturalWidth,p=c===void 0?612:c,h=d.naturalHeight,v=h===void 0?792:h;m=this.viewCoordinatesToPageCoordinates(r,s,t,p-a,v-l);f=Math.floor(m.x);b=Math.floor(m.y);w={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:d.documentId,type:this.placing,required:true,page_sequence:t,validator:null,setting:{x:f,y:b},x:f,y:b,tabindex:0,width:a,height:l};switch(w.type){case"attachment":case"payment":w.setting={x:f,y:b};break;case"initial":case"signature":w.setting={x:f,y:b,result:""};break;case"checkbox_group":w.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(w.name,"-1"),value:"Option 1",checked:false,x:f,y:b}]};break;case"date":w.setting={x:f,y:b,width:a,height:l,result:""};break;case"dropdown":w.required=false;w.setting={x:f,y:b,width:a,height:l,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":w.setting={options:[{id:"".concat(w.name,"-1"),value:"Option 1",selected:false,x:f,y:b}]};break;case"textarea":case"textbox":w.setting={x:f,y:b,width:a,height:l,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":w.setting={x:f,y:b,width:a,height:l};break}if(w.type==="textarea"){w.setting.leading=16;w.type="textbox"}return[4,u(this.endpoint,this.templateId,w)];case 1:y=E.sent();console.log("Saved field",y);if(this.store.state){this.store.state.fields=__spreadArray(__spreadArray([],(o=this.store)===null||o===void 0?void 0:o.state.fields,true),[y],false)}this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:(n=this.store)===null||n===void 0?void 0:n.state,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[t]});E.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var o,r,s,a,l,d,c,p;console.log("[FIELDS] Rendering",this.selectedRoleName);if(!this.endpoint.session){return i(n,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((o=this.store)===null||o===void 0?void 0:o.state.isLoaded)){return i(n,null,i("verdocs-loader",null))}var u=(s=(r=this.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.roles.map((function(e){return{value:e.name,label:e.name}}));return i(n,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},i("div",{id:"verdocs-template-fields-toolbar"},i("div",{class:"add-for"},"Add field:"),i("verdocs-select-input",{value:this.selectedRoleName,options:u,onInput:function(e){return t.selectedRoleName=e.target.value}}),V.map((function(e){return i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){if(t.selectedRoleName){t.placing=e.id}else{t.showMustSelectRole=true}}}})}))),i("div",{class:"pages"},(((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.template_documents)||[]).map((function(e){var o=h(1,e.page_numbers);return o.map((function(o){return i("verdocs-template-document-page",{templateId:t.templateId,documentId:e.id,pageNumber:o,virtualWidth:612,virtualHeight:792,onClick:function(e){return t.handleClickPage(e,o)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))}))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.roles)===null||p===void 0?void 0:p.length)>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:function(){return t.showMustSelectRole=false}}))};return e}());D.style=C;var O='verdocs-template-role-properties{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var P='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var F=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.delete=o(this,"delete",7);this.sdkError=o(this,"sdkError",7);this.store=null;this.endpoint=l.getDefault();this.templateId="";this.roleName="";this.sender=d.EVERYONE;this.dirty=false;this.saving=false;this.name="";this.type="signer";this.fullName="";this.email="";this.phone="";this.allowDelegation=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLE_PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,b(this.endpoint,this.templateId,false)];case 1:r.store=d.sent();s=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.find((function(e){return e.name===l.roleName}));if(s){this.name=s.name;this.type=s.type;this.fullName=s.full_name;this.email=s.email;this.phone=s.phone;this.allowDelegation=s.delegator;console.log("[ROLES] Editing role",s)}return[3,3];case 2:a=d.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new y(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.name=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.name;this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();this.saving=true;_(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:console.log("[ROLE_PROPERTIES] Update result",e);this.saving=false;this.dirty=false;o=this;return[4,b(this.endpoint,this.templateId,true)];case 1:o.store=i.sent();(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}}))}))})).catch((function(e){console.log("Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){R(this.endpoint,this.templateId,this.roleName).then((function(e){var o;console.log("Role deleted",e);t.store.state.roles=__spreadArray([],t.store.state.roles.filter((function(e){return e.name!==t.roleName})),true);(o=t.delete)===null||o===void 0?void 0:o.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t=(this.store.state.fields||[]).findIndex((function(t){return t.role_name===e.roleName}))!==-1;return i(n,null,i("div",{class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},i("div",{class:"dialog"},i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",disabled:t,helpText:t?"This role has fields assigned and can no longer be renamed.":"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),i("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:function(t){e.fullName=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),i("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:function(t){e.allowDelegation=t.target.checked;e.dirty=true}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:P}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());F.style=O;var B='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';var j=(k={},k[d.EVERYONE]="Everyone",k[d.EVERYONE_AS_CREATOR]="Everyone as Me",k[d.ORGANIZATION_MEMBER]="Organization member",k[d.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",k[d.CREATOR]="Me",k);var U='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var Q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var Y='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var W='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var G='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var X='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var K='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var J='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var $=e("verdocs_template_roles",function(){function e(e){t(this,e);this.next=o(this,"next",7);this.exit=o(this,"exit",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.sequences=[];this.store=null;this.endpoint=l.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}return[4,this.reloadStore()];case 1:n.sent();return[3,3];case 2:i=n.sent();console.log("[FIELDS] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new y(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(o=i.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.reloadStore=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,b(this.endpoint,this.templateId,true)];case 1:e.store=t.sent();this.sortTemplateRoles();this.renumberTemplateRoles();return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var o=+(t.target.getAttribute("posX")||0);var i=+(t.target.getAttribute("posY")||0);var n=t.dx+o;var r=t.dy+i;t.target.setAttribute("posX",n);t.target.setAttribute("posy",r);t.target.style.transform="translate(".concat(n+100,"px, ").concat(r-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});a(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var o=this;var i,n,r,s,a;t.target.classList.remove("active");var l=t.relatedTarget.dataset.rolename;var d=+t.target.dataset.sequence;var c=+t.target.dataset.order;var p=(r=(n=(i=this.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.roles)===null||r===void 0?void 0:r.find((function(e){return e.name===l}));if(p){p.sequence=d;p.order=c;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all((a=(s=this.store)===null||s===void 0?void 0:s.state)===null||a===void 0?void 0:a.roles.map((function(e){return _(o.endpoint,o.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){var e,t;console.log("[ROLES] Updated roles");(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({event:"updated-role",endpoint:o.endpoint,template:(t=o.store)===null||t===void 0?void 0:t.state});o.reloadStore().catch((function(e){return console.log("Unknown error",e)}))})).catch((function(e){return console.log("[ROLES] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()};e.prototype.handleSubmit=function(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()};e.prototype.sortTemplateRoles=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;var t,o;this.sequences=[];(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){var e=this;this.extractSequenceNumbers();var t=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(o,i){var n,r;(r=(n=e.store)===null||n===void 0?void 0:n.state)===null||r===void 0?void 0:r.roles.filter((function(e){return e.sequence===o})).forEach((function(e,o){if(!t.includes(e.name)){e.sequence=i+1;e.order=o+1;t.push(e.name)}}))}));this.extractSequenceNumbers()};e.prototype.getNextRoleName=function(){var e,t,o,i;var n="";var r=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.length;do{r++;n="Recipient ".concat(r)}while(!n||((i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.roles.some((function(e){return e.name===n}))));return n};e.prototype.callCreateRole=function(e,t,o){var i=this;console.log("[ROLES] Will create role",{name:e,sequence:t,order:o});q(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:o,full_name:"",email:"",phone:"",type:"signer",delegator:false}).then((function(e){return __awaiter(i,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(n){switch(n.label){case 0:console.log("[ROLES] Created role",e);i=this;return[4,b(this.endpoint,this.templateId,true)];case 1:i.store=n.sent();this.sortTemplateRoles();this.renumberTemplateRoles();(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({event:"created-role",endpoint:this.endpoint,template:(o=this.store)===null||o===void 0?void 0:o.state});this.reloadStore().catch((function(e){return console.log("Unknown error",e)}));return[2]}}))}))})).catch((function(e){console.log("[ROLES] Error creating role",e)}))};e.prototype.handleAddRole=function(e,t){var o;e.stopPropagation();var i=((o=this.store)===null||o===void 0?void 0:o.state.roles.filter((function(e){return e.sequence===t})).length)+1;var n=this.getNextRoleName();this.callCreateRole(n,t,i)};e.prototype.handleAddStep=function(e,t){e.stopPropagation();var o=1;var i=this.getNextRoleName();this.callCreateRole(i,t,o)};e.prototype.render=function(){var e=this;var t,o,s,a,l,d;console.log("[ROLES] Rendering");if(!this.endpoint.session){return i(n,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((t=this.store)===null||t===void 0?void 0:t.state.isLoaded)){return i(n,{class:"loading"},i("verdocs-loader",null))}var c=(((s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.roles)||[]).map((function(e){return e.name}));return i(n,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":(a=this.store.state)===null||a===void 0?void 0:a.updateCount},i("h5",null,"Roles and Workflow"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("div",{class:"icon",innerHTML:Q}),i("div",{class:"row-roles"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",j[(d=(l=this.store)===null||l===void 0?void 0:l.state)===null||d===void 0?void 0:d.sender]," ",i("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:G}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(t){var o,n;return i(r,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:Y}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-order":.5,"data-sequence":t}),(n=(o=e.store)===null||o===void 0?void 0:o.state)===null||n===void 0?void 0:n.roles.filter((function(e){return e.sequence===t})).map((function(o){var n=!o.email;return n?i(r,null,i("div",{class:"recipient",style:{backgroundColor:E(v(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?X:o.type==="cc"?J:K}),o.name," ",i("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t})):i(r,null,i("div",{class:"recipient",style:{borderColor:E(v(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?X:o.type==="cc"?J:K}),o.full_name," ",i("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t}))})),i("button",{class:"add-role",innerHTML:G,onClick:function(o){return e.handleAddRole(o,t)}}))),e.sequences.length>0&&i("div",{class:"row add-sequence","data-sequence":t},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:G}),i("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step"))))})),i("div",{class:"row","data-sequence":this.sequences.length+1},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:G}),i("button",{class:"add-step",innerHTML:G,onClick:function(t){return e.handleAddStep(t,e.sequences.length+1)}}))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:W}),i("div",{class:"row-roles"},i("div",{class:"complete"},"Document Complete")))),c.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:G})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(){return e.handleCancel()}}),i("verdocs-button",{label:"OK",size:"small",onClick:function(){return e.handleSubmit()},disabled:c.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null},onDelete:function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:return[4,b(this.endpoint,this.templateId,true)];case 1:o.sent();this.renumberTemplateRoles();this.showingRoleDialog=null;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({event:"deleted-role",endpoint:this.endpoint,template:(t=this.store)===null||t===void 0?void 0:t.state});this.reloadStore().catch((function(e){return console.log("Unknown error",e)}));return[2]}}))}))}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());$.style=B;var ee='verdocs-template-sender{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var te=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.store=null;this.endpoint=l.getDefault();this.templateId="";this.sender=d.EVERYONE;this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SENDER] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,b(this.endpoint,this.templateId,false)];case 1:r.store=a.sent();this.sender=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.sender;return[3,3];case 2:s=a.sent();console.log("[SENDER] Error with preview session",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new y(s.message,(i=s.response)===null||i===void 0?void 0:i.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){this.saving=true;c(this.endpoint,this.templateId,{sender:e}).then((function(o){var i;console.log("Update result",o);if((i=t.store)===null||i===void 0?void 0:i.state){t.store.state.sender=e}t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return i(n,null,i("div",{class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.EVERYONE,checked:this.sender===d.EVERYONE,onInput:function(){return e.handleSelectSetting(d.EVERYONE)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.EVERYONE_AS_CREATOR,checked:this.sender===d.EVERYONE_AS_CREATOR,onInput:function(){return e.handleSelectSetting(d.EVERYONE_AS_CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.ORGANIZATION_MEMBER,checked:this.sender===d.ORGANIZATION_MEMBER,onInput:function(){return e.handleSelectSetting(d.ORGANIZATION_MEMBER)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===d.ORGANIZATION_MEMBER_AS_CREATOR,onInput:function(){return e.handleSelectSetting(d.ORGANIZATION_MEMBER_AS_CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:d.CREATOR,checked:this.sender===d.CREATOR,onInput:function(){return e.handleSelectSetting(d.CREATOR)}}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());te.style=ee}}}));
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as s,e as o}from"./p-30b4bd45.js";var r=function(e){return t=void 0,i=void 0,o=function(){return function(e,t){var i,s,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(c){return function(a){return function(c){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(n=0)),n;)try{if(i=1,s&&(o=2&c[0]?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,s=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!((o=(o=n.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){n=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(6===c[0]&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],s=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((s=void 0)||(s=Promise))((function(e,r){function n(e){try{a(o.next(e))}catch(e){r(e)}}function c(e){try{a(o.throw(e))}catch(e){r(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,c)}a((o=o.apply(t,i||[])).next())}));var t,i,s,o};const n=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=s.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<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>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<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>'},"Document"))}};n.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", 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 c='<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>',a=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=s.getDefault(),this.type="recent",this.options=void 0,this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",r(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",r(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",o(this.endpoint,{is_starred:!0}).then((e=>this.starred=e)).catch(e)}}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};a.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';const l=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=s.getDefault(),this.placeholder="Search envelopes, templates, organizations...",this.type="all",this.query="",this.grabsFocus=!1}async focusField(){this.inputEl.focus()}componentDidRender(){this.grabsFocus&&this.inputEl.focus()}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e),ref:e=>this.inputEl=e}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>'}),"Search"))}};l.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_quick_functions,a as verdocs_search_activity,l as verdocs_search_box}
1
+ import{r as e,c as t,h as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as s,e as o}from"./p-3a7fa389.js";var r=function(e){return t=void 0,i=void 0,o=function(){return function(e,t){var i,s,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function c(c){return function(a){return function(c){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,c[0]&&(n=0)),n;)try{if(i=1,s&&(o=2&c[0]?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,s=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(!((o=(o=n.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){n=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(6===c[0]&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e],s=0}finally{i=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((s=void 0)||(s=Promise))((function(e,r){function n(e){try{a(o.next(e))}catch(e){r(e)}}function c(e){try{a(o.throw(e))}catch(e){r(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,c)}a((o=o.apply(t,i||[])).next())}));var t,i,s,o};const n=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=s.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<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>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<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>'},"Document"))}};n.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", 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 c='<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>',a=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=s.getDefault(),this.type="recent",this.options=void 0,this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",r(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",r(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",o(this.endpoint,{is_starred:!0}).then((e=>this.starred=e)).catch(e)}}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:c}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};a.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';const l=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=s.getDefault(),this.placeholder="Search envelopes, templates, organizations...",this.type="all",this.query="",this.grabsFocus=!1}async focusField(){this.inputEl.focus()}componentDidRender(){this.grabsFocus&&this.inputEl.focus()}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e),ref:e=>this.inputEl=e}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>'}),"Search"))}};l.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_quick_functions,a as verdocs_search_activity,l as verdocs_search_box}