@verdocs/web-sdk 1.14.8 → 1.14.10

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 (223) hide show
  1. package/dist/cjs/EnvelopeStore-a4231cf7.js +83 -0
  2. package/dist/cjs/{Recipients-2b21fdea.js → Recipients-f3d6cf10.js} +9 -0
  3. package/dist/cjs/{index-6528b430.js → index-7c19ba1d.js} +63 -219
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-f4efefe3.js → utils-618c13f1.js} +1 -1
  6. package/dist/cjs/verdocs-auth.cjs.entry.js +5 -10
  7. package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +15 -91
  10. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +101 -45
  11. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -2
  14. package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -2
  17. package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -2
  18. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +58 -6
  19. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +28 -21
  20. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
  23. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  24. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
  27. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -2
  28. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +47 -17
  29. package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
  30. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  31. package/dist/collection/collection-manifest.json +0 -1
  32. package/dist/collection/components/controls/verdocs-checkbox/verdocs-checkbox.css +3 -4
  33. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +6 -12
  34. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.css +8 -0
  35. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +101 -48
  36. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.js +1 -1
  37. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.css +2 -3
  38. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.css +13 -8
  39. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +111 -2
  40. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +62 -19
  41. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +1 -1
  42. package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.js +37 -17
  43. package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.stories.js +1 -1
  44. package/dist/components/Envelopes.js +1 -1
  45. package/dist/{esm/Recipients-198b2531.js → components/Recipients.js} +9 -1
  46. package/dist/components/Toast.js +1 -74
  47. package/dist/components/index.d.ts +0 -1
  48. package/dist/components/index.js +0 -1
  49. package/dist/components/index2.js +63 -219
  50. package/dist/components/verdocs-auth.js +10 -22
  51. package/dist/components/verdocs-checkbox2.js +1 -1
  52. package/dist/components/verdocs-envelope-document-page2.js +1 -1
  53. package/dist/components/verdocs-envelope-recipient-summary2.js +4 -3
  54. package/dist/components/verdocs-envelope-sidebar.js +112 -54
  55. package/dist/components/verdocs-field-textarea.js +59 -3
  56. package/dist/components/verdocs-field-textbox.js +29 -20
  57. package/dist/components/verdocs-sign.js +2 -1
  58. package/dist/components/verdocs-status-indicator.js +1 -1
  59. package/dist/components/verdocs-template-reminders.js +47 -17
  60. package/dist/components/verdocs-view2.js +1 -1
  61. package/dist/custom-elements.json +16 -13
  62. package/dist/docs.json +96 -129
  63. package/dist/esm/EnvelopeStore-28f5d8f5.js +81 -0
  64. package/dist/esm/{Envelopes-c3d471e5.js → Envelopes-105a4a8f.js} +1 -1
  65. package/dist/esm/Recipients-4ec2138c.js +82 -0
  66. package/dist/esm/{index-d264c496.js → index-914ed6f7.js} +63 -219
  67. package/dist/esm/loader.js +1 -1
  68. package/dist/esm/{utils-9da23ba1.js → utils-60683446.js} +2 -2
  69. package/dist/esm/verdocs-auth.entry.js +5 -10
  70. package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
  71. package/dist/esm/verdocs-dropdown_2.entry.js +3 -3
  72. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +4 -80
  73. package/dist/esm/verdocs-envelope-sidebar.entry.js +102 -46
  74. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  75. package/dist/esm/verdocs-field-date.entry.js +3 -3
  76. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  77. package/dist/esm/verdocs-field-initial.entry.js +3 -3
  78. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  79. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  80. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  81. package/dist/esm/verdocs-field-textarea.entry.js +60 -8
  82. package/dist/esm/verdocs-field-textbox.entry.js +29 -22
  83. package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
  84. package/dist/esm/verdocs-organization-card.entry.js +1 -1
  85. package/dist/esm/verdocs-preview.entry.js +3 -3
  86. package/dist/esm/verdocs-send.entry.js +3 -3
  87. package/dist/esm/verdocs-sign.entry.js +4 -4
  88. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  89. package/dist/esm/verdocs-template-document-page_2.entry.js +3 -3
  90. package/dist/esm/verdocs-template-fields_4.entry.js +3 -3
  91. package/dist/esm/verdocs-template-reminders.entry.js +47 -17
  92. package/dist/esm/verdocs-view.entry.js +3 -3
  93. package/dist/esm/verdocs-web-sdk.js +1 -1
  94. package/dist/esm-es5/EnvelopeStore-28f5d8f5.js +1 -0
  95. package/dist/esm-es5/{Envelopes-c3d471e5.js → Envelopes-105a4a8f.js} +1 -1
  96. package/dist/esm-es5/Recipients-4ec2138c.js +1 -0
  97. package/dist/esm-es5/index-914ed6f7.js +1 -0
  98. package/dist/esm-es5/loader.js +1 -1
  99. package/dist/esm-es5/{utils-9da23ba1.js → utils-60683446.js} +1 -1
  100. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
  102. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  103. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  106. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  107. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  125. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +0 -2
  126. package/dist/types/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +7 -5
  127. package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +23 -3
  128. package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +10 -2
  129. package/dist/types/components.d.ts +40 -45
  130. package/dist/verdocs-web-sdk/{p-4a39c1a4.system.entry.js → p-02a70b8e.system.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/{p-eb3beb29.system.entry.js → p-095a3eba.system.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-592e9e12.entry.js → p-0aee25b9.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/p-0e381c36.entry.js +1 -0
  134. package/dist/verdocs-web-sdk/p-13959c36.system.entry.js +1 -0
  135. package/dist/verdocs-web-sdk/p-18ee4fd5.js +1 -0
  136. package/dist/verdocs-web-sdk/{p-886461cd.system.entry.js → p-1a0cccea.system.entry.js} +1 -1
  137. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  138. package/dist/verdocs-web-sdk/{p-2cf70fcd.entry.js → p-1f561c42.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/{p-be729608.system.entry.js → p-2a5b951c.system.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/{p-afe91637.system.entry.js → p-2c0d7838.system.entry.js} +1 -1
  141. package/dist/verdocs-web-sdk/{p-74dd0569.entry.js → p-33640d84.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-7b215f9d.system.entry.js → p-380efff2.system.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/p-3cd894ff.js +1 -0
  144. package/dist/verdocs-web-sdk/{p-aebd2d02.system.entry.js → p-3fe24d0c.system.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/p-44ec0583.entry.js +1 -0
  146. package/dist/verdocs-web-sdk/{p-2631bdd9.entry.js → p-49b3ac56.entry.js} +1 -1
  147. package/dist/verdocs-web-sdk/p-4a3b037b.system.entry.js +1 -0
  148. package/dist/verdocs-web-sdk/{p-3601cc11.entry.js → p-59243dec.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/p-5cff98bd.entry.js +1 -0
  150. package/dist/verdocs-web-sdk/{p-1402ff01.system.entry.js → p-6a44fb56.system.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-cfec9914.entry.js → p-717c9fe1.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-e7da2f5c.entry.js → p-73ea1ea3.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-b898c99b.system.entry.js → p-7850f739.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/p-7a23c2c8.system.js +1 -0
  155. package/dist/verdocs-web-sdk/{p-7baf2c02.system.entry.js → p-813c2fae.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/p-8aba7c0a.entry.js +1 -0
  157. package/dist/verdocs-web-sdk/{p-8e181e8c.entry.js → p-8b85f402.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-00f8400e.system.entry.js → p-8c5ffa7b.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/{p-38ac3807.entry.js → p-8e386265.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/{p-973ebb54.system.js → p-8fd812f4.system.js} +1 -1
  161. package/dist/verdocs-web-sdk/p-94365585.entry.js +1 -0
  162. package/dist/verdocs-web-sdk/{p-b8d94f4c.system.entry.js → p-9c87f6f8.system.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/p-9d7fa51d.system.entry.js +1 -0
  164. package/dist/verdocs-web-sdk/p-a3c06b62.entry.js +1 -0
  165. package/dist/verdocs-web-sdk/{p-10fe89ab.entry.js → p-a4cbba4a.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-ee53ee29.system.entry.js → p-afa1f20b.system.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/p-b18c293a.system.entry.js +1 -0
  168. package/dist/verdocs-web-sdk/p-b772cdb5.entry.js +1 -0
  169. package/dist/verdocs-web-sdk/{p-b00a49aa.entry.js → p-be6d3848.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/p-c220af42.js +1 -0
  171. package/dist/verdocs-web-sdk/{p-c0b1ace5.entry.js → p-c3ef7b4f.entry.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-10444734.system.entry.js → p-c59f1a0a.system.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/p-c841a530.system.entry.js +1 -0
  174. package/dist/verdocs-web-sdk/{p-9b73909f.js → p-cf790f4f.js} +1 -1
  175. package/dist/verdocs-web-sdk/{p-7dda316b.entry.js → p-d4c8f358.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/p-dc9c4361.system.js +1 -0
  177. package/dist/verdocs-web-sdk/{p-64897a63.entry.js → p-decf6a56.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/p-e2635788.system.entry.js +1 -0
  179. package/dist/verdocs-web-sdk/{p-f1940c85.system.entry.js → p-e727af9c.system.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/{p-d146b48e.entry.js → p-e72c075e.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/p-eaf0b189.system.js +1 -0
  182. package/dist/verdocs-web-sdk/p-ebca6188.entry.js +1 -0
  183. package/dist/verdocs-web-sdk/{p-ca2ed07e.system.entry.js → p-f0db17e6.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/p-f37f1ebc.system.entry.js +1 -0
  185. package/dist/verdocs-web-sdk/{p-73155c52.js → p-f9bea98a.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-da31f940.system.js → p-fa6b1145.system.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-05fc6555.system.entry.js → p-fcfd3193.system.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-4dec0879.entry.js → p-fdda1309.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  190. package/package.json +5 -5
  191. package/dist/cjs/verdocs-template-properties.cjs.entry.js +0 -75
  192. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.css +0 -102
  193. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.js +0 -177
  194. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +0 -13
  195. package/dist/components/verdocs-template-properties.d.ts +0 -11
  196. package/dist/components/verdocs-template-properties.js +0 -131
  197. package/dist/esm/verdocs-template-properties.entry.js +0 -71
  198. package/dist/esm-es5/Recipients-198b2531.js +0 -1
  199. package/dist/esm-es5/index-d264c496.js +0 -1
  200. package/dist/esm-es5/verdocs-template-properties.entry.js +0 -1
  201. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.d.ts +0 -45
  202. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.stories.d.ts +0 -8
  203. package/dist/verdocs-web-sdk/p-0e4fe8f9.entry.js +0 -1
  204. package/dist/verdocs-web-sdk/p-10ec9a96.entry.js +0 -1
  205. package/dist/verdocs-web-sdk/p-12e54f39.js +0 -1
  206. package/dist/verdocs-web-sdk/p-1d14ae9c.entry.js +0 -1
  207. package/dist/verdocs-web-sdk/p-23292d40.system.entry.js +0 -1
  208. package/dist/verdocs-web-sdk/p-381f2a5f.entry.js +0 -1
  209. package/dist/verdocs-web-sdk/p-4157aa74.entry.js +0 -1
  210. package/dist/verdocs-web-sdk/p-494d4276.system.js +0 -1
  211. package/dist/verdocs-web-sdk/p-4a9a3134.system.entry.js +0 -1
  212. package/dist/verdocs-web-sdk/p-4d1f3ddb.entry.js +0 -1
  213. package/dist/verdocs-web-sdk/p-51a3ea62.system.js +0 -1
  214. package/dist/verdocs-web-sdk/p-71976828.entry.js +0 -1
  215. package/dist/verdocs-web-sdk/p-73717726.system.entry.js +0 -1
  216. package/dist/verdocs-web-sdk/p-77cd3ac5.system.entry.js +0 -1
  217. package/dist/verdocs-web-sdk/p-7bd5422e.system.entry.js +0 -1
  218. package/dist/verdocs-web-sdk/p-9c87a748.system.entry.js +0 -1
  219. package/dist/verdocs-web-sdk/p-ab01f71e.js +0 -1
  220. package/dist/verdocs-web-sdk/p-b3a8928b.entry.js +0 -1
  221. package/dist/verdocs-web-sdk/p-b6016e12.entry.js +0 -1
  222. package/dist/verdocs-web-sdk/p-d2bcbce0.system.entry.js +0 -1
  223. package/dist/verdocs-web-sdk/p-e7058963.system.entry.js +0 -1
@@ -1 +0,0 @@
1
- function toInteger(e){if(e===null||e===true||e===false){return NaN}var t=Number(e);if(isNaN(t)){return t}return t<0?Math.ceil(t):Math.floor(t)}function requiredArgs(e,t){if(t.length<e){throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}}function _typeof$1(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof$1=function e(t){return typeof t}}else{_typeof$1=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return _typeof$1(e)}function toDate(e){requiredArgs(1,arguments);var t=Object.prototype.toString.call(e);if(e instanceof Date||_typeof$1(e)==="object"&&t==="[object Date]"){return new Date(e.getTime())}else if(typeof e==="number"||t==="[object Number]"){return new Date(e)}else{if((typeof e==="string"||t==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function addMilliseconds(e,t){requiredArgs(2,arguments);var r=toDate(e).getTime();var a=toInteger(t);return new Date(r+a)}var defaultOptions={};function getDefaultOptions(){return defaultOptions}function getTimezoneOffsetInMilliseconds(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));t.setUTCFullYear(e.getFullYear());return e.getTime()-t.getTime()}function _typeof(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function e(t){return typeof t}}else{_typeof=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return _typeof(e)}function isDate(e){requiredArgs(1,arguments);return e instanceof Date||_typeof(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function isValid(e){requiredArgs(1,arguments);if(!isDate(e)&&typeof e!=="number"){return false}var t=toDate(e);return!isNaN(Number(t))}function subMilliseconds(e,t){requiredArgs(2,arguments);var r=toInteger(t);return addMilliseconds(e,-r)}var MILLISECONDS_IN_DAY=864e5;function getUTCDayOfYear(e){requiredArgs(1,arguments);var t=toDate(e);var r=t.getTime();t.setUTCMonth(0,1);t.setUTCHours(0,0,0,0);var a=t.getTime();var n=r-a;return Math.floor(n/MILLISECONDS_IN_DAY)+1}function startOfUTCISOWeek(e){requiredArgs(1,arguments);var t=1;var r=toDate(e);var a=r.getUTCDay();var n=(a<t?7:0)+a-t;r.setUTCDate(r.getUTCDate()-n);r.setUTCHours(0,0,0,0);return r}function getUTCISOWeekYear(e){requiredArgs(1,arguments);var t=toDate(e);var r=t.getUTCFullYear();var a=new Date(0);a.setUTCFullYear(r+1,0,4);a.setUTCHours(0,0,0,0);var n=startOfUTCISOWeek(a);var o=new Date(0);o.setUTCFullYear(r,0,4);o.setUTCHours(0,0,0,0);var i=startOfUTCISOWeek(o);if(t.getTime()>=n.getTime()){return r+1}else if(t.getTime()>=i.getTime()){return r}else{return r-1}}function startOfUTCISOWeekYear(e){requiredArgs(1,arguments);var t=getUTCISOWeekYear(e);var r=new Date(0);r.setUTCFullYear(t,0,4);r.setUTCHours(0,0,0,0);var a=startOfUTCISOWeek(r);return a}var MILLISECONDS_IN_WEEK$1=6048e5;function getUTCISOWeek(e){requiredArgs(1,arguments);var t=toDate(e);var r=startOfUTCISOWeek(t).getTime()-startOfUTCISOWeekYear(t).getTime();return Math.round(r/MILLISECONDS_IN_WEEK$1)+1}function startOfUTCWeek(e,t){var r,a,n,o,i,u,d,s;requiredArgs(1,arguments);var l=getDefaultOptions();var c=toInteger((r=(a=(n=(o=t===null||t===void 0?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t===null||t===void 0?void 0:(i=t.locale)===null||i===void 0?void 0:(u=i.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:l.weekStartsOn)!==null&&a!==void 0?a:(d=l.locale)===null||d===void 0?void 0:(s=d.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var f=toDate(e);var m=f.getUTCDay();var g=(m<c?7:0)+m-c;f.setUTCDate(f.getUTCDate()-g);f.setUTCHours(0,0,0,0);return f}function getUTCWeekYear(e,t){var r,a,n,o,i,u,d,s;requiredArgs(1,arguments);var l=toDate(e);var c=l.getUTCFullYear();var f=getDefaultOptions();var m=toInteger((r=(a=(n=(o=t===null||t===void 0?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t===null||t===void 0?void 0:(i=t.locale)===null||i===void 0?void 0:(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:f.firstWeekContainsDate)!==null&&a!==void 0?a:(d=f.locale)===null||d===void 0?void 0:(s=d.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(m>=1&&m<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var g=new Date(0);g.setUTCFullYear(c+1,0,m);g.setUTCHours(0,0,0,0);var h=startOfUTCWeek(g,t);var v=new Date(0);v.setUTCFullYear(c,0,m);v.setUTCHours(0,0,0,0);var w=startOfUTCWeek(v,t);if(l.getTime()>=h.getTime()){return c+1}else if(l.getTime()>=w.getTime()){return c}else{return c-1}}function startOfUTCWeekYear(e,t){var r,a,n,o,i,u,d,s;requiredArgs(1,arguments);var l=getDefaultOptions();var c=toInteger((r=(a=(n=(o=t===null||t===void 0?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t===null||t===void 0?void 0:(i=t.locale)===null||i===void 0?void 0:(u=i.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:l.firstWeekContainsDate)!==null&&a!==void 0?a:(d=l.locale)===null||d===void 0?void 0:(s=d.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:1);var f=getUTCWeekYear(e,t);var m=new Date(0);m.setUTCFullYear(f,0,c);m.setUTCHours(0,0,0,0);var g=startOfUTCWeek(m,t);return g}var MILLISECONDS_IN_WEEK=6048e5;function getUTCWeek(e,t){requiredArgs(1,arguments);var r=toDate(e);var a=startOfUTCWeek(r,t).getTime()-startOfUTCWeekYear(r,t).getTime();return Math.round(a/MILLISECONDS_IN_WEEK)+1}function addLeadingZeros(e,t){var r=e<0?"-":"";var a=Math.abs(e).toString();while(a.length<t){a="0"+a}return r+a}var formatters$1={y:function e(t,r){var a=t.getUTCFullYear();var n=a>0?a:1-a;return addLeadingZeros(r==="yy"?n%100:n,r.length)},M:function e(t,r){var a=t.getUTCMonth();return r==="M"?String(a+1):addLeadingZeros(a+1,2)},d:function e(t,r){return addLeadingZeros(t.getUTCDate(),r.length)},a:function e(t,r){var a=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function e(t,r){return addLeadingZeros(t.getUTCHours()%12||12,r.length)},H:function e(t,r){return addLeadingZeros(t.getUTCHours(),r.length)},m:function e(t,r){return addLeadingZeros(t.getUTCMinutes(),r.length)},s:function e(t,r){return addLeadingZeros(t.getUTCSeconds(),r.length)},S:function e(t,r){var a=r.length;var n=t.getUTCMilliseconds();var o=Math.floor(n*Math.pow(10,a-3));return addLeadingZeros(o,r.length)}};var dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};var formatters={G:function e(t,r,a){var n=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})}},y:function e(t,r,a){if(r==="yo"){var n=t.getUTCFullYear();var o=n>0?n:1-n;return a.ordinalNumber(o,{unit:"year"})}return formatters$1.y(t,r)},Y:function e(t,r,a,n){var o=getUTCWeekYear(t,n);var i=o>0?o:1-o;if(r==="YY"){var u=i%100;return addLeadingZeros(u,2)}if(r==="Yo"){return a.ordinalNumber(i,{unit:"year"})}return addLeadingZeros(i,r.length)},R:function e(t,r){var a=getUTCISOWeekYear(t);return addLeadingZeros(a,r.length)},u:function e(t,r){var a=t.getUTCFullYear();return addLeadingZeros(a,r.length)},Q:function e(t,r,a){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return addLeadingZeros(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function e(t,r,a){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return addLeadingZeros(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function e(t,r,a){var n=t.getUTCMonth();switch(r){case"M":case"MM":return formatters$1.M(t,r);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})}},L:function e(t,r,a){var n=t.getUTCMonth();switch(r){case"L":return String(n+1);case"LL":return addLeadingZeros(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})}},w:function e(t,r,a,n){var o=getUTCWeek(t,n);if(r==="wo"){return a.ordinalNumber(o,{unit:"week"})}return addLeadingZeros(o,r.length)},I:function e(t,r,a){var n=getUTCISOWeek(t);if(r==="Io"){return a.ordinalNumber(n,{unit:"week"})}return addLeadingZeros(n,r.length)},d:function e(t,r,a){if(r==="do"){return a.ordinalNumber(t.getUTCDate(),{unit:"date"})}return formatters$1.d(t,r)},D:function e(t,r,a){var n=getUTCDayOfYear(t);if(r==="Do"){return a.ordinalNumber(n,{unit:"dayOfYear"})}return addLeadingZeros(n,r.length)},E:function e(t,r,a){var n=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})}},e:function e(t,r,a,n){var o=t.getUTCDay();var i=(o-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return addLeadingZeros(i,2);case"eo":return a.ordinalNumber(i,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})}},c:function e(t,r,a,n){var o=t.getUTCDay();var i=(o-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return addLeadingZeros(i,r.length);case"co":return a.ordinalNumber(i,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})}},i:function e(t,r,a){var n=t.getUTCDay();var o=n===0?7:n;switch(r){case"i":return String(o);case"ii":return addLeadingZeros(o,r.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});case"iiii":default:return a.day(n,{width:"wide",context:"formatting"})}},a:function e(t,r,a){var n=t.getUTCHours();var o=n/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function e(t,r,a){var n=t.getUTCHours();var o;if(n===12){o=dayPeriodEnum.noon}else if(n===0){o=dayPeriodEnum.midnight}else{o=n/12>=1?"pm":"am"}switch(r){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function e(t,r,a){var n=t.getUTCHours();var o;if(n>=17){o=dayPeriodEnum.evening}else if(n>=12){o=dayPeriodEnum.afternoon}else if(n>=4){o=dayPeriodEnum.morning}else{o=dayPeriodEnum.night}switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function e(t,r,a){if(r==="ho"){var n=t.getUTCHours()%12;if(n===0)n=12;return a.ordinalNumber(n,{unit:"hour"})}return formatters$1.h(t,r)},H:function e(t,r,a){if(r==="Ho"){return a.ordinalNumber(t.getUTCHours(),{unit:"hour"})}return formatters$1.H(t,r)},K:function e(t,r,a){var n=t.getUTCHours()%12;if(r==="Ko"){return a.ordinalNumber(n,{unit:"hour"})}return addLeadingZeros(n,r.length)},k:function e(t,r,a){var n=t.getUTCHours();if(n===0)n=24;if(r==="ko"){return a.ordinalNumber(n,{unit:"hour"})}return addLeadingZeros(n,r.length)},m:function e(t,r,a){if(r==="mo"){return a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"})}return formatters$1.m(t,r)},s:function e(t,r,a){if(r==="so"){return a.ordinalNumber(t.getUTCSeconds(),{unit:"second"})}return formatters$1.s(t,r)},S:function e(t,r){return formatters$1.S(t,r)},X:function e(t,r,a,n){var o=n._originalDate||t;var i=o.getTimezoneOffset();if(i===0){return"Z"}switch(r){case"X":return formatTimezoneWithOptionalMinutes(i);case"XXXX":case"XX":return formatTimezone(i);case"XXXXX":case"XXX":default:return formatTimezone(i,":")}},x:function e(t,r,a,n){var o=n._originalDate||t;var i=o.getTimezoneOffset();switch(r){case"x":return formatTimezoneWithOptionalMinutes(i);case"xxxx":case"xx":return formatTimezone(i);case"xxxxx":case"xxx":default:return formatTimezone(i,":")}},O:function e(t,r,a,n){var o=n._originalDate||t;var i=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(i,":");case"OOOO":default:return"GMT"+formatTimezone(i,":")}},z:function e(t,r,a,n){var o=n._originalDate||t;var i=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(i,":");case"zzzz":default:return"GMT"+formatTimezone(i,":")}},t:function e(t,r,a,n){var o=n._originalDate||t;var i=Math.floor(o.getTime()/1e3);return addLeadingZeros(i,r.length)},T:function e(t,r,a,n){var o=n._originalDate||t;var i=o.getTime();return addLeadingZeros(i,r.length)}};function formatTimezoneShort(e,t){var r=e>0?"-":"+";var a=Math.abs(e);var n=Math.floor(a/60);var o=a%60;if(o===0){return r+String(n)}var i=t||"";return r+String(n)+i+addLeadingZeros(o,2)}function formatTimezoneWithOptionalMinutes(e,t){if(e%60===0){var r=e>0?"-":"+";return r+addLeadingZeros(Math.abs(e)/60,2)}return formatTimezone(e,t)}function formatTimezone(e,t){var r=t||"";var a=e>0?"-":"+";var n=Math.abs(e);var o=addLeadingZeros(Math.floor(n/60),2);var i=addLeadingZeros(n%60,2);return a+o+r+i}var dateLongFormatter=function e(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}};var timeLongFormatter=function e(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}};var dateTimeLongFormatter=function e(t,r){var a=t.match(/(P+)(p+)?/)||[];var n=a[1];var o=a[2];if(!o){return dateLongFormatter(t,r)}var i;switch(n){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",dateLongFormatter(n,r)).replace("{{time}}",timeLongFormatter(o,r))};var longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter};var protectedDayOfYearTokens=["D","DD"];var protectedWeekYearTokens=["YY","YYYY"];function isProtectedDayOfYearToken(e){return protectedDayOfYearTokens.indexOf(e)!==-1}function isProtectedWeekYearToken(e){return protectedWeekYearTokens.indexOf(e)!==-1}function throwProtectedError(e,t,r){if(e==="YYYY"){throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="YY"){throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="D"){throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="DD"){throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}}var formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var formatDistance=function e(t,r,a){var n;var o=formatDistanceLocale[t];if(typeof o==="string"){n=o}else if(r===1){n=o.one}else{n=o.other.replace("{{count}}",r.toString())}if(a!==null&&a!==void 0&&a.addSuffix){if(a.comparison&&a.comparison>0){return"in "+n}else{return n+" ago"}}return n};function buildFormatLongFn(e){return function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var r=t.width?String(t.width):e.defaultWidth;var a=e.formats[r]||e.formats[e.defaultWidth];return a}}var dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"};var timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"};var dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};var formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})};var formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var formatRelative=function e(t,r,a,n){return formatRelativeLocale[t]};function buildLocalizeFn(e){return function(t,r){var a=r!==null&&r!==void 0&&r.context?String(r.context):"standalone";var n;if(a==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth;var i=r!==null&&r!==void 0&&r.width?String(r.width):o;n=e.formattingValues[i]||e.formattingValues[o]}else{var u=e.defaultWidth;var d=r!==null&&r!==void 0&&r.width?String(r.width):e.defaultWidth;n=e.values[d]||e.values[u]}var s=e.argumentCallback?e.argumentCallback(t):t;return n[s]}}var eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]};var quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]};var monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]};var dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};var dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}};var formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};var ordinalNumber=function e(t,r){var a=Number(t);var n=a%100;if(n>20||n<10){switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}}return a+"th"};var localize={ordinalNumber:ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function e(t){return t-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(e){return function(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=r.width;var n=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth];var o=t.match(n);if(!o){return null}var i=o[0];var u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];var d=Array.isArray(u)?findIndex(u,(function(e){return e.test(i)})):findKey(u,(function(e){return e.test(i)}));var s;s=e.valueCallback?e.valueCallback(d):d;s=r.valueCallback?r.valueCallback(s):s;var l=t.slice(i.length);return{value:s,rest:l}}}function findKey(e,t){for(var r in e){if(e.hasOwnProperty(r)&&t(e[r])){return r}}return undefined}function findIndex(e,t){for(var r=0;r<e.length;r++){if(t(e[r])){return r}}return undefined}function buildMatchPatternFn(e){return function(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=t.match(e.matchPattern);if(!a)return null;var n=a[0];var o=t.match(e.parsePattern);if(!o)return null;var i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;var u=t.slice(n.length);return{value:i,rest:u}}}var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i;var parseOrdinalNumberPattern=/\d+/i;var matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i};var parseEraPatterns={any:[/^b/i,/^(a|c)/i]};var matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i};var parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]};var matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i};var parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]};var matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i};var parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]};var matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i};var parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};var match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function e(t){return parseInt(t,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function e(t){return t+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})};var locale={code:"en-US",formatDistance:formatDistance,formatLong:formatLong,formatRelative:formatRelative,localize:localize,match:match,options:{weekStartsOn:0,firstWeekContainsDate:1}};var formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;var longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;var escapedStringRegExp=/^'([^]*?)'?$/;var doubleQuoteRegExp=/''/g;var unescapedLatinCharacterRegExp=/[a-zA-Z]/;function format(e,t,r){var a,n,o,i,u,d,s,l,c,f,m,g,h,v,w,b,y,p;requiredArgs(2,arguments);var T=String(t);var C=getDefaultOptions();var D=(a=(n=r===null||r===void 0?void 0:r.locale)!==null&&n!==void 0?n:C.locale)!==null&&a!==void 0?a:locale;var M=toInteger((o=(i=(u=(d=r===null||r===void 0?void 0:r.firstWeekContainsDate)!==null&&d!==void 0?d:r===null||r===void 0?void 0:(s=r.locale)===null||s===void 0?void 0:(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&u!==void 0?u:C.firstWeekContainsDate)!==null&&i!==void 0?i:(c=C.locale)===null||c===void 0?void 0:(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(M>=1&&M<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var P=toInteger((m=(g=(h=(v=r===null||r===void 0?void 0:r.weekStartsOn)!==null&&v!==void 0?v:r===null||r===void 0?void 0:(w=r.locale)===null||w===void 0?void 0:(b=w.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&h!==void 0?h:C.weekStartsOn)!==null&&g!==void 0?g:(y=C.locale)===null||y===void 0?void 0:(p=y.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&m!==void 0?m:0);if(!(P>=0&&P<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}if(!D.localize){throw new RangeError("locale must contain localize property")}if(!D.formatLong){throw new RangeError("locale must contain formatLong property")}var k=toDate(e);if(!isValid(k)){throw new RangeError("Invalid time value")}var S=getTimezoneOffsetInMilliseconds(k);var O=subMilliseconds(k,S);var L={firstWeekContainsDate:M,weekStartsOn:P,locale:D,_originalDate:k};var U=T.match(longFormattingTokensRegExp).map((function(e){var t=e[0];if(t==="p"||t==="P"){var r=longFormatters[t];return r(e,D.formatLong)}return e})).join("").match(formattingTokensRegExp).map((function(a){if(a==="''"){return"'"}var n=a[0];if(n==="'"){return cleanEscapedString(a)}var o=formatters[n];if(o){if(!(r!==null&&r!==void 0&&r.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken(a)){throwProtectedError(a,t,String(e))}if(!(r!==null&&r!==void 0&&r.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken(a)){throwProtectedError(a,t,String(e))}return o(O,a,D.localize,L)}if(n.match(unescapedLatinCharacterRegExp)){throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`")}return a})).join("");return U}function cleanEscapedString(e){var t=e.match(escapedStringRegExp);if(!t){return e}return t[1].replace(doubleQuoteRegExp,"'")}export{format as f};
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,r){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function n(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(n,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(e){return function(t){return l([e,t])}}function l(n){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,o&&(s=n[0]&2?o["return"]:n[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;if(o=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;o=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){i.label=n[1];break}if(n[0]===6&&i.label<s[1]){i.label=s[1];s=n;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(n);break}if(s[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];o=0}finally{r=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b18c0348.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-5b92f115.js";import{g as getTemplateStore}from"./TemplateStore-852097c3.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./index-29123f30.js";import"./Templates-67172396.js";var verdocsTemplatePropertiesCss='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .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-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';var VerdocsTemplateProperties=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.name="";this.visibility="";this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,r,o,s,n,a,l;return __generator(this,(function(p){switch(p.label){case 0:p.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PROPERTIES] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 1:a.store=p.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.sendReminders=((r=(i=this.store)===null||i===void 0?void 0:i.state)===null||r===void 0?void 0:r.reminder_id)!==null;return[3,3];case 2:l=p.sent();console.log("[PROPERTIES] Error loading template",l);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new SDKError(l.message,(s=l.response)===null||s===void 0?void 0:s.status,(n=l.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("h5",null,"Template Name"),h("fieldset",null,h("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:function(t){return e.name=t.target.value}})),h("h5",null,"Reminders"),h("fieldset",null,h("div",{class:"input-row"},h("label",null,"Send Automatic Reminders"),h("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){return e.sendReminders=t.target.checked}})),h("div",{class:"input-row"},h("label",null,"Days Before First Reminder"),h("verdocs-text-input",{value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value}})),h("div",{class:"input-row"},h("label",null,"Days Between Reminders"),h("verdocs-text-input",{value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value}}))),h("h5",null,"Template Visibility"),h("fieldset",null,h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"private",onChange:function(){return e.visibility="private"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-private"},h("div",{class:"title"},"Private"),h("div",{class:"description"},"Only you can share and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"shared",onChange:function(){return e.visibility="shared"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-shared"},h("div",{class:"title"},"Shared to your organization"),h("div",{class:"description"},"Give access to your organization to share and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"shared_public",onChange:function(){return e.visibility="shared_public"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},h("div",{class:"title"},"Shared to your organization and Public"),h("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:this.visibility==="public",value:"public",onChange:function(){return e.visibility="public"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-public"},h("div",{class:"title"},"Public"),h("div",{class:"description"},"Anyone on the Web can find and use this template")))),h("div",{class:"buttons"},h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}();VerdocsTemplateProperties.style=verdocsTemplatePropertiesCss;export{VerdocsTemplateProperties as verdocs_template_properties};
@@ -1,45 +0,0 @@
1
- import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
- import { EventEmitter } from '../../../stencil-public-runtime';
3
- import { TTemplateStore } from '../../../utils/TemplateStore';
4
- import { SDKError } from '../../../utils/errors';
5
- /**
6
- * Displays a collection of settings boxes that allow a user to configure a template's behavior.
7
- */
8
- export declare class VerdocsTemplateProperties {
9
- /**
10
- * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
11
- */
12
- endpoint: VerdocsEndpoint;
13
- /**
14
- * The template ID to edit.
15
- */
16
- templateId: string;
17
- /**
18
- * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
19
- */
20
- exit: EventEmitter;
21
- /**
22
- * Event fired when the user completes the step.
23
- */
24
- next: EventEmitter<{
25
- name: string;
26
- sendReminders: boolean;
27
- firstReminderDays: number;
28
- reminderDays: number;
29
- }>;
30
- /**
31
- * Event fired if an error occurs. The event details will contain information about the error. Most errors will
32
- * terminate the process, and the calling application should correct the condition and re-render the component.
33
- */
34
- sdkError: EventEmitter<SDKError>;
35
- name: string;
36
- visibility: string;
37
- sendReminders: boolean;
38
- firstReminderDays: string;
39
- reminderDays: string;
40
- store: TTemplateStore | null;
41
- componentWillLoad(): Promise<void>;
42
- handleCancel(e: any): void;
43
- handleSubmit(e: any): void;
44
- render(): any;
45
- }
@@ -1,8 +0,0 @@
1
- import { Meta } from '@storybook/web-components';
2
- declare const _default: Meta<import("@storybook/web-components").Args>;
3
- export default _default;
4
- export declare const Properties: ({ onExit, onNext, templateId }: {
5
- onExit: any;
6
- onNext: any;
7
- templateId: any;
8
- }) => import("lit-html").TemplateResult<1>;
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as o}from"./p-9cf1a627.js";import{c as i}from"./p-9d707f6e.js";const s=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(o,{class:{disabled:this.disabled,[this.theme]:!0}},t("label",null,t("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",null,this.label)))}};s.style='@charset "UTF-8";verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const r=class{constructor(t){e(this,t),this.message=""}render(){return t(o,null,t("div",{class:"inner"},this.message))}};r.style='verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const n=class{constructor(t){e(this,t),this.text="",this.containerId=`verdocs-help-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=i(this.icon,this.tooltip,{})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var e,t;null===(e=this.tooltip)||void 0===e||e.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var e;null===(e=this.tooltip)||void 0===e||e.removeAttribute("data-show")}render(){return t(o,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.icon=e}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:e=>this.tooltip=e},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};n.style='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';const c=class{constructor(t){e(this,t),this.value="",this.label="",this.placeholder="",this.autocomplete="",this.helpText="",this.type="text",this.disabled=!1}render(){return t(o,{class:"input-field"},t("label",null,this.label&&t("div",{class:"input-label"},this.label+":"),t("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&t("verdocs-help-icon",{text:this.helpText})))}};c.style='verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';export{s as verdocs_checkbox,r as verdocs_component_error,n as verdocs_help_icon,c as verdocs_text_input}
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,H as s,F as o}from"./p-9cf1a627.js";import{b as n,t as l,u as a,c as r,d}from"./p-9b73909f.js";import{R as h}from"./p-05788c2b.js";import{e as c,a as p,b as u}from"./p-12e54f39.js";import{V as v}from"./p-0b4ea5f9.js";import{a as g,i as m}from"./p-e662f81b.js";import{f as x,i as f}from"./p-7291906c.js";import{s as b,u as w,a as y,r as k,b as I}from"./p-73155c52.js";import{a as S}from"./p-de60d3a8.js";import{S as N}from"./p-7a1b2643.js";import{V as G}from"./p-ed416acf.js";import{f as F}from"./p-ab01f71e.js";import"./p-eab67c09.js";import"./p-aa124212.js";const j=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],z=[{id:"print",label:"Print"},{id:"download",label:"Download"}],R=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.headerTargetId=null,this.envelope=null,this.roleNames=[],this.sortedRecipients=[],this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.submitting=!1,this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new v({sessionType:"signing"})}async componentWillRender(){var e,i,t,s,o,a,r;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await n(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),this.envelope=await l(this.endpoint,this.envelopeId),this.sortedRecipients=[...this.envelope.recipients],this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence)),this.roleNames=this.sortedRecipients.map((e=>e.role_name)),this.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=this.roleNames.findIndex((e=>e==this.roleId)),this.recipientIndex>-1?(this.recipient=this.sortedRecipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),this.checkRecipientFields(),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope})}catch(e){console.log("Error with signing session",e),null===(o=this.sdkError)||void 0===o||o.emit(new N(e.message,null===(a=e.response)||void 0===a?void 0:a.status,null===(r=e.response)||void 0===r?void 0:r.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new N("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new N("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new N("[SIGN] Missing required envelopId",500,""))}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-sign-header");e&&i&&(console.log("[SIGN] Moving header"),i.remove(),e.append(i))}handleClickAgree(){this.submitting=!0,c(this.endpoint,this.envelopeId,this.roleId,!0).then((()=>{var e;this.nextButtonLabel="Next",this.recipient.agreed=!0,this.submitting=!1,this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),this.submitting=!1,null===(i=this.sdkError)||void 0===i||i.emit(new N(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":G("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=!0;const e=await p(this.endpoint,this.envelopeId,this.roleId);console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"}),this.submitting=!1,this.isDone=!0}break;case"print":window.print(),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":b(this.endpoint,this.envelope,this.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e),this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,w(t),this.checkRecipientFields())}))}saveFieldChange(e,i){console.log("[SIGN] updateRecipientFieldValue",e),a(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,l;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(o=this.sdkError)||void 0===o||o.emit(new N(e.message,null===(n=e.response)||void 0===n?void 0:n.status,null===(l=e.response)||void 0===l?void 0:l.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":const a=await(await fetch(i.detail)).blob();return(o=this.endpoint,"initial",n=a,l=new FormData,l.append("initial",n,"initial"),o.api.post("/initials",l).then((function(e){return e.data}))).then((async i=>{const t=await d(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":const h=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,h).then((async i=>{const t=await r(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"date":const c=i.target.getAttribute("iso");console.log("Formatting date for save",c);const p=F(new Date(c),S);return console.log("Formatted",p),this.saveFieldChange(e.name,{prepared:!1,value:p});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var o,n,l}isFieldValid(e){var i,t,s,o,n,l,a;const{required:r=!1}=e,{result:d="",value:h="",base64:c=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return m(d);case"phone":return g(d);default:return!r||""!==d}case"signature":case"initial":return!r||""!==c;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!r||""!==d;case"dropdown":return!r||""!==h;case"checkbox_group":const p=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!r||p>=((null===(o=e.settings)||void 0===o?void 0:o.minimum_checked)||0)&&p<=((null===(n=e.settings)||void 0===n?void 0:n.maximum_checked)||999);case"radio_button_group":return!r||((null===(a=null===(l=e.settings)||void 0===l?void 0:l.options)||void 0===a?void 0:a.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e;if(this.nextSubmits){try{this.submitting=!0;const e=await u(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",e),this.recipient.status="submitted",this.showDone=!0,this.isDone=!0,setTimeout((()=>{console.log("[SIGN] Reloading"),window.location.reload()}),1e3)}catch(e){console.log("[SIGN] Error submitting",e)}return void(this.submitting=!1)}const i=this.recipient.fields.filter((e=>e.required));let t=i.findIndex((e=>e.name===this.focusedField))+1;t>=i.length&&(t=0);let s=i[t],o=0;if(o<i.length&&["signature","initial"].includes(s.type)&&"signed"===(null===(e=s.settings)||void 0===e?void 0:e.result)&&(o++,t++,t>=i.length&&(t=0),s=i[t]),o>=i.length&&(s=null),s){const e=I(s),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=s.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits=!0):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var o;s.addEventListener("input",(e=>{console.log("[SIGN] onfieldInput",e.detail,e.target.value),e.target.name.includes("checkbox_group")||e.target.name.includes("radio_button_group")?(console.log("CB",e.target),this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))):this.checkRecipientFields()})),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?x(this.recipient.full_name):""),s.setAttribute("name",(null===(o=this.recipient)||void 0===o?void 0:o.full_name)||"")}handlePageRendered(e){const i=e.detail,t=y(this.roleNames,this.recipient.role_name),s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s}),s.forEach((e=>{const s=k(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),this.sortedRecipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status===h.INVITED||e.status===h.OPENED||e.status===h.PENDING))).forEach((e=>{const t=y(this.roleNames,e.role_name);e.fields.forEach((e=>{const s=k(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))}))})),this.checkRecipientFields()}render(){return this.envelope?this.isDone?t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null))):t(s,{class:{agreed:this.agreed}},!this.finishLater&&t("div",{class:"intro"},t("div",{class:"inner"},"Please review and act on these documents.")),t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},this.agreed?t(o,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}})):t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})),!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?z:j,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",this.agreed?{style:{display:"none"}}:{class:"cover"}),t("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(this.envelope.documents||[]).map((e=>{const i=f(1,e.page_numbers);return t(o,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=!1,this.isDone=!0}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null))):t(s,null,t("verdocs-loader",null))}};R.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff}verdocs-sign .intro .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}';export{R as verdocs_sign}
@@ -1 +0,0 @@
1
- var n=function(n,t,e,r){return i=void 0,o=void 0,c=function(){return function(n,t){var e,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(a){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(u=0)),u;)try{if(e=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return u.label++,{value:c[1],done:!1};case 5:u.label++,r=c[1],c=[0];continue;case 7:c=u.ops.pop(),u.trys.pop();continue;default:if(!((i=(i=u.trys).length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){u.label=c[1];break}if(6===c[0]&&u.label<i[1]){u.label=i[1],i=c;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(c);break}i[2]&&u.ops.pop(),u.trys.pop();continue}c=t.call(n,u)}catch(n){c=[6,n],r=0}finally{e=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,n.api.put("/envelopes/".concat(t,"/recipients/").concat(e),r).then((function(n){return n.data}))]}))},new((u=void 0)||(u=Promise))((function(n,t){function e(n){try{a(c.next(n))}catch(n){t(n)}}function r(n){try{a(c.throw(n))}catch(n){t(n)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof u?i:new u((function(n){n(i)}))).then(e,r)}a((c=c.apply(i,o||[])).next())}));var i,o,u,c},t=function(t,e,r){return n(t,e,r,{action:"submit"})},e=function(t,e,r){return n(t,e,r,{action:"decline"})},r=function(t,e,r,i){return n(t,e,r,{action:"update",agreed:i})},i=function(n,t,e){return n.api.get("/envelopes/".concat(t,"/recipients/").concat(encodeURIComponent(e),"?in_person_link=true")).then((function(n){return n.data}))};export{e as a,t as b,r as e,i as g}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s,H as i}from"./p-9cf1a627.js";import{g as o}from"./p-6de76553.js";import{g as r}from"./p-73155c52.js";import"./p-eab67c09.js";import"./p-9b73909f.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-ab01f71e.js";const a=class{constructor(s){e(this,s),this.settingsChanged=t(this,"settingsChanged",7),this.deleted=t(this,"deleted",7),this.templateid="",this.field=null,this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.rerender=0}async focusField(){this.el.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.showPanel&&e.showPanel()}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.hidePanel&&e.hidePanel()}render(){var e,t;const a=r(this.field),l=null!==(t=null!==(e=this.disabled)&&void 0!==e?e:a.disabled)&&void 0!==t&&t,d=this.field.rgba||o(this.roleindex);return this.done?s(i,{class:{done:this.done}},a.value):s(i,{class:{required:a.required,disabled:l},style:{backgroundColor:d}},s("textarea",{placeholder:a.placeholder||"",tabIndex:a.order,value:a.value,disabled:l,name:this.field.name,required:a.required,ref:e=>this.el=e}),this.editable&&s("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>',id:`verdocs-settings-panel-${this.field.name}`},s("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;return null===(e=this.deleted)||void 0===e||e.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:e=>{var t;return null===(t=this.settingsChanged)||void 0===t||t.emit(e.detail),this.hideSettingsPanel()}})))}};a.style='verdocs-field-textarea{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{-webkit-box-sizing:border-box;box-sizing:border-box;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;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textarea verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textarea verdocs-button-panel[data-active],verdocs-field-textarea verdocs-button-panel:hover{opacity:1}verdocs-field-textarea verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textarea verdocs-button-panel .icon:hover svg{fill:#000000}';export{a as verdocs_field_textarea}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):s(e.value).then(o,r)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(a=o[0]&2?s["return"]:o[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,o[1])).done)return a;if(s=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-934a39b4.system.js","./p-973ebb54.system.js","./p-8c57f5d0.system.js","./p-54498887.system.js","./p-dc849a58.system.js","./p-7fd7152d.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,i,n,s,a,o,r,c,l,d,p;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){a=e.t},function(e){o=e.u},function(){},function(e){r=e.V},function(e){c=e.F},function(e){l=e.V},function(e){d=e.S},function(e){p=e.f}],execute:function(){var v='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var h='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var g={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var m=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.toggle=i(this,"toggle",7);this.another=i(this,"another",7);this.endpoint=r.getDefault();this.envelopeId="";this.envelope=null;this.sortedRecipients=[];this.roleNames=[];this.activeTab=1;this.panelOpen=false;this.showManageDialog=false;this.loading=true}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s;return __generator(this,(function(o){switch(o.label){case 0:if(!this.envelopeId){console.error("[SIDEBAR] Missing required envelopeId");return[2]}o.label=1;case 1:o.trys.push([1,3,,4]);n=this;return[4,a(this.endpoint,this.envelopeId)];case 2:n.envelope=o.sent();this.sortedRecipients=__spreadArray([],this.envelope.recipients,true);this.sortedRecipients.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}));this.roleNames=this.sortedRecipients.map((function(e){return e.role_name}));this.loading=false;return[3,4];case 3:s=o.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(i=s.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.setTab=function(e){var t;this.panelOpen=e!==this.activeTab||!this.panelOpen;(t=this.toggle)===null||t===void 0?void 0:t.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)};e.prototype.canModifyRecipient=function(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)};e.prototype.handleRecipientAction=function(e,t){var i;console.log("[SIDEBAR] Recipient action",t,e);switch(t){case"reminder":l("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"modify":l("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":l("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:t})};e.prototype.prepareHistoryEntries=function(){var e=this;var t=[];var i=this.envelope.histories||[];t.push({icon:"pencil",message:"Envelope created.",date:new Date(this.envelope.created_at)});if(this.envelope.status==="complete"){t.push({icon:"pencil",message:"Envelope completed.",date:new Date(this.envelope.updated_at)})}var n=i.some((function(e){return e.event==="owner:canceled"}));if(this.envelope.status==="canceled"&&!n){t.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(this.envelope.canceled_at)})}i.forEach((function(i){var n=e.sortedRecipients.find((function(e){return e.role_name===i.role_name}));var s=(n===null||n===void 0?void 0:n.full_name)||"";switch(i.event.toLowerCase()){case"recipient:signed":t.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":t.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":t.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":t.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":t.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":t.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:t.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":t.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:t.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":t.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){t.push({icon:"account_circle",message:"".concat(s," claimed the Verdoc as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){t.push({icon:"verified_user",message:"".concat(s," claimed the Verdoc as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":t.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){t.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{t.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"invitation:resent":t.push({icon:"mail",message:"Invitation was resent to ".concat(s," ").concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":t.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":t.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":t.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":t.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":t.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":t.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":t.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":t.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));t.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return t};e.prototype.render=function(){var e=this;var t,i,a;if(!this.envelope||this.loading){return n(s,null)}var r=this.endpoint.getSession();var l=o(r,this.envelope);var d=this.prepareHistoryEntries();return n(s,{class:this.panelOpen?"open":""},n("div",{class:"side-buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:h}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:u}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:f})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},this.envelope.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},p(new Date(this.envelope.created_at),c)),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},p(new Date(this.envelope.updated_at),c)),n("div",{class:"label"},"Status"),n("div",{class:"value"},this.envelope.status),n("div",{class:"label"},"Verdoc Owner ID"),n("div",{class:"value"},this.envelope.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(t=this.envelope.profile)===null||t===void 0?void 0:t.first_name," ",(i=this.envelope.profile)===null||i===void 0?void 0:i.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(a=this.envelope.profile)===null||a===void 0?void 0:a.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),this.sortedRecipients.map((function(t,i){var s;return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.role_name),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),l&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!e.canResendRecipient(t)},{id:"modify",label:"Modify Recipient",disabled:!e.canModifyRecipient(t)}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},t.full_name),n("div",{class:"recipient-name"},t.email),n("div",{class:"recipient-name"},t.phone)))})),l&&n("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Manage Recipients",onClick:function(){return e.showManageDialog=true}})),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),d.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:g[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},p(e.date,c))))}))),this.showManageDialog&&n("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:false,onAnother:function(){var t;e.showManageDialog=false;(t=e.another)===null||t===void 0?void 0:t.emit({envelope:e.envelope})},onNext:function(){e.showManageDialog=false}}))};return e}());m.style=v}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as s,H as o}from"./p-9cf1a627.js";import{g as t,r}from"./p-d869c39c.js";import{g as n}from"./p-12e54f39.js";import"./p-05788c2b.js";import{V as l}from"./p-0b4ea5f9.js";import{c as a}from"./p-790beec1.js";import{e as c}from"./p-9b73909f.js";import{V as d}from"./p-ed416acf.js";import{S as p}from"./p-7a1b2643.js";const m={},f=class{constructor(s){e(this,s),this.another=i(this,"another",7),this.view=i(this,"view",7),this.next=i(this,"next",7),this.sdkError=i(this,"sdkError",7),this.store=null,this.endpoint=l.getDefault(),this.envelopeId="",this.canSendAnother=!0,this.canView=!0,this.canDone=!0,this.envelope=void 0,this.isOpen=void 0,this.loading=!0,this.recipientStatusIcons=[],this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`,this.gettingLinks={},this.links={}}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start session, must be authenticated");this.store=await(async(e,i,s=!1)=>{let o=!1;m[i]||(console.debug("[ENVELOPES] No envelope store found for ID, creating",i),m[i]=(e=>{const i=(new Date).toISOString();return a({isLoading:!0,isLoaded:!1,isError:!1,error:null,updateCount:0,roleNames:[],id:e,template_id:"",name:"",status:"pending",profile_id:"",organization_id:"",no_contact:!1,created_at:i,updated_at:i,canceled_at:null,reminder_id:null,envelope_document_id:"",certificate_document_id:null,visibility:"private",histories:[],recipients:[],profile:void 0,certificate:void 0,document:void 0,documents:void 0,fields:void 0})})(i),o=!0);const t=m[i];if(t.use({reset:()=>console.debug("[ENVELOPES] Store got reset"),dispose:()=>console.debug("[ENVELOPES] Store got disposed")}),o||s){console.debug("[ENVELOPES] Reloading envelope",{envelopeId:i,created:o,forceReload:s}),t.state.isLoading=!0,t.state.isLoaded=!1,t.state.isError=!1,t.state.error=void 0;try{const s=await c(e,i);console.debug("[ENVELOPES] Got envelope",s),Object.assign(t.state,s),t.state.isLoaded=!0,t.state.isError=!1,t.state.error=void 0}catch(e){throw console.error("[ENVELOPES] Error loading envelope",e),t.state.isLoaded=!1,t.state.isError=!0,t.state.error=e,e}t.state.isLoading=!1,t.state.updateCount++}return t})(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(o){console.log("[RECIPIENTS] Error loading envelope",o),null===(e=this.sdkError)||void 0===e||e.emit(new p(o.message,null===(i=o.response)||void 0===i?void 0:i.status,null===(s=o.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}handleAnother(e){var i;e.preventDefault(),null===(i=this.another)||void 0===i||i.emit({envelope:this.store.state})}handleView(e){var i;e.preventDefault(),null===(i=this.view)||void 0===i||i.emit({envelope:this.store.state})}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.store.state})}copyLink(e){navigator.clipboard.writeText(e).then((()=>d("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENTS] Error copying to clipboard",e),d(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:!0},n(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},this.links={...this.links,[e.role_name]:i.link},this.copyLink(i.link)})).catch((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},console.log("[RECIPIENTS] Error getting link",i),d("Unable to get link: "+i.message,{style:"error"})}))}render(){var e,i;return this.loading?s(o,null):s(o,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},((null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.recipients)||[]).map((e=>{const i=t(this.store.state),o=r(e,i),n=this.links[e.role_name],l=this.gettingLinks[e.role_name];return s("div",{class:"summary-recipient"},s("div",{class:"role-name"},e.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},e.full_name," (",e.email||e.phone,")"),o&&!n&&s("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:l,onClick:()=>this.getLink(e)})),n&&s("div",{class:"link-wrapper"},s("div",{class:"link"},n),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(n)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&s("div",{class:"buttons"},this.canSendAnother&&s("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&s("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};f.style='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%}';export{f as verdocs_envelope_recipient_summary}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-9cf1a627.js";import{V as e}from"./p-0b4ea5f9.js";import"./p-05788c2b.js";import{S as o}from"./p-7a1b2643.js";const n=class{constructor(i){t(this,i),this.authenticated=s(this,"authenticated",7),this.sdkError=s(this,"sdkError",7),this.endpoint=e.getDefault(),this.visible=!0,this.logo="https://verdocs.com/assets/blue-logo.svg",this.isAuthenticated=!1,this.displayMode="login",this.username="",this.password="",this.loggingIn=!1,this.activeSession=null,this.loginError=null}componentWillLoad(){var t,s;this.endpoint.loadSession(),this.endpoint.session?(console.log("[AUTH] Authenticated"),this.isAuthenticated=!0,this.activeSession=this.endpoint.session,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Anonymous"),null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!1,session:null}))}handleLogin(){var t,s;this.loggingIn=!0,(t=this.endpoint,s={username:this.username,password:this.password},t.api.post("/authentication/login",s).then((function(t){return t.data}))).then((t=>{var s;this.loggingIn=!1,this.endpoint.setToken(t.accessToken),this.activeSession=this.endpoint.session,this.isAuthenticated=!0,null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!0,session:this.endpoint.session})})).catch((t=>{var s,i,e,n,l;console.log("[AUTH] Authentication error",t.response,JSON.stringify(t)),this.loggingIn=!1,this.activeSession=null,null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new o(t.message,null===(e=t.response)||void 0===e?void 0:e.status,null===(n=t.response)||void 0===n?void 0:n.data)),403===(null===(l=null==t?void 0:t.response)||void 0===l?void 0:l.status)&&(this.loginError="Please check your username and password and try again.")}))}handleLogout(){var t;this.endpoint.clearSession(),this.isAuthenticated=!1,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null})}handleClearError(){this.loginError=null}render(){return this.visible?this.isAuthenticated?i("div",{class:"status-result"},"Authenticated"):"signup"===this.displayMode?i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.loggingIn})),i("form",{onSubmit:()=>this.handleLogin()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))):i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn})),i("form",{onSubmit:()=>this.handleLogin()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:()=>this.handleClearError()}):i("div",null)):i("div",{style:{display:"none"}},"Authenticated")}};n.style='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';export{n as verdocs_auth}
@@ -1 +0,0 @@
1
- System.register([],(function(n){"use strict";return{execute:function(){var e=undefined&&undefined.__awaiter||function(n,e,t,r){function i(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,o){function u(n){try{c(r.next(n))}catch(n){o(n)}}function a(n){try{c(r["throw"](n))}catch(n){o(n)}}function c(n){n.done?t(n.value):i(n.value).then(u,a)}c((r=r.apply(n,e||[])).next())}))};var t=undefined&&undefined.__generator||function(n,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(e){return c([n,e])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(t=0)),t)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=e.call(n,t)}catch(n){a=[6,n];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var r=function(n,r,i,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,n.api.put("/envelopes/".concat(r,"/recipients/").concat(i),o).then((function(n){return n.data}))]}))}))};var i=n("b",(function(n,e,t){return r(n,e,t,{action:"submit"})}));var o=n("a",(function(n,e,t){return r(n,e,t,{action:"decline"})}));var u=n("e",(function(n,e,t,i){return r(n,e,t,{action:"update",agreed:i})}));var a=n("g",(function(n,e,t){return n.api.get("/envelopes/".concat(e,"/recipients/").concat(encodeURIComponent(t),"?in_person_link=true")).then((function(n){return n.data}))}))}}}));
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?r(e.value):i(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-dc849a58.system.js","./p-4cc5d833.system.js","./p-187b20b7.system.js","./p-b4d11d90.system.js","./p-4ac861c9.system.js"],(function(e){"use strict";var t,r,n,i,s,o,a;return{setters:[function(e){t=e.r;r=e.c;n=e.h;i=e.H},function(){},function(e){s=e.V},function(e){o=e.g},function(e){a=e.S},function(){},function(){}],execute:function(){var l=function(e,t,r){return e.api.post("/templates/".concat(t,"/reminder/"),r).then((function(e){return e.data}))};var d=function(e,t,r,n){return e.api.put("/templates/".concat(t,"/reminder/").concat(r),n).then((function(e){return e.data}))};var c=function(e,t,r){return e.api.delete("/templates/".concat(t,"/reminder/").concat(r)).then((function(e){return e.data}))};var u='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var m=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.sdkError=r(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n,i,s,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("[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]}s=this;return[4,o(this.endpoint,this.templateId,true)];case 1:s.store=d.sent();this.sendReminders=!!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.reminder_id);this.dirty=false;return[3,3];case 2:l=d.sent();console.log("[TEMPLATE REMINDERS] Error loading template",l);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new a(l.message,(n=l.response)===null||n===void 0?void 0:n.status,(i=l.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,r,n;e.stopPropagation();this.sendReminders=!!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.reminder_id);this.dirty=false;(n=this.close)===null||n===void 0?void 0:n.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,i,s,o;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();if(!this.sendReminders)return[3,5];o={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};if(!!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.reminder_id))return[3,2];return[4,l(this.endpoint,this.templateId,o)];case 1:a.sent();return[3,4];case 2:return[4,d(this.endpoint,this.templateId,(n=this.store)===null||n===void 0?void 0:n.state.reminder_id,o)];case 3:a.sent();a.label=4;case 4:return[3,7];case 5:return[4,c(this.endpoint,this.templateId,(i=this.store)===null||i===void 0?void 0:i.state.reminder_id)];case 6:a.sent();a.label=7;case 7:this.dirty=false;(s=this.close)===null||s===void 0?void 0:s.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,r;if(!this.endpoint.session){return n(i,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.isLoaded)){return n(i,{class:"empty"})}return n(i,null,n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("h5",null,"Reminders"),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),n("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.showPlanBlocker=true;t.target.checked=false}})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),n("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),n("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"buttons"},n("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&n("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());m.style=u}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,H as s}from"./p-9cf1a627.js";import{t as n}from"./p-9b73909f.js";import{u as a}from"./p-d869c39c.js";import"./p-05788c2b.js";import{V as o}from"./p-0b4ea5f9.js";import{F as l}from"./p-de60d3a8.js";import{V as c}from"./p-ed416acf.js";import{S as r}from"./p-7a1b2643.js";import{f as d}from"./p-ab01f71e.js";const p={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},v=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.another=i(this,"another",7),this.endpoint=o.getDefault(),this.envelopeId="",this.envelope=null,this.sortedRecipients=[],this.roleNames=[],this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1,this.loading=!0}componentWillLoad(){this.endpoint.loadSession()}async componentWillRender(){var e,i,t;if(this.envelopeId)try{this.envelope=await n(this.endpoint,this.envelopeId),this.sortedRecipients=[...this.envelope.recipients],this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence)),this.roleNames=this.sortedRecipients.map((e=>e.role_name)),this.loading=!1}catch(s){null===(e=this.sdkError)||void 0===e||e.emit(new r(s.message,null===(i=s.response)||void 0===i?void 0:i.status,null===(t=s.response)||void 0===t?void 0:t.data))}else console.error("[SIDEBAR] Missing required envelopeId")}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}canModifyRecipient(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}handleRecipientAction(e,i){var t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":case"modify":case"details":c("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})}prepareHistoryEntries(){const e=[],i=this.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(this.envelope.created_at)}),"complete"===this.envelope.status&&e.push({icon:"pencil",message:"Envelope completed.",date:new Date(this.envelope.updated_at)});const t=i.some((e=>"owner:canceled"===e.event));return"canceled"!==this.envelope.status||t||e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(this.envelope.canceled_at)}),i.forEach((i=>{const t=this.sortedRecipients.find((e=>e.role_name===i.role_name)),s=(null==t?void 0:t.full_name)||"";switch(i.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:`Signed by ${s}.`,date:new Date(i.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:`Declined by ${s}.`,date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":e.push({icon:"visibility",message:`Opened by ${s}, via email.`,date:new Date(i.created_at)});break;case"sms":e.push({icon:"visibility",message:`Opened by ${s}, via SMS.`,date:new Date(i.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:`Opened by ${s}, via In-person link.`,date:new Date(i.created_at)});break;case"in_app":e.push({icon:"visibility",message:`Opened by ${s}, via dashboard.`,date:new Date(i.created_at)});break;default:e.push({icon:"visibility",message:`Opened by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":e.push({icon:"check_circle",message:`Approved by ${s}.`,date:new Date(i.created_at)});break;default:e.push({icon:"send",message:`Submitted by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:prepared":e.push({icon:"send",message:`Prepared by ${s}.`,date:new Date(i.created_at)});break;case"recipient:claimed":"guest"===i.event_detail?e.push({icon:"account_circle",message:`${s} claimed the Verdoc as a guest.`,date:new Date(i.created_at)}):"profile"===i.event_detail&&e.push({icon:"verified_user",message:`${s} claimed the Verdoc as a verified user.`,date:new Date(i.created_at)});break;case"recipient:agreed":e.push({icon:"done",message:`${s} agreed to use electronic records and signatures.`,date:new Date(i.created_at)});break;case"recipient:invited":e.push("sms"===i.event_detail?{icon:"textsms",message:`${s} has been invited via SMS.`,date:new Date(i.created_at)}:{icon:"mail",message:`${s} has been invited via email.`,date:new Date(i.created_at)});break;case"invitation:resent":e.push({icon:"mail",message:`Invitation was resent to ${s} ${"reminder"===i.event_detail?" by reminder":""}.`,date:new Date(i.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:`A copy has been sent to ${s}.`,date:new Date(i.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:`Owner accessed the In-person link for ${t}.`,date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i)}})),e.sort(((e,i)=>i.date.getTime()-e.date.getTime())),e}render(){var e,i,n;if(!this.envelope||this.loading)return t(s,null);const o=this.endpoint.getSession(),c=a(o,this.envelope),r=this.prepareHistoryEntries();return t(s,{class:this.panelOpen?"open":""},t("div",{class:"side-buttons"},t("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),t("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),t("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Details"),t("div",{class:"label"},"Envelope ID"),t("div",{class:"value"},this.envelope.id),t("div",{class:"label"},"Date Created"),t("div",{class:"value"},d(new Date(this.envelope.created_at),l)),t("div",{class:"label"},"Last Modified"),t("div",{class:"value"},d(new Date(this.envelope.updated_at),l)),t("div",{class:"label"},"Status"),t("div",{class:"value"},this.envelope.status),t("div",{class:"label"},"Verdoc Owner ID"),t("div",{class:"value"},this.envelope.profile_id),t("div",{class:"label"},"Verdoc Owner Name"),t("div",{class:"value"},null===(e=this.envelope.profile)||void 0===e?void 0:e.first_name," ",null===(i=this.envelope.profile)||void 0===i?void 0:i.last_name),t("div",{class:"label"},"Verdoc Owner Email"),t("div",{class:"value"},null===(n=this.envelope.profile)||void 0===n?void 0:n.email)),2===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Recipients"),this.sortedRecipients.map(((e,i)=>t("div",{class:"recipient-detail"},t("div",{class:"recipient-header"},t("div",{class:"recipient-number"},i+1),t("div",{class:"recipient-type"},e.role_name),t("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),c&&t("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!this.canResendRecipient(e)},{id:"modify",label:"Modify Recipient",disabled:!this.canModifyRecipient(e)}]})),t("dic",{class:"recipient-content"},t("div",{class:"recipient-name"},e.full_name),t("div",{class:"recipient-name"},e.email),t("div",{class:"recipient-name"},e.phone))))),c&&t("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Manage Recipients",onClick:()=>this.showManageDialog=!0})),3===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"History"),r.map((e=>t("div",{class:"history-entry"},t("div",{class:"activity-icon",innerHTML:p[e.icon]||e.icon}),t("div",{class:"activity-details"},t("div",{class:"activity-text"},e.message),t("div",{class:"activity-date"},d(e.date,l))))))),this.showManageDialog&&t("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:!1,onAnother:()=>{var e;this.showManageDialog=!1,null===(e=this.another)||void 0===e||e.emit({envelope:this.envelope})},onNext:()=>{this.showManageDialog=!1}}))}};v.style='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{v as verdocs_envelope_sidebar}
@@ -1 +0,0 @@
1
- System.register([],(function(e){"use strict";return{execute:function(){e("f",Pe);function t(e){if(e===null||e===true||e===false){return NaN}var t=Number(e);if(isNaN(t)){return t}return t<0?Math.ceil(t):Math.floor(t)}function n(e,t){if(t.length<e){throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}}function r(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){r=function e(t){return typeof t}}else{r=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return r(e)}function a(e){n(1,arguments);var t=Object.prototype.toString.call(e);if(e instanceof Date||r(e)==="object"&&t==="[object Date]"){return new Date(e.getTime())}else if(typeof e==="number"||t==="[object Number]"){return new Date(e)}else{if((typeof e==="string"||t==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function i(e,r){n(2,arguments);var i=a(e).getTime();var o=t(r);return new Date(i+o)}var o={};function u(){return o}function s(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));t.setUTCFullYear(e.getFullYear());return e.getTime()-t.getTime()}function d(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){d=function e(t){return typeof t}}else{d=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return d(e)}function l(e){n(1,arguments);return e instanceof Date||d(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function c(e){n(1,arguments);if(!l(e)&&typeof e!=="number"){return false}var t=a(e);return!isNaN(Number(t))}function f(e,r){n(2,arguments);var a=t(r);return i(e,-a)}var v=864e5;function h(e){n(1,arguments);var t=a(e);var r=t.getTime();t.setUTCMonth(0,1);t.setUTCHours(0,0,0,0);var i=t.getTime();var o=r-i;return Math.floor(o/v)+1}function m(e){n(1,arguments);var t=1;var r=a(e);var i=r.getUTCDay();var o=(i<t?7:0)+i-t;r.setUTCDate(r.getUTCDate()-o);r.setUTCHours(0,0,0,0);return r}function g(e){n(1,arguments);var t=a(e);var r=t.getUTCFullYear();var i=new Date(0);i.setUTCFullYear(r+1,0,4);i.setUTCHours(0,0,0,0);var o=m(i);var u=new Date(0);u.setUTCFullYear(r,0,4);u.setUTCHours(0,0,0,0);var s=m(u);if(t.getTime()>=o.getTime()){return r+1}else if(t.getTime()>=s.getTime()){return r}else{return r-1}}function w(e){n(1,arguments);var t=g(e);var r=new Date(0);r.setUTCFullYear(t,0,4);r.setUTCHours(0,0,0,0);var a=m(r);return a}var b=6048e5;function y(e){n(1,arguments);var t=a(e);var r=m(t).getTime()-w(t).getTime();return Math.round(r/b)+1}function p(e,r){var i,o,s,d,l,c,f,v;n(1,arguments);var h=u();var m=t((i=(o=(s=(d=r===null||r===void 0?void 0:r.weekStartsOn)!==null&&d!==void 0?d:r===null||r===void 0?void 0:(l=r.locale)===null||l===void 0?void 0:(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&s!==void 0?s:h.weekStartsOn)!==null&&o!==void 0?o:(f=h.locale)===null||f===void 0?void 0:(v=f.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&i!==void 0?i:0);if(!(m>=0&&m<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var g=a(e);var w=g.getUTCDay();var b=(w<m?7:0)+w-m;g.setUTCDate(g.getUTCDate()-b);g.setUTCHours(0,0,0,0);return g}function T(e,r){var i,o,s,d,l,c,f,v;n(1,arguments);var h=a(e);var m=h.getUTCFullYear();var g=u();var w=t((i=(o=(s=(d=r===null||r===void 0?void 0:r.firstWeekContainsDate)!==null&&d!==void 0?d:r===null||r===void 0?void 0:(l=r.locale)===null||l===void 0?void 0:(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:g.firstWeekContainsDate)!==null&&o!==void 0?o:(f=g.locale)===null||f===void 0?void 0:(v=f.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(w>=1&&w<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var b=new Date(0);b.setUTCFullYear(m+1,0,w);b.setUTCHours(0,0,0,0);var y=p(b,r);var T=new Date(0);T.setUTCFullYear(m,0,w);T.setUTCHours(0,0,0,0);var M=p(T,r);if(h.getTime()>=y.getTime()){return m+1}else if(h.getTime()>=M.getTime()){return m}else{return m-1}}function M(e,r){var a,i,o,s,d,l,c,f;n(1,arguments);var v=u();var h=t((a=(i=(o=(s=r===null||r===void 0?void 0:r.firstWeekContainsDate)!==null&&s!==void 0?s:r===null||r===void 0?void 0:(d=r.locale)===null||d===void 0?void 0:(l=d.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&o!==void 0?o:v.firstWeekContainsDate)!==null&&i!==void 0?i:(c=v.locale)===null||c===void 0?void 0:(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);var m=T(e,r);var g=new Date(0);g.setUTCFullYear(m,0,h);g.setUTCHours(0,0,0,0);var w=p(g,r);return w}var C=6048e5;function D(e,t){n(1,arguments);var r=a(e);var i=p(r,t).getTime()-M(r,t).getTime();return Math.round(i/C)+1}function S(e,t){var n=e<0?"-":"";var r=Math.abs(e).toString();while(r.length<t){r="0"+r}return n+r}var x={y:function e(t,n){var r=t.getUTCFullYear();var a=r>0?r:1-r;return S(n==="yy"?a%100:a,n.length)},M:function e(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):S(r+1,2)},d:function e(t,n){return S(t.getUTCDate(),n.length)},a:function e(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function e(t,n){return S(t.getUTCHours()%12||12,n.length)},H:function e(t,n){return S(t.getUTCHours(),n.length)},m:function e(t,n){return S(t.getUTCMinutes(),n.length)},s:function e(t,n){return S(t.getUTCSeconds(),n.length)},S:function e(t,n){var r=n.length;var a=t.getUTCMilliseconds();var i=Math.floor(a*Math.pow(10,r-3));return S(i,n.length)}};var k={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};var P={G:function e(t,n,r){var a=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function e(t,n,r){if(n==="yo"){var a=t.getUTCFullYear();var i=a>0?a:1-a;return r.ordinalNumber(i,{unit:"year"})}return x.y(t,n)},Y:function e(t,n,r,a){var i=T(t,a);var o=i>0?i:1-i;if(n==="YY"){var u=o%100;return S(u,2)}if(n==="Yo"){return r.ordinalNumber(o,{unit:"year"})}return S(o,n.length)},R:function e(t,n){var r=g(t);return S(r,n.length)},u:function e(t,n){var r=t.getUTCFullYear();return S(r,n.length)},Q:function e(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return S(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function e(t,n,r){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return S(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function e(t,n,r){var a=t.getUTCMonth();switch(n){case"M":case"MM":return x.M(t,n);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function e(t,n,r){var a=t.getUTCMonth();switch(n){case"L":return String(a+1);case"LL":return S(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function e(t,n,r,a){var i=D(t,a);if(n==="wo"){return r.ordinalNumber(i,{unit:"week"})}return S(i,n.length)},I:function e(t,n,r){var a=y(t);if(n==="Io"){return r.ordinalNumber(a,{unit:"week"})}return S(a,n.length)},d:function e(t,n,r){if(n==="do"){return r.ordinalNumber(t.getUTCDate(),{unit:"date"})}return x.d(t,n)},D:function e(t,n,r){var a=h(t);if(n==="Do"){return r.ordinalNumber(a,{unit:"dayOfYear"})}return S(a,n.length)},E:function e(t,n,r){var a=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function e(t,n,r,a){var i=t.getUTCDay();var o=(i-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(o);case"ee":return S(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function e(t,n,r,a){var i=t.getUTCDay();var o=(i-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(o);case"cc":return S(o,n.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function e(t,n,r){var a=t.getUTCDay();var i=a===0?7:a;switch(n){case"i":return String(i);case"ii":return S(i,n.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function e(t,n,r){var a=t.getUTCHours();var i=a/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function e(t,n,r){var a=t.getUTCHours();var i;if(a===12){i=k.noon}else if(a===0){i=k.midnight}else{i=a/12>=1?"pm":"am"}switch(n){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function e(t,n,r){var a=t.getUTCHours();var i;if(a>=17){i=k.evening}else if(a>=12){i=k.afternoon}else if(a>=4){i=k.morning}else{i=k.night}switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function e(t,n,r){if(n==="ho"){var a=t.getUTCHours()%12;if(a===0)a=12;return r.ordinalNumber(a,{unit:"hour"})}return x.h(t,n)},H:function e(t,n,r){if(n==="Ho"){return r.ordinalNumber(t.getUTCHours(),{unit:"hour"})}return x.H(t,n)},K:function e(t,n,r){var a=t.getUTCHours()%12;if(n==="Ko"){return r.ordinalNumber(a,{unit:"hour"})}return S(a,n.length)},k:function e(t,n,r){var a=t.getUTCHours();if(a===0)a=24;if(n==="ko"){return r.ordinalNumber(a,{unit:"hour"})}return S(a,n.length)},m:function e(t,n,r){if(n==="mo"){return r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"})}return x.m(t,n)},s:function e(t,n,r){if(n==="so"){return r.ordinalNumber(t.getUTCSeconds(),{unit:"second"})}return x.s(t,n)},S:function e(t,n){return x.S(t,n)},X:function e(t,n,r,a){var i=a._originalDate||t;var o=i.getTimezoneOffset();if(o===0){return"Z"}switch(n){case"X":return W(o);case"XXXX":case"XX":return Y(o);case"XXXXX":case"XXX":default:return Y(o,":")}},x:function e(t,n,r,a){var i=a._originalDate||t;var o=i.getTimezoneOffset();switch(n){case"x":return W(o);case"xxxx":case"xx":return Y(o);case"xxxxx":case"xxx":default:return Y(o,":")}},O:function e(t,n,r,a){var i=a._originalDate||t;var o=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+U(o,":");case"OOOO":default:return"GMT"+Y(o,":")}},z:function e(t,n,r,a){var i=a._originalDate||t;var o=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+U(o,":");case"zzzz":default:return"GMT"+Y(o,":")}},t:function e(t,n,r,a){var i=a._originalDate||t;var o=Math.floor(i.getTime()/1e3);return S(o,n.length)},T:function e(t,n,r,a){var i=a._originalDate||t;var o=i.getTime();return S(o,n.length)}};function U(e,t){var n=e>0?"-":"+";var r=Math.abs(e);var a=Math.floor(r/60);var i=r%60;if(i===0){return n+String(a)}var o=t||"";return n+String(a)+o+S(i,2)}function W(e,t){if(e%60===0){var n=e>0?"-":"+";return n+S(Math.abs(e)/60,2)}return Y(e,t)}function Y(e,t){var n=t||"";var r=e>0?"-":"+";var a=Math.abs(e);var i=S(Math.floor(a/60),2);var o=S(a%60,2);return r+i+n+o}var E=function e(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}};var O=function e(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}};var N=function e(t,n){var r=t.match(/(P+)(p+)?/)||[];var a=r[1];var i=r[2];if(!i){return E(t,n)}var o;switch(a){case"P":o=n.dateTime({width:"short"});break;case"PP":o=n.dateTime({width:"medium"});break;case"PPP":o=n.dateTime({width:"long"});break;case"PPPP":default:o=n.dateTime({width:"full"});break}return o.replace("{{date}}",E(a,n)).replace("{{time}}",O(i,n))};var q={p:O,P:N};var H=["D","DD"];var z=["YY","YYYY"];function F(e){return H.indexOf(e)!==-1}function L(e){return z.indexOf(e)!==-1}function X(e,t,n){if(e==="YYYY"){throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="YY"){throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="D"){throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="DD"){throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}}var j={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var Q=function e(t,n,r){var a;var i=j[t];if(typeof i==="string"){a=i}else if(n===1){a=i.one}else{a=i.other.replace("{{count}}",n.toString())}if(r!==null&&r!==void 0&&r.addSuffix){if(r.comparison&&r.comparison>0){return"in "+a}else{return a+" ago"}}return a};function G(e){return function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=t.width?String(t.width):e.defaultWidth;var r=e.formats[n]||e.formats[e.defaultWidth];return r}}var B={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"};var A={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"};var R={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};var J={date:G({formats:B,defaultWidth:"full"}),time:G({formats:A,defaultWidth:"full"}),dateTime:G({formats:R,defaultWidth:"full"})};var _={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var I=function e(t,n,r,a){return _[t]};function V(e){return function(t,n){var r=n!==null&&n!==void 0&&n.context?String(n.context):"standalone";var a;if(r==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth;var o=n!==null&&n!==void 0&&n.width?String(n.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var u=e.defaultWidth;var s=n!==null&&n!==void 0&&n.width?String(n.width):e.defaultWidth;a=e.values[s]||e.values[u]}var d=e.argumentCallback?e.argumentCallback(t):t;return a[d]}}var K={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]};var $={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]};var Z={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]};var ee={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};var te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}};var ne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};var re=function e(t,n){var r=Number(t);var a=r%100;if(a>20||a<10){switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}}return r+"th"};var ae={ordinalNumber:re,era:V({values:K,defaultWidth:"wide"}),quarter:V({values:$,defaultWidth:"wide",argumentCallback:function e(t){return t-1}}),month:V({values:Z,defaultWidth:"wide"}),day:V({values:ee,defaultWidth:"wide"}),dayPeriod:V({values:te,defaultWidth:"wide",formattingValues:ne,defaultFormattingWidth:"wide"})};function ie(e){return function(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=n.width;var a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth];var i=t.match(a);if(!i){return null}var o=i[0];var u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth];var s=Array.isArray(u)?ue(u,(function(e){return e.test(o)})):oe(u,(function(e){return e.test(o)}));var d;d=e.valueCallback?e.valueCallback(s):s;d=n.valueCallback?n.valueCallback(d):d;var l=t.slice(o.length);return{value:d,rest:l}}}function oe(e,t){for(var n in e){if(e.hasOwnProperty(n)&&t(e[n])){return n}}return undefined}function ue(e,t){for(var n=0;n<e.length;n++){if(t(e[n])){return n}}return undefined}function se(e){return function(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=t.match(e.matchPattern);if(!r)return null;var a=r[0];var i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;var u=t.slice(a.length);return{value:o,rest:u}}}var de=/^(\d+)(th|st|nd|rd)?/i;var le=/\d+/i;var ce={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i};var fe={any:[/^b/i,/^(a|c)/i]};var ve={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i};var he={any:[/1/i,/2/i,/3/i,/4/i]};var me={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i};var ge={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]};var we={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i};var be={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]};var ye={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i};var pe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};var Te={ordinalNumber:se({matchPattern:de,parsePattern:le,valueCallback:function e(t){return parseInt(t,10)}}),era:ie({matchPatterns:ce,defaultMatchWidth:"wide",parsePatterns:fe,defaultParseWidth:"any"}),quarter:ie({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:he,defaultParseWidth:"any",valueCallback:function e(t){return t+1}}),month:ie({matchPatterns:me,defaultMatchWidth:"wide",parsePatterns:ge,defaultParseWidth:"any"}),day:ie({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:be,defaultParseWidth:"any"}),dayPeriod:ie({matchPatterns:ye,defaultMatchWidth:"any",parsePatterns:pe,defaultParseWidth:"any"})};var Me={code:"en-US",formatDistance:Q,formatLong:J,formatRelative:I,localize:ae,match:Te,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Ce=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;var De=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;var Se=/^'([^]*?)'?$/;var xe=/''/g;var ke=/[a-zA-Z]/;function Pe(e,r,i){var o,d,l,v,h,m,g,w,b,y,p,T,M,C,D,S,x,k;n(2,arguments);var U=String(r);var W=u();var Y=(o=(d=i===null||i===void 0?void 0:i.locale)!==null&&d!==void 0?d:W.locale)!==null&&o!==void 0?o:Me;var E=t((l=(v=(h=(m=i===null||i===void 0?void 0:i.firstWeekContainsDate)!==null&&m!==void 0?m:i===null||i===void 0?void 0:(g=i.locale)===null||g===void 0?void 0:(w=g.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&h!==void 0?h:W.firstWeekContainsDate)!==null&&v!==void 0?v:(b=W.locale)===null||b===void 0?void 0:(y=b.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(E>=1&&E<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var O=t((p=(T=(M=(C=i===null||i===void 0?void 0:i.weekStartsOn)!==null&&C!==void 0?C:i===null||i===void 0?void 0:(D=i.locale)===null||D===void 0?void 0:(S=D.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&M!==void 0?M:W.weekStartsOn)!==null&&T!==void 0?T:(x=W.locale)===null||x===void 0?void 0:(k=x.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&p!==void 0?p:0);if(!(O>=0&&O<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}if(!Y.localize){throw new RangeError("locale must contain localize property")}if(!Y.formatLong){throw new RangeError("locale must contain formatLong property")}var N=a(e);if(!c(N)){throw new RangeError("Invalid time value")}var H=s(N);var z=f(N,H);var j={firstWeekContainsDate:E,weekStartsOn:O,locale:Y,_originalDate:N};var Q=U.match(De).map((function(e){var t=e[0];if(t==="p"||t==="P"){var n=q[t];return n(e,Y.formatLong)}return e})).join("").match(Ce).map((function(t){if(t==="''"){return"'"}var n=t[0];if(n==="'"){return Ue(t)}var a=P[n];if(a){if(!(i!==null&&i!==void 0&&i.useAdditionalWeekYearTokens)&&L(t)){X(t,r,String(e))}if(!(i!==null&&i!==void 0&&i.useAdditionalDayOfYearTokens)&&F(t)){X(t,r,String(e))}return a(z,t,Y.localize,j)}if(n.match(ke)){throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`")}return t})).join("");return Q}function Ue(e){var t=e.match(Se);if(!t){return e}return t[1].replace(xe,"'")}}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s,a as o}from"./p-9cf1a627.js";import{i as r}from"./p-0d28cf05.js";import{g as n}from"./p-6de76553.js";import{g as l}from"./p-73155c52.js";import{u as d}from"./p-feb442b1.js";import"./p-05788c2b.js";import{V as a}from"./p-0b4ea5f9.js";import"./p-eab67c09.js";import"./p-9b73909f.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-ab01f71e.js";const h=class{constructor(i){e(this,i),this.settingsChanged=t(this,"settingsChanged",7),this.deleted=t(this,"deleted",7),this.endpoint=a.getDefault(),this.templateid="",this.field=null,this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.rerender=0}async focusField(){this.inputEl.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.showPanel&&e.showPanel()}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.hidePanel&&e.hidePanel()}componentDidRender(){r.dynamicDrop(!0),this.editable&&r(this.el).resizable({edges:{top:!1,bottom:!1,left:!0,right:!0},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}handleResizeStart(e){e.preventDefault(),e.stopPropagation()}handleResize(e){console.log("resize",e);const t=+(e.target.getAttribute("resizeX")||0),i=+(e.target.getAttribute("resizeY")||0),s=e.dx+t,o=e.dy+i;this.el.style.width=`${parseFloat(this.el.style.width||"0")+e.dx}px`,e.target.setAttribute("resizeX",s),e.target.setAttribute("resizeY",o)}handleResizeEnd(e){console.log("resizeEnd",e);const t=+(e.target.getAttribute("resizeX")||0),i=(l(this.field).width||150)+t,s={...l(this.field),width:Math.round(i)};delete s.result,d(this.endpoint,this.templateid,this.field.name,{setting:s}).then((()=>{var e;return null===(e=this.settingsChanged)||void 0===e?void 0:e.emit({fieldName:this.field.name,settings:s})})).catch((e=>console.log("Field update failed",e)))}render(){var e,t,o,r;const d=l(this.field);let a=null!==(t=null!==(e=this.disabled)&&void 0!==e?e:d.disabled)&&void 0!==t&&t;const h=this.field.rgba||n(this.roleindex),p=(null==d?void 0:d.result)||"",c=(d.width||150)/5;return this.done?i(s,{class:{done:this.done}},p):i(s,{class:{required:null===(o=this.field)||void 0===o?void 0:o.required,disabled:a,done:this.done},style:{backgroundColor:h}},i("input",{type:"text",name:this.field.name,placeholder:null==d?void 0:d.placeholder,tabIndex:null==d?void 0:d.order,value:p,disabled:a,required:null===(r=this.field)||void 0===r?void 0:r.required,ref:e=>this.inputEl=e,maxlength:c}),this.editable&&i("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>',id:`verdocs-settings-panel-${this.field.name}`},i("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;return null===(e=this.deleted)||void 0===e||e.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:e=>{var t;return null===(t=this.settingsChanged)||void 0===t||t.emit(e.detail),this.hideSettingsPanel()},helpText:'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.'})))}get el(){return o(this)}};h.style='verdocs-field-textbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;width:150px;height:15px;display:block;font-size:11px;position:relative;letter-spacing:-0.2px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox.disabled{opacity:0.5}verdocs-field-textbox input{width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.required{border:1px solid #cc0000}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}';export{h as verdocs_field_textbox}
@@ -1 +0,0 @@
1
- System.register(["./p-934a39b4.system.js","./p-5e0c6e7c.system.js"],(function(e){"use strict";var t,o,i,n;return{setters:[function(e){t=e.r;o=e.h;i=e.H},function(e){n=e.c}],execute:function(){var r='@charset "UTF-8";verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';var s=e("verdocs_checkbox",function(){function e(e){t(this,e);this.checked=false;this.name="";this.label="";this.value="";this.theme="light";this.disabled=false}e.prototype.render=function(){var e;return o(i,{class:(e={disabled:this.disabled},e[this.theme]=true,e)},o("label",null,o("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),o("span",null,this.label)))};return e}());s.style=r;var c='verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';var a=e("verdocs_component_error",function(){function e(e){t(this,e);this.message=""}e.prototype.render=function(){return o(i,null,o("div",{class:"inner"},this.message))};return e}());a.style=c;var l='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';var p='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';var d=e("verdocs_help_icon",function(){function e(e){t(this,e);this.text="";this.containerId="verdocs-help-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=n(this.icon,this.tooltip,{})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(i,{class:{}},o("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:p,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.icon=t}}),o("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:function(t){return e.tooltip=t}},this.text,o("div",{"data-popper-arrow":"true",class:"arrow"})))};return e}());d.style=l;var h='verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';var b=e("verdocs_text_input",function(){function e(e){t(this,e);this.value="";this.label="";this.placeholder="";this.autocomplete="";this.helpText="";this.type="text";this.disabled=false}e.prototype.render=function(){return o(i,{class:"input-field"},o("label",null,this.label&&o("div",{class:"input-label"},this.label+":"),o("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&o("verdocs-help-icon",{text:this.helpText})))};return e}());b.style=h}}}));