@verdocs/web-sdk 1.14.9 → 1.14.11

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 (174) 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-dropdown_2.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +15 -91
  8. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +101 -45
  9. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -2
  10. package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
  14. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +27 -19
  17. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +26 -17
  18. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
  19. package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  22. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
  23. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
  24. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +10 -0
  26. package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
  27. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  28. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.css +8 -0
  29. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +101 -48
  30. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.js +1 -1
  31. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +61 -17
  32. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +60 -15
  33. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +1 -1
  34. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.css +2 -1
  35. package/dist/components/Envelopes.js +1 -1
  36. package/dist/components/Recipients.js +9 -1
  37. package/dist/components/index2.js +63 -219
  38. package/dist/components/verdocs-envelope-document-page2.js +1 -1
  39. package/dist/components/verdocs-envelope-recipient-summary2.js +2 -2
  40. package/dist/components/verdocs-envelope-sidebar.js +112 -54
  41. package/dist/components/verdocs-field-textarea.js +27 -17
  42. package/dist/components/verdocs-field-textbox.js +26 -15
  43. package/dist/components/verdocs-template-reminders.js +10 -0
  44. package/dist/components/verdocs-template-roles2.js +1 -1
  45. package/dist/components/verdocs-view2.js +1 -1
  46. package/dist/docs.json +80 -3
  47. package/dist/esm/EnvelopeStore-28f5d8f5.js +81 -0
  48. package/dist/esm/{Envelopes-c3d471e5.js → Envelopes-105a4a8f.js} +1 -1
  49. package/dist/esm/{Recipients-198b2531.js → Recipients-4ec2138c.js} +9 -1
  50. package/dist/esm/{index-d264c496.js → index-914ed6f7.js} +63 -219
  51. package/dist/esm/loader.js +1 -1
  52. package/dist/esm/{utils-9da23ba1.js → utils-60683446.js} +2 -2
  53. package/dist/esm/verdocs-dropdown_2.entry.js +3 -3
  54. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +4 -80
  55. package/dist/esm/verdocs-envelope-sidebar.entry.js +102 -46
  56. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  57. package/dist/esm/verdocs-field-date.entry.js +3 -3
  58. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  59. package/dist/esm/verdocs-field-initial.entry.js +3 -3
  60. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  61. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  62. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  63. package/dist/esm/verdocs-field-textarea.entry.js +28 -20
  64. package/dist/esm/verdocs-field-textbox.entry.js +27 -18
  65. package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
  66. package/dist/esm/verdocs-organization-card.entry.js +1 -1
  67. package/dist/esm/verdocs-preview.entry.js +3 -3
  68. package/dist/esm/verdocs-send.entry.js +3 -3
  69. package/dist/esm/verdocs-sign.entry.js +4 -4
  70. package/dist/esm/verdocs-template-document-page_2.entry.js +3 -3
  71. package/dist/esm/verdocs-template-fields_4.entry.js +4 -4
  72. package/dist/esm/verdocs-template-reminders.entry.js +10 -0
  73. package/dist/esm/verdocs-view.entry.js +3 -3
  74. package/dist/esm/verdocs-web-sdk.js +1 -1
  75. package/dist/esm-es5/EnvelopeStore-28f5d8f5.js +1 -0
  76. package/dist/esm-es5/{Envelopes-c3d471e5.js → Envelopes-105a4a8f.js} +1 -1
  77. package/dist/esm-es5/Recipients-4ec2138c.js +1 -0
  78. package/dist/esm-es5/index-914ed6f7.js +1 -0
  79. package/dist/esm-es5/loader.js +1 -1
  80. package/dist/esm-es5/{utils-9da23ba1.js → utils-60683446.js} +1 -1
  81. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  89. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  90. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  91. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  92. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  93. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  94. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  95. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  96. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  97. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  98. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  99. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  100. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  102. package/dist/types/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +7 -5
  103. package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +8 -0
  104. package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +8 -0
  105. package/dist/types/components.d.ts +32 -0
  106. package/dist/verdocs-web-sdk/{p-4a39c1a4.system.entry.js → p-02a70b8e.system.entry.js} +1 -1
  107. package/dist/verdocs-web-sdk/{p-eb3beb29.system.entry.js → p-095a3eba.system.entry.js} +1 -1
  108. package/dist/verdocs-web-sdk/{p-592e9e12.entry.js → p-0aee25b9.entry.js} +1 -1
  109. package/dist/verdocs-web-sdk/p-0e381c36.entry.js +1 -0
  110. package/dist/verdocs-web-sdk/p-13959c36.system.entry.js +1 -0
  111. package/dist/verdocs-web-sdk/p-18ee4fd5.js +1 -0
  112. package/dist/verdocs-web-sdk/{p-886461cd.system.entry.js → p-1a0cccea.system.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  114. package/dist/verdocs-web-sdk/{p-2cf70fcd.entry.js → p-1f561c42.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-afe91637.system.entry.js → p-2c0d7838.system.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-74dd0569.entry.js → p-33640d84.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-7b215f9d.system.entry.js → p-380efff2.system.entry.js} +1 -1
  118. package/dist/verdocs-web-sdk/p-3cd894ff.js +1 -0
  119. package/dist/verdocs-web-sdk/{p-aebd2d02.system.entry.js → p-3fe24d0c.system.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/p-44ec0583.entry.js +1 -0
  121. package/dist/verdocs-web-sdk/{p-2631bdd9.entry.js → p-49b3ac56.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/p-4a3b037b.system.entry.js +1 -0
  123. package/dist/verdocs-web-sdk/p-5cff98bd.entry.js +1 -0
  124. package/dist/verdocs-web-sdk/{p-1402ff01.system.entry.js → p-6a44fb56.system.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-cfec9914.entry.js → p-717c9fe1.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-e7da2f5c.entry.js → p-73ea1ea3.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/{p-b898c99b.system.entry.js → p-7850f739.system.entry.js} +1 -1
  128. package/dist/verdocs-web-sdk/p-7a23c2c8.system.js +1 -0
  129. package/dist/verdocs-web-sdk/{p-7baf2c02.system.entry.js → p-813c2fae.system.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-00f8400e.system.entry.js → p-8c5ffa7b.system.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/{p-38ac3807.entry.js → p-8e386265.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-973ebb54.system.js → p-8fd812f4.system.js} +1 -1
  133. package/dist/verdocs-web-sdk/p-94365585.entry.js +1 -0
  134. package/dist/verdocs-web-sdk/{p-b8d94f4c.system.entry.js → p-9c87f6f8.system.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/p-9d7fa51d.system.entry.js +1 -0
  136. package/dist/verdocs-web-sdk/p-a3c06b62.entry.js +1 -0
  137. package/dist/verdocs-web-sdk/{p-10fe89ab.entry.js → p-a4cbba4a.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/p-a6e5814e.entry.js +1 -0
  139. package/dist/verdocs-web-sdk/{p-ee53ee29.system.entry.js → p-afa1f20b.system.entry.js} +1 -1
  140. package/dist/verdocs-web-sdk/{p-b00a49aa.entry.js → p-be6d3848.entry.js} +1 -1
  141. package/dist/verdocs-web-sdk/p-c220af42.js +1 -0
  142. package/dist/verdocs-web-sdk/{p-c0b1ace5.entry.js → p-c3ef7b4f.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/{p-9b73909f.js → p-cf790f4f.js} +1 -1
  144. package/dist/verdocs-web-sdk/{p-7dda316b.entry.js → p-d4c8f358.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/p-dc9c4361.system.js +1 -0
  146. package/dist/verdocs-web-sdk/{p-64897a63.entry.js → p-decf6a56.entry.js} +1 -1
  147. package/dist/verdocs-web-sdk/p-e2635788.system.entry.js +1 -0
  148. package/dist/verdocs-web-sdk/{p-f1940c85.system.entry.js → p-e727af9c.system.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-d146b48e.entry.js → p-e72c075e.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/p-eaf0b189.system.js +1 -0
  151. package/dist/verdocs-web-sdk/{p-ca2ed07e.system.entry.js → p-f0db17e6.system.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-10444734.system.entry.js → p-f2b225b7.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-73155c52.js → p-f9bea98a.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-da31f940.system.js → p-fa6b1145.system.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-05fc6555.system.entry.js → p-fcfd3193.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-4dec0879.entry.js → p-fdda1309.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  158. package/package.json +5 -5
  159. package/dist/esm-es5/Recipients-198b2531.js +0 -1
  160. package/dist/esm-es5/index-d264c496.js +0 -1
  161. package/dist/verdocs-web-sdk/p-10ec9a96.entry.js +0 -1
  162. package/dist/verdocs-web-sdk/p-12e54f39.js +0 -1
  163. package/dist/verdocs-web-sdk/p-23292d40.system.entry.js +0 -1
  164. package/dist/verdocs-web-sdk/p-3601cc11.entry.js +0 -1
  165. package/dist/verdocs-web-sdk/p-381f2a5f.entry.js +0 -1
  166. package/dist/verdocs-web-sdk/p-48d71927.system.entry.js +0 -1
  167. package/dist/verdocs-web-sdk/p-494d4276.system.js +0 -1
  168. package/dist/verdocs-web-sdk/p-4d1f3ddb.entry.js +0 -1
  169. package/dist/verdocs-web-sdk/p-51a3ea62.system.js +0 -1
  170. package/dist/verdocs-web-sdk/p-9c87a748.system.entry.js +0 -1
  171. package/dist/verdocs-web-sdk/p-ab01f71e.js +0 -1
  172. package/dist/verdocs-web-sdk/p-c2e75693.entry.js +0 -1
  173. package/dist/verdocs-web-sdk/p-e4ab3dfc.system.entry.js +0 -1
  174. package/dist/verdocs-web-sdk/p-e5f44611.entry.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/web-sdk",
3
- "version": "1.14.9",
3
+ "version": "1.14.11",
4
4
  "private": false,
5
5
  "description": "Verdocs Web SDK",
6
6
  "license": "MIT",
@@ -33,8 +33,8 @@
33
33
  "@stencil/core": "2.20.0",
34
34
  "@stencil/store": "^2.0.4",
35
35
  "@svgdotjs/svg.js": "^3.1.2",
36
- "@verdocs/js-sdk": "^3.6.6",
37
- "date-fns": "^2.29.3",
36
+ "@verdocs/js-sdk": "^3.6.7",
37
+ "date-fns": "^2.30.0",
38
38
  "flatpickr": "^4.6.13",
39
39
  "interactjs": "^1.10.17",
40
40
  "jszip": "^3.10.1",
@@ -65,9 +65,9 @@
65
65
  "jest": "^29.5.0",
66
66
  "jest-cli": "^29.5.0",
67
67
  "jest-svg-transformer": "^1.0.0",
68
- "lit-html": "^2.7.0",
68
+ "lit-html": "^2.7.4",
69
69
  "postinstall-postinstall": "^2.1.0",
70
- "prettier": "^2.8.7",
70
+ "prettier": "^2.8.8",
71
71
  "puppeteer": "^16.2.0",
72
72
  "react": "^18.2.0",
73
73
  "react-dom": "^18.2.0",
@@ -1 +0,0 @@
1
- var __awaiter=undefined&&undefined.__awaiter||function(e,n,t,r){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function u(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?t(e.value):i(e.value).then(a,u)}c((r=r.apply(e,n||[])).next())}))};var __generator=undefined&&undefined.__generator||function(e,n){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(n){return c([e,n])}}function c(u){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(t=0)),t)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;i=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){t.label=u[1];break}if(u[0]===6&&t.label<o[1]){t.label=o[1];o=u;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(u);break}if(o[2])t.ops.pop();t.trys.pop();continue}u=n.call(e,t)}catch(e){u=[6,e];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var updateRecipient=function(e,n,t,r){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){return[2,e.api.put("/envelopes/".concat(n,"/recipients/").concat(t),r).then((function(e){return e.data}))]}))}))};var envelopeRecipientSubmit=function(e,n,t){return updateRecipient(e,n,t,{action:"submit"})};var envelopeRecipientDecline=function(e,n,t){return updateRecipient(e,n,t,{action:"decline"})};var envelopeRecipientAgree=function(e,n,t,r){return updateRecipient(e,n,t,{action:"update",agreed:r})};var getInPersonLink=function(e,n,t){return e.api.get("/envelopes/".concat(n,"/recipients/").concat(encodeURIComponent(t),"?in_person_link=true")).then((function(e){return e.data}))};export{envelopeRecipientDecline as a,envelopeRecipientSubmit as b,envelopeRecipientAgree as e,getInPersonLink as g};
@@ -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
- 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
- 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 t,h as i,H as o,F as s,a as l}from"./p-9cf1a627.js";import{i as a}from"./p-0d28cf05.js";import"./p-05788c2b.js";import{u as r,c as n}from"./p-feb442b1.js";import{V as d,T as p}from"./p-0b4ea5f9.js";import{i as c}from"./p-7291906c.js";import{a as h,r as v,e as m,f as u,h as f}from"./p-73155c52.js";import{g,a as x}from"./p-4b65e2f3.js";import{S as b}from"./p-7a1b2643.js";import{g as w}from"./p-6de76553.js";import{u as y}from"./p-822ba467.js";import"./p-eab67c09.js";import"./p-9b73909f.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-ab01f71e.js";import"./p-790beec1.js";var k=function(e,t,i,o){return e.api.put("/templates/".concat(t,"/roles/").concat(i),o).then((function(e){return e.data}))};const q='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>',C=[{id:"signature",tooltip:"Signature",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>'},{id:"initial",tooltip:"Initials",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>'},{id:"sep1",tooltip:"",icon:q},{id:"textbox",tooltip:"Text Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>'},{id:"textarea",tooltip:"Text Area",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>'},{id:"checkbox_group",tooltip:"Check Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>'},{id:"radio_button_group",tooltip:"Radio Button",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>'},{id:"dropdown",tooltip:"Dropdown",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>'},{id:"sep2",tooltip:"",icon:q},{id:"date",tooltip:"Date",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>'},{id:"timestamp",tooltip:"Timestamp",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>'}],E=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.pageHeights={},this.store=null,this.cachedPageInfo={},this.endpoint=d.getDefault(),this.templateId=null,this.toolbarTargetId=null,this.placing=null,this.showMustSelectRole=!1,this.selectedRoleName="",this.rerender=1}async componentWillLoad(){var e,t,i,o,s,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELDS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[FIELDS] Unable to start builder session, must be authenticated");this.store=await g(this.endpoint,this.templateId,!0),console.log(`[FIELDS] Loaded template ${this.templateId}`,this.store.state),this.selectedRoleName=(null===(o=null===(i=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name)||"",console.log("[FIELDS] Starting with role",this.selectedRoleName)}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new b(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}componentDidRender(){a.dynamicDrop(!0);const e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null,t=document.getElementById("verdocs-template-fields-toolbar");e&&t&&(console.log("[FIELDS] Moving toolbar"),t.remove(),e.append(t))}componentWillUpdate(){var e,t,i,o,s,l;this.selectedRoleName&&((null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||[]).find((e=>e.name===this.selectedRoleName))||(this.selectedRoleName=(null===(l=null===(s=null===(o=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===o?void 0:o.roles)||void 0===s?void 0:s[0])||void 0===l?void 0:l.name)||"",console.log("[FIELDS] Selected new role",this.selectedRoleName))}handleKeyDown(e){"Escape"===e.key&&(this.placing=null)}async handleFieldChange(e,t,i){console.log("[FIELDS] handleFieldChange",e,t,i),this.rerender++}attachFieldAttributes(e,t,i,o){o.addEventListener("input",(e=>this.handleFieldChange(t,e))),o.addEventListener("settingsChanged",(s=>{var l,a,r,n;console.log("[FIELDS] settingsChanged",s.detail),Object.assign(t.setting,s.detail.settings),this.selectedRoleName=t.role_name,o.setAttribute("roleindex",h(x(this.store),t.role_name)),o.field=null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.fields.find((e=>e.name===t.name)),this.rerender++,o.setAttribute("rerender",this.rerender),null===(r=this.templateUpdated)||void 0===r||r.emit({endpoint:this.endpoint,template:null===(n=this.store)||void 0===n?void 0:n.state,event:"updated-field"}),console.log("[FIELDS] Re-rendering field",t.name,e.pageNumber),this.reRenderField(t,e.pageNumber),v(t,e,i,{disabled:!0,editable:!0,draggable:!0})})),o.addEventListener("deleted",(()=>{var e,i;console.log("deleted",this,t),o.remove(),this.rerender++,null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:null===(i=this.store)||void 0===i?void 0:i.state,event:"updated-field"})})),o.setAttribute("templateid",this.templateId),o.setAttribute("roleindex",i),o.setAttribute("pageNumber",e.pageNumber),o.setAttribute("xScale",e.xScale),o.setAttribute("yScale",e.yScale),o.setAttribute("name",t.name)}handlePageRendered(e){var t;const i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i),this.cachedPageInfo[i.pageNumber]=i,this.pageHeights[i.pageNumber]=i.naturalHeight,(null===(t=this.store)||void 0===t?void 0:t.state.fields.filter((e=>e.page_sequence===i.pageNumber))).forEach((e=>this.reRenderField(e,i.pageNumber)))}reRenderField(e,t){const i=this.cachedPageInfo[t],o=h(x(this.store),e.role_name),s=v(e,i,o,{disabled:!0,editable:!0,draggable:!0});s&&(Array.isArray(s)?s.forEach((t=>{this.attachFieldAttributes(i,e,o,t),a(t).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),l=e.dx/o+t,a=e.dy/s+i;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),m(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})})):(this.attachFieldAttributes(i,e,o,s),a(s).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),l=e.dx/o+t,a=e.dy/s+i;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),m(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})))}async handleMoveField(e){var t;const i=e.target.getAttribute("pageNumber"),{naturalWidth:o=612,naturalHeight:s=792,renderedHeight:l=792}=this.cachedPageInfo[i];console.log("[FIELDS] Drag ended",i,e.target);const a=e.target.getBoundingClientRect(),n=e.target.parentElement.getBoundingClientRect(),d=Math.max(a.left-n.left,0),p=Math.max(l-(n.bottom-a.bottom),0),{x:c,y:h}=this.viewCoordinatesToPageCoordinates(d,p,i,o-e.rect.width,s-e.rect.height),v=e.target.getAttribute("name"),m=+(e.target.getAttribute("option")||"0"),u=null===(t=this.store)||void 0===t?void 0:t.state.fields.find((e=>e.name===v));if(console.log("Will update",v,m,u),u){switch(u.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":u.setting.x=c,u.setting.y=h;break;case"checkbox_group":case"radio_button_group":{const e=u.setting.options[m];e&&(e.x=c,e.y=h)}}await r(this.endpoint,this.templateId,v,u),this.handlePageRendered({detail:this.cachedPageInfo[i]})}}generateFieldName(e,t){var i,o;let s,l=1;do{s=`${e}P${t}-${l}`,console.log("testing field",s),l++}while(null===(i=this.store)||void 0===i?void 0:i.state.fields.some((e=>e.name===s)));return console.log("Will use field name",this,s,null===(o=this.store)||void 0===o?void 0:o.state.fields),s}viewCoordinatesToPageCoordinates(e,t,i,o,s){const{xScale:l=1,yScale:a=1,renderedHeight:r=792}=this.cachedPageInfo[i];return{x:Math.floor(Math.min(e/l,o)),y:Math.floor(Math.min(Math.max(r-t,0)/a,s))}}async handleClickPage(e,t){var i,o,s;if(this.placing){console.log("Placing field",this,this.selectedRoleName,this.placing,t,e.offsetX,e.offsetY);const l=e.offsetX,a=e.offsetY,r=u(this.placing),d=f(this.placing),p=this.cachedPageInfo[t],{naturalWidth:c=612,naturalHeight:h=792}=p,v=this.viewCoordinatesToPageCoordinates(l,a,t,c-r,h-d),m=Math.floor(v.x),g=Math.floor(v.y),x={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:p.documentId,type:this.placing,required:!0,page_sequence:t,validator:null,setting:{x:m,y:g},x:m,y:g,tabindex:0,width:r,height:d};switch(x.type){case"attachment":case"payment":x.setting={x:m,y:g};break;case"initial":case"signature":x.setting={x:m,y:g,result:""};break;case"checkbox_group":x.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:`${x.name}-1`,value:"Option 1",checked:!1,x:m,y:g}]};break;case"date":x.setting={x:m,y:g,width:r,height:d,result:""};break;case"dropdown":x.required=!1,x.setting={x:m,y:g,width:r,height:d,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":x.setting={options:[{id:`${x.name}-1`,value:"Option 1",selected:!1,x:m,y:g}]};break;case"textarea":case"textbox":x.setting={x:m,y:g,width:r,height:d,result:"",leading:0,alignment:0,upperCase:!1};break;case"timestamp":x.setting={x:m,y:g,width:r,height:d}}"textarea"===x.type&&(x.setting.leading=16,x.type="textbox");const b=await n(this.endpoint,this.templateId,x);console.log("Saved field",b),this.store.state&&(this.store.state.fields=[...null===(i=this.store)||void 0===i?void 0:i.state.fields,b]),this.placing=null,null===(o=this.templateUpdated)||void 0===o||o.emit({endpoint:this.endpoint,template:null===(s=this.store)||void 0===s?void 0:s.state,event:"added-field"}),this.handlePageRendered({detail:this.cachedPageInfo[t]})}}render(){var e,t,s,l,a,r,n,d;if(console.log("[FIELDS] Rendering",this.selectedRoleName),!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return i(o,null,i("verdocs-loader",null));const p=null===(s=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===s?void 0:s.roles.map((e=>({value:e.name,label:e.name})));return i(o,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},"data-r":this.rerender,onSubmit:()=>{console.log("onSubmit")}},i("div",{id:"verdocs-template-fields-toolbar"},i("div",{class:"add-for"},"Add field:"),i("verdocs-select-input",{value:this.selectedRoleName,options:p,onInput:e=>this.selectedRoleName=e.target.value}),C.map((e=>i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:()=>{e.tooltip&&(this.selectedRoleName?this.placing=e.id:this.showMustSelectRole=!0)}})))),i("div",{class:"pages"},((null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.template_documents)||[]).map((e=>c(1,e.page_numbers).map((t=>i("verdocs-template-document-page",{templateId:this.templateId,documentId:e.id,pageNumber:t,virtualWidth:612,virtualHeight:792,onClick:e=>this.handleClickPage(e,t),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:(null===(d=null===(n=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===n?void 0:n.roles)||void 0===d?void 0:d.length)>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:()=>this.showMustSelectRole=!1}))}};E.style="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";const M=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.delete=t(this,"delete",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=d.getDefault(),this.templateId="",this.roleName="",this.sender=p.EVERYONE,this.dirty=!1,this.saving=!1,this.name="",this.type="signer",this.fullName="",this.email="",this.phone="",this.allowDelegation=!1}async componentWillLoad(){var e,t,i,o,s;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");this.store=await g(this.endpoint,this.templateId,!1);const i=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles.find((e=>e.name===this.roleName));i&&(this.name=i.name,this.type=i.type,this.fullName=i.full_name,this.email=i.email,this.phone=i.phone,this.allowDelegation=i.delegator,console.log("[ROLES] Editing role",i))}catch(e){console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",e),null===(i=this.sdkError)||void 0===i||i.emit(new b(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(s=e.response)||void 0===s?void 0:s.data))}}handleCancel(e){var t,i,o;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,null===(o=this.close)||void 0===o||o.emit()}async handleSave(e){e.stopPropagation(),this.saving=!0,k(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((async e=>{var t;console.log("[ROLE_PROPERTIES] Update result",e),this.saving=!1,this.dirty=!1,this.store=await g(this.endpoint,this.templateId,!0),null===(t=this.close)||void 0===t||t.emit()})).catch((e=>{console.log("Update error",e),this.saving=!1}))}async handleDelete(e){var t,i,o;e.stopPropagation(),window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")&&(t=this.endpoint,i=this.templateId,o=this.roleName,t.api.delete("/templates/".concat(i,"/roles/").concat(o)).then((function(e){return e.data}))).then((e=>{var t;console.log("Role deleted",e),this.store.state.roles=[...this.store.state.roles.filter((e=>e.name!==this.roleName))],null===(t=this.delete)||void 0===t||t.emit({templateId:this.templateId,roleName:this.roleName})})).catch((e=>{console.log("Deletion error",e)}))}render(){const e=-1!==(this.store.state.fields||[]).findIndex((e=>e.role_name===this.roleName));return i(o,null,i("div",{class:"background-overlay",onClick:e=>this.handleCancel(e)},i("div",{class:"dialog"},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",disabled:e,helpText:e?"This role has fields assigned and can no longer be renamed.":"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"Type:"),i("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:e=>{this.type=e.target.value,this.dirty=!0}}),i("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:e=>{this.fullName=e.target.value,this.dirty=!0}}),i("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:e=>{this.email=e.target.value,this.dirty=!0}}),i("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:e=>{this.phone=e.target.value,this.dirty=!0}}),i("div",{class:"row"},i("div",{class:"input-label"},"May Delegate:"),i("div",{class:"checkbox-wrapper"},i("verdocs-checkbox",{checked:this.allowDelegation,onInput:e=>{this.allowDelegation=e.target.checked,this.dirty=!0}})),i("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),i("div",{class:"buttons"},i("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>'}),i("div",{style:{flex:"1"}}),i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))))))}};M.style='verdocs-template-role-properties{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';const L={[p.EVERYONE]:"Everyone",[p.EVERYONE_AS_CREATOR]:"Everyone as Me",[p.ORGANIZATION_MEMBER]:"Organization member",[p.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[p.CREATOR]:"Me"},Z='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>',z='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>',H='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',V='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>',I=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.sequences=[],this.store=null,this.endpoint=d.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await g(this.endpoint,this.templateId,!0),this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(o){console.log("[FIELDS] Error with preview session",o),null===(e=this.sdkError)||void 0===e||e.emit(new b(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}componentDidRender(){a.dynamicDrop(!0),a(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=e.dx+t,s=e.dy+i;e.target.setAttribute("posX",o),e.target.setAttribute("posy",s),e.target.style.transform=`translate(${o+100}px, ${s-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),a(".dropzone").dropzone({overlap:.05,ondrop:function(e){var t,i,o,s,l;e.target.classList.remove("active");const a=e.relatedTarget.dataset.rolename,r=+e.target.dataset.sequence,n=+e.target.dataset.order,d=null===(o=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.roles)||void 0===o?void 0:o.find((e=>e.name===a));d&&(d.sequence=r,d.order=n,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(null===(l=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===l?void 0:l.roles.map((e=>k(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>{var e,t;console.log("[ROLES] Updated roles"),null===(e=this.templateUpdated)||void 0===e||e.emit({event:"updated-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})})).catch((e=>console.log("[ROLES] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(){var e;null===(e=this.exit)||void 0===e||e.emit()}handleSubmit(){var e;null===(e=this.next)||void 0===e||e.emit()}sortTemplateRoles(){var e,t;null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}extractSequenceNumbers(){var e,t;this.sequences=[],null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,t)=>e-t)),this.sequences.forEach(((t,i)=>{var o,s;null===(s=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===s||s.roles.filter((e=>e.sequence===t)).forEach(((t,o)=>{e.includes(t.name)||(t.sequence=i+1,t.order=o+1,e.push(t.name))}))})),this.extractSequenceNumbers()}getNextRoleName(){var e,t,i,o;let s="",l=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles.length;do{l++,s=`Recipient ${l}`}while(!s||(null===(o=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===o?void 0:o.roles.some((e=>e.name===s))));return s}callCreateRole(e,t,i){var o,s,l;console.log("[ROLES] Will create role",{name:e,sequence:t,order:i}),(o=this.endpoint,s=this.templateId,l={template_id:this.templateId,name:e,sequence:t,order:i,full_name:"",email:"",phone:"",type:"signer",delegator:!1},o.api.post("/templates/".concat(s,"/roles"),l).then((function(e){return e.data}))).then((async e=>{var t,i;console.log("[ROLES] Created role",e),this.store=await g(this.endpoint,this.templateId,!0),this.sortTemplateRoles(),this.renumberTemplateRoles(),null===(t=this.templateUpdated)||void 0===t||t.emit({event:"created-role",endpoint:this.endpoint,template:null===(i=this.store)||void 0===i?void 0:i.state})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){var i;e.stopPropagation();const o=(null===(i=this.store)||void 0===i?void 0:i.state.roles.filter((e=>e.sequence===t)).length)+1,s=this.getNextRoleName();this.callCreateRole(s,t,o)}handleAddStep(e,t){e.stopPropagation();const i=this.getNextRoleName();this.callCreateRole(i,t,1)}render(){var e,t,l,a,r,n;if(console.log("[ROLES] Rendering"),!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return i(o,{class:"loading"},i("verdocs-loader",null));const d=((null===(l=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===l?void 0:l.roles)||[]).map((e=>e.name));return i(o,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":null===(a=this.store.state)||void 0===a?void 0:a.updateCount},i("h5",null,"Roles and Workflow"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}),i("div",{class:"row-roles"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",L[null===(n=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===n?void 0:n.sender]," ",i("div",{class:"settings-button",innerHTML:Z,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:z}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((e=>{var t,o;return i(s,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-order":.5,"data-sequence":e}),null===(o=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===o?void 0:o.roles.filter((t=>t.sequence===e)).map((t=>i(s,null,t.email?i("div",{class:"recipient",style:{borderColor:w(h(d,t.name))},"data-rolename":t.name},i("span",{class:"type-icon",innerHTML:"signer"===t.type?S:"cc"===t.type?V:H}),t.full_name," ",i("div",{class:"settings-button",innerHTML:Z,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})):i("div",{class:"recipient",style:{backgroundColor:w(h(d,t.name))},"data-rolename":t.name},i("span",{class:"type-icon",innerHTML:"signer"===t.type?S:"cc"===t.type?V:H}),t.name," ",i("div",{class:"settings-button",innerHTML:Z,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})),i("div",{class:"dropzone","data-order":t.order+.5,"data-sequence":e})))),i("button",{class:"add-role",innerHTML:z,onClick:t=>this.handleAddRole(t,e)}))),this.sequences.length>0&&i("div",{class:"row add-sequence","data-sequence":e},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:z}),i("div",{class:"dropzone","data-sequence":e+1,"data-order":1},"Add Step"))))})),i("div",{class:"row","data-sequence":this.sequences.length+1},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:z}),i("button",{class:"add-step",innerHTML:z,onClick:e=>this.handleAddStep(e,this.sequences.length+1)}))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}),i("div",{class:"row-roles"},i("div",{class:"complete"},"Document Complete")))),d.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:z})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:d.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null},onDelete:async()=>{var e,t;await g(this.endpoint,this.templateId,!0),this.renumberTemplateRoles(),this.showingRoleDialog=null,null===(e=this.templateUpdated)||void 0===e||e.emit({event:"deleted-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return l(this)}};I.style='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';const R=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=d.getDefault(),this.templateId="",this.sender=p.EVERYONE,this.saving=!1}async componentWillLoad(){var e,t,i,o,s;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[SENDER] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SENDER] Unable to start builder session, must be authenticated");this.store=await g(this.endpoint,this.templateId,!1),this.sender=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.sender}catch(e){console.log("[SENDER] Error with preview session",e),null===(i=this.sdkError)||void 0===i||i.emit(new b(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(s=e.response)||void 0===s?void 0:s.data))}}handleClose(){this.close.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleClose())}async handleSelectSetting(e){this.saving=!0,y(this.endpoint,this.templateId,{sender:e}).then((t=>{var i;console.log("Update result",t),(null===(i=this.store)||void 0===i?void 0:i.state)&&(this.store.state.sender=e),this.saving=!1,this.sender=e})).catch((e=>{console.log("Error saving",e),this.saving=!1}))}render(){return i(o,null,i("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},i("div",{class:"dialog"},i("div",{class:"options"},i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.EVERYONE,checked:this.sender===p.EVERYONE,onInput:()=>this.handleSelectSetting(p.EVERYONE)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web"),i("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.EVERYONE_AS_CREATOR,checked:this.sender===p.EVERYONE_AS_CREATOR,onInput:()=>this.handleSelectSetting(p.EVERYONE_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone on the Web as me"),i("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.ORGANIZATION_MEMBER,checked:this.sender===p.ORGANIZATION_MEMBER,onInput:()=>this.handleSelectSetting(p.ORGANIZATION_MEMBER)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===p.ORGANIZATION_MEMBER_AS_CREATOR,onInput:()=>this.handleSelectSetting(p.ORGANIZATION_MEMBER_AS_CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Anyone in my organization as me"),i("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),i("div",{class:"option"},i("verdocs-radio-button",{name:"template-sender",value:p.CREATOR,checked:this.sender===p.CREATOR,onInput:()=>this.handleSelectSetting(p.CREATOR)}),i("div",{class:"description"},i("div",{class:"name"},"Me"),i("verdocs-help-icon",{text:"Only I can use this template."})))),i("div",{class:"buttons"},i("verdocs-button",{label:"Close",onClick:()=>this.handleClose()})))))}};R.style='verdocs-template-sender{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';export{E as verdocs_template_fields,M as verdocs_template_role_properties,I as verdocs_template_roles,R as verdocs_template_sender}
@@ -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
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):r(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];r=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-b1288daf.system.js","./p-dc849a58.system.js","./p-05eb4fed.system.js","./p-da31f940.system.js","./p-3305a941.system.js","./p-bbee73c8.system.js","./p-973ebb54.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,i,n,r,o,s,a,l,d,u;return{setters:[function(e){t=e.r;i=e.c;n=e.h;r=e.H;o=e.a},function(){},function(e){s=e.u},function(e){a=e.V},function(e){l=e.g},function(e){d=e.g},function(e){u=e.i},function(){},function(){},function(){},function(){},function(){}],execute:function(){var c='verdocs-field-textarea{width:150px;height:15px;display:block;font-size:11px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{width:100%;height:100%;resize:none;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-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}';var f='<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>';var h=e("verdocs_field_textarea",function(){function e(e){t(this,e);this.settingsChanged=i(this,"settingsChanged",7);this.deleted=i(this,"deleted",7);this.endpoint=a.getDefault();this.templateid="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.rerender=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.componentDidRender=function(){u.dynamicDrop(true);if(this.editable){u(this.el).resizable({edges:{top:true,bottom:true,left:true,right:true},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}};e.prototype.handleResizeStart=function(e){e.preventDefault();e.stopPropagation()};e.prototype.handleResize=function(e){var t=+(e.target.getAttribute("resizeX")||0);var i=+(e.target.getAttribute("resizeY")||0);var n=e.dx+t;var r=e.dy+i;this.el.style.width="".concat(parseFloat(this.el.style.width||"0")+e.dx,"px");this.el.style.height="".concat(parseFloat(this.el.style.height||"0")+e.dy,"px");e.target.setAttribute("resizeX",n);e.target.setAttribute("resizeY",r)};e.prototype.handleResizeEnd=function(e){var t=this;var i=+(e.target.getAttribute("resizeX")||0);var n=+(e.target.getAttribute("resizeY")||0);var r=d(this.field);var o=(r.width||150)+i;var a=(r.height||41)+n;var l=__assign(__assign({},d(this.field)),{width:Math.round(o),height:Math.round(a)});delete l["result"];s(this.endpoint,this.templateid,this.field.name,{setting:l}).then((function(){var e;return(e=t.settingsChanged)===null||e===void 0?void 0:e.emit({fieldName:t.field.name,settings:l})})).catch((function(e){return console.log("Field update failed",e)}))};e.prototype.render=function(){var e=this;var t,i;var o=d(this.field);var s=(i=(t=this.disabled)!==null&&t!==void 0?t:o.disabled)!==null&&i!==void 0?i:false;var a=this.field["rgba"]||l(this.roleindex);if(this.done){return n(r,{class:{done:this.done}},o.value)}return n(r,{class:{required:o.required,disabled:s},style:{backgroundColor:a}},n("textarea",{placeholder:o.placeholder||"",tabIndex:o.order,value:o.value,disabled:s,name:this.field.name,required:o.required,ref:function(t){return e.inputEl=t}}),this.editable&&n("verdocs-button-panel",{icon:f,id:"verdocs-settings-panel-".concat(this.field.name)},n("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var i;(i=e.settingsChanged)===null||i===void 0?void 0:i.emit(t.detail);return e.hideSettingsPanel()}})))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=c}}}));
@@ -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
- 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,"'")}}}}));