@verdocs/web-sdk 2.3.62 → 2.3.64
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.
- package/dist/cjs/{TemplateFieldStore-43a0b60d.js → TemplateFieldStore-3d25fc86.js} +11 -10
- package/dist/cjs/{TemplateStore-ccf29182.js → TemplateStore-89072ea0.js} +1 -1
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-31385d19.js → utils-7cc3fe3c.js} +76 -3
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/{verdocs-portal_2.cjs.entry.js → verdocs-checkbox_5.cjs.entry.js} +57 -11
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -2
- package/dist/cjs/{verdocs-field-date.cjs.entry.js → verdocs-field-attachment_15.cjs.entry.js} +1520 -6
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +3 -4
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +9 -12
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +26 -19
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +7 -9
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +19 -0
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +19 -0
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +1 -1
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +19 -0
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +19 -0
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +19 -0
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.js +19 -0
- package/dist/collection/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.js +19 -0
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +19 -0
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +19 -0
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +27 -6
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +19 -0
- package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +95 -6
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +5 -9
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +24 -16
- package/dist/collection/utils/TemplateFieldStore.js +11 -10
- package/dist/collection/utils/utils.js +23 -4
- package/dist/components/TemplateFieldStore.js +11 -10
- package/dist/components/ipc-test.js +120 -30
- package/dist/components/utils.js +28 -1
- package/dist/components/verdocs-build.js +144 -60
- package/dist/components/verdocs-field-attachment.js +1 -168
- package/dist/{esm/verdocs-field-attachment.entry.js → components/verdocs-field-attachment2.js} +96 -19
- package/dist/components/verdocs-field-checkbox.js +1 -148
- package/dist/{esm/verdocs-field-checkbox.entry.js → components/verdocs-field-checkbox2.js} +90 -19
- package/dist/components/verdocs-field-date.js +1 -204
- package/dist/{esm/verdocs-field-date.entry.js → components/verdocs-field-date2.js} +97 -21
- package/dist/components/verdocs-field-dropdown.js +1 -154
- package/dist/{esm/verdocs-field-dropdown.entry.js → components/verdocs-field-dropdown2.js} +90 -19
- package/dist/components/verdocs-field-initial.js +1 -184
- package/dist/{esm/verdocs-field-initial.entry.js → components/verdocs-field-initial2.js} +98 -19
- package/dist/components/verdocs-field-payment.js +2 -0
- package/dist/components/verdocs-field-radio-button.js +1 -152
- package/dist/{esm/verdocs-field-radio-button.entry.js → components/verdocs-field-radio-button2.js} +90 -19
- package/dist/components/verdocs-field-signature.js +1 -183
- package/dist/{esm/verdocs-field-signature.entry.js → components/verdocs-field-signature2.js} +98 -19
- package/dist/components/verdocs-field-textarea.js +1 -206
- package/dist/{esm/verdocs-field-textarea.entry.js → components/verdocs-field-textarea2.js} +95 -23
- package/dist/components/verdocs-field-textbox.js +1 -208
- package/dist/{esm/verdocs-field-textbox.entry.js → components/verdocs-field-textbox2.js} +104 -30
- package/dist/components/verdocs-field-timestamp.js +1 -157
- package/dist/{esm/verdocs-field-timestamp.entry.js → components/verdocs-field-timestamp2.js} +92 -19
- package/dist/components/verdocs-preview2.js +130 -4
- package/dist/components/verdocs-sign.js +7 -9
- package/dist/components/verdocs-template-document-page2.js +188 -7
- package/dist/components/verdocs-template-field-properties2.js +31 -11
- package/dist/components/verdocs-template-fields2.js +146 -31
- package/dist/docs.json +671 -15
- package/dist/esm/{TemplateFieldStore-211c1ed4.js → TemplateFieldStore-6e67e86b.js} +11 -10
- package/dist/esm/{TemplateStore-f752d353.js → TemplateStore-7fba801e.js} +1 -1
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-86fc7318.js → utils-36f1bbdd.js} +71 -2
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/{verdocs-portal_2.entry.js → verdocs-checkbox_5.entry.js} +56 -13
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -2
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -2
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -2
- package/dist/esm/verdocs-field-attachment_15.entry.js +1632 -0
- package/dist/esm/verdocs-field-payment.entry.js +3 -3
- package/dist/esm/verdocs-pagination_2.entry.js +1 -2
- package/dist/esm/verdocs-preview_8.entry.js +3 -4
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -2
- package/dist/esm/verdocs-sign.entry.js +9 -12
- package/dist/esm/verdocs-template-fields_4.entry.js +26 -19
- package/dist/esm/verdocs-view.entry.js +1 -2
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{TemplateFieldStore-211c1ed4.js → TemplateFieldStore-6e67e86b.js} +1 -1
- package/dist/esm-es5/{TemplateStore-f752d353.js → TemplateStore-7fba801e.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-86fc7318.js → utils-36f1bbdd.js} +2 -2
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -0
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_15.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/fields/verdocs-field-attachment/verdocs-field-attachment.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-date/verdocs-field-date.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-payment/verdocs-field-payment.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-radio-button-group/verdocs-field-radio-button.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-signature/verdocs-field-signature.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +4 -0
- package/dist/types/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.d.ts +4 -0
- package/dist/types/components/templates/verdocs-template-document-page/verdocs-template-document-page.d.ts +12 -0
- package/dist/types/components.d.ts +104 -0
- package/dist/types/utils/TemplateFieldStore.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +9 -1
- package/dist/verdocs-web-sdk/p-00e8cfa6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-04ac4336.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-08b5e01b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-116f7900.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-26646a40.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2a16963c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-358ce165.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3995b09b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3c59911b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3efa7c26.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-01d02174.js → p-47c63cc7.js} +1 -1
- package/dist/verdocs-web-sdk/p-500dce36.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7c40ab4b.system.entry.js → p-5050f8a2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e10bd7a0.entry.js → p-508808d2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5c306718.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6b6330f2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4b8a5a4e.system.entry.js → p-72f22ee9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-80e69a68.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-83597b2e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8d9a749d.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9054234f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-f69790c5.system.js → p-95080569.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-aecd8680.entry.js → p-9d4a5fd8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a16eba51.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-f0dd9355.js → p-a3d7cdda.js} +2 -2
- package/dist/verdocs-web-sdk/{p-90a1755f.system.js → p-cacffa79.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-79965a5a.system.js → p-cff87d52.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-d1092a62.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d7f90328.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-db5de7e8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e311d75f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ea96b41e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ef20cb50.js +1 -0
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/p-f2a169d8.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Files-4bdc0c0f.js +0 -47
- package/dist/cjs/verdocs-checkbox_3.cjs.entry.js +0 -56
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +0 -99
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +0 -85
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +0 -91
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +0 -113
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +0 -89
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +0 -112
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +0 -141
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +0 -143
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +0 -92
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +0 -227
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +0 -227
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +0 -150
- package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +0 -82
- package/dist/components/Fields.js +0 -26
- package/dist/custom-elements.json +0 -2091
- package/dist/esm/Files-70a192df.js +0 -44
- package/dist/esm/verdocs-checkbox_3.entry.js +0 -50
- package/dist/esm/verdocs-initial-dialog.entry.js +0 -223
- package/dist/esm/verdocs-signature-dialog.entry.js +0 -223
- package/dist/esm/verdocs-template-document-page_2.entry.js +0 -145
- package/dist/esm/verdocs-upload-dialog.entry.js +0 -78
- package/dist/esm-es5/Files-70a192df.js +0 -1
- package/dist/esm-es5/verdocs-checkbox_3.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-attachment.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +0 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +0 -1
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +0 -1
- package/dist/esm-es5/verdocs-portal_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-signature-dialog.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-upload-dialog.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0edfbbb9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0fd03f17.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-16cc9e91.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1b9f1492.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-202a5368.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-20986706.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-22275b64.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2407c719.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2bb8b0c0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-30265ae4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-32076544.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-327858f0.system.js +0 -1
- package/dist/verdocs-web-sdk/p-34832c03.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4157afe4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-43a78ea1.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4b740499.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-50a552a9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-521a3fec.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-522f19d0.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6190eb2d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-66b9d77e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6a5fbeb0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6bae71c2.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6eb2ce21.js +0 -1
- package/dist/verdocs-web-sdk/p-712e8341.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-77898b84.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7cb3209d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-83a1476c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8bf9acf4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9365abef.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-946903f3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-98f91a5e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a1ccd671.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a5f450a1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a6048cc9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a604c1ad.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a9934632.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-aa124212.js +0 -1
- package/dist/verdocs-web-sdk/p-b3c78f12.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ba87f33c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bb2006de.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c9716926.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cb316fe0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cee12c63.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d3942875.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e27ec758.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e2a8ce1d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e98e76f5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ecc85500.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ef1f4d49.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f23af885.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f55038fc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f63a8d6d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f68c15fb.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f8f703bb.system.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function i(e){try{u(n["throw"](e))}catch(e){s(e)}}function u(e){e.done?r(e.value):a(e.value).then(o,i)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,o;return o={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function i(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-3af6b910.system.js","./p-9bf2d124.system.js","./p-8324a7a3.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function i(e){try{u(n["throw"](e))}catch(e){s(e)}}function u(e){e.done?r(e.value):a(e.value).then(o,i)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,o;return o={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function i(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-3af6b910.system.js","./p-9bf2d124.system.js","./p-8324a7a3.system.js","./p-95080569.system.js"],(function(e){"use strict";var t,r,n,a,s,o,i;return{setters:[function(e){t=e.c},function(e){r=e.g;n=e.T},function(e){a=e.c;s=e.g},function(e){o=e.c;i=e.g}],execute:function(){var u=this;var l=function(e){var r=(new Date).toISOString();return t({isLoading:true,isLoaded:false,isError:false,error:null,roleNames:[],id:e,name:"",description:"",sender:n.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:false,is_personal:true,is_public:false,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:undefined,processed:false,organization:undefined,roles:[],pages:[],template_document:undefined,template_documents:[]})};var c={};var f=e("g",(function(e,t,n){if(n===void 0){n=false}return __awaiter(u,void 0,void 0,(function(){var u,f,d,p;return __generator(this,(function(b){switch(b.label){case 0:u=false;if(!c[t]){console.debug("[TEMPLATES] No template store found for ID, creating",t);c[t]=l(t);u=true}f=c[t];if(!(u||n))return[3,5];console.debug("[TEMPLATES] Loading template",{templateId:t,created:u,forceReload:n});f.state.isLoading=true;f.state.isLoaded=false;f.state.isError=false;f.state.error=undefined;b.label=1;case 1:b.trys.push([1,3,,4]);return[4,r(e,t)];case 2:d=b.sent();console.debug("[TEMPLATES] Got template",d);Object.assign(f.state,d);f.state.isLoaded=true;f.state.isError=false;f.state.error=undefined;a(d);o(d);return[3,4];case 3:p=b.sent();console.error("[TEMPLATES] Error loading template",p);f.state.isLoaded=false;f.state.isError=true;f.state.error=p;throw p;case 4:f.state.isLoading=false;return[3,6];case 5:s(t);i(t);b.label=6;case 6:return[2,f]}}))}))}))}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,o){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function r(e){try{a(o.next(e))}catch(e){n(e)}}function l(e){try{a(o["throw"](e))}catch(e){n(e)}}function a(e){e.done?i(e.value):s(e.value).then(r,l)}a((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,s,n,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,s&&(n=r[0]&2?s["return"]:r[0]?s["throw"]||((n=s["return"])&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;if(s=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){i.label=r[1];break}if(r[0]===6&&i.label<n[1]){i.label=n[1];n=r;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(r);break}if(n[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];s=0}finally{o=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var o=0,s=t.length,n;o<s;o++){if(n||!(o in t)){if(!n)n=Array.prototype.slice.call(t,0,o);n[o]=t[o]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-95080569.system.js","./p-8324a7a3.system.js","./p-cff87d52.system.js","./p-cacffa79.system.js","./p-187b20b7.system.js","./p-8aae8d16.system.js","./p-877c2b06.system.js","./p-05eb4fed.system.js","./p-6e9af353.system.js","./p-3f628837.system.js","./p-ca13070e.system.js","./p-3af6b910.system.js","./p-bbee73c8.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,i,o,s,n,r,l,a,d,c,p,u,h,m,f,v,g,b,x,y,w,_,k,S,I,E,C,P;return{setters:[function(e){t=e.r;i=e.c;o=e.h;s=e.H},function(){},function(e){n=e.V;r=e.b;l=e.u},function(e){a=e.g},function(e){d=e.g;c=e.b;p=e.a},function(e){u=e.g},function(e){h=e.r},function(e){m=e.S},function(e){f=e.j},function(e){v=e.a;g=e.i},function(e){b=e.g},function(e){x=e.c;y=e.d},function(e){w=e.D;_=e.P;k=e.J;S=e.a;I=e.F;E=e.b;C=e.T},function(e){P=e.V},function(){},function(){},function(){},function(){}],execute:function(){var D=function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))};var L=function(e,t,i,o){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),o).then((function(e){return e.data}))};var T=function(e,t,i){return e.api.delete("/templates/".concat(t,"/reminder/").concat(i)).then((function(e){return e.data}))};var z='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;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-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';var R=e("verdocs_preview",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;var o=this;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.templateId){console.log("[PREVIEW] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PREVIEW] Unable to start builder session, must be authenticated");return[2]}u(this.endpoint,this.templateId,true).then((function(e){var t,i;o.templateStore=e;console.log("[PREVIEW] Loaded Template Store",e.state);o.fieldStore=a(o.templateId);o.roleStore=d(o.templateId);console.log("RS",(t=o.roleStore)===null||t===void 0?void 0:t.state);console.log("FS",(i=o.fieldStore)===null||i===void 0?void 0:i.state);console.log("[PREVIEW] Loaded template",o.templateStore.state,o.roleStore.get("roles"),o.fieldStore.get("fields"));o.loading=false})).catch((function(e){console.log(e)}))}catch(o){console.log("[PREVIEW] Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.handlePageRendered=function(e){var t,i;var o=e.detail;var s=(i=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.fields.filter((function(e){return e.page_sequence===o.pageNumber}));console.log("[PREVIEW] Page rendered",o,s);s.forEach((function(e){return h(e,o,{disabled:true,editable:false,draggable:false})}))};e.prototype.render=function(){var e=this;var t,i;if(this.loading){return o(s,null,o("verdocs-loader",null))}var n=__spreadArray([],(i=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.pages,true);n.sort((function(e,t){return e.sequence-t.sequence}));return o(s,null,n.map((function(t){return o("verdocs-template-document-page",{templateId:t.template_id,documentId:t.document_id,pageNumber:t.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))};return e}());R.style=z;var U='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var A='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><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.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var M='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var H=e("verdocs_send",function(){function e(e){t(this,e);this.send=i(this,"send",7);this.exit=i(this,"exit",7);this.sdkError=i(this,"sdkError",7);this.searchContacts=i(this,"searchContacts",7);this.levels=[];this.templateStore=null;this.roleStore=null;this.endpoint=n.getDefault();this.templateId=null;this.environment="web";this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={}}e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rolesCompleted={};return[2]}))}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r,l,a,c;var p=this;return __generator(this,(function(h){switch(h.label){case 0:h.trys.push([0,2,,3]);r=this.endpoint.loadSession();if(!this.templateId){console.log("[SEND] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SEND] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.templateStore=h.sent();this.roleStore=d(this.templateId);if(!((t=(e=this.templateStore)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_sendable)){console.warn("[SEND] Template is not sendable",this.templateId)}if(this.roleStore.get("roles")){a={};this.rolesCompleted={};this.roleStore.get("roles").forEach((function(e){var t=e.sequence-1;a[t]||(a[t]=[]);var i="r-".concat(t,"-").concat(a[t].length);a[t].push(__assign(__assign({},e),{id:i}));if(e.full_name&&(e.email||e.phone)){p.rolesCompleted[i]=__assign(__assign({},e),{id:i})}}));this.rolesAtLevel=a;this.levels=Object.keys(a).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}if((i=r===null||r===void 0?void 0:r.session)===null||i===void 0?void 0:i.profile){this.sessionContacts.push({id:r.session.profile.id,name:"".concat(r.session.profile.first_name," ").concat(r.session.profile.last_name),email:r.session.profile.email,phone:r.session.profile.phone})}return[3,3];case 2:c=h.sent();console.log("[SEND] Error with preview session",c);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new m(c.message,(s=c.response)===null||s===void 0?void 0:s.status,(n=c.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return o("div",{class:"level-icon",innerHTML:N})}else if(e>=this.levels.length){return o("div",{class:"level-icon",innerHTML:j})}else{return o("div",{class:"level-icon",innerHTML:M})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.rolesCompleted[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t=this;var i,o;if(this.sending){console.log("Skipping duplicate send",e);return}console.log("Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;var s={template_id:this.templateId,name:(o=(i=this.templateStore)===null||i===void 0?void 0:i.state)===null||o===void 0?void 0:o.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",s);f(this.endpoint,s).then((function(e){var i;console.log("[SEND] Send envelope",e);t.reset().catch((function(e){return console.log("Unknown Error",e)}));t.sending=false;(i=t.send)===null||i===void 0?void 0:i.emit(__assign(__assign({},s),{envelope_id:e.id,envelope:e}))})).catch((function(e){console.log("Send error",e);t.sending=false}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,i;var n=c(this.roleStore);var r=Object.values(this.rolesCompleted).filter((function(e){return v(e.email)||g(e.phone)}));var l=r.length>=n.length;return o(s,{class:{sendable:(i=(t=this.templateStore)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.is_sendable}},o("div",{class:"recipients"},o("div",{class:"left-line"}),o("div",{class:"level level-start"},this.getLevelIcon(-1),o("div",{class:"complete"},"Send Envelope")),this.levels.map((function(t){return o("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var i,s,n,r,l,a;var d=!t.email;var c="verdocs-send-recipient-".concat(t.name);return d?o("div",{class:"recipient",style:{backgroundColor:b(p(e.roleStore,t.name))},onClick:function(i){return e.handleClickRole(i,t)},id:c},(s=(i=e.rolesCompleted[t.id])===null||i===void 0?void 0:i.full_name)!==null&&s!==void 0?s:t.name,o("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&o("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},o("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(i){return e.handleSelectContact(i,t)},contactSuggestions:e.sessionContacts,templateRole:(n=e.rolesCompleted[t.id])!==null&&n!==void 0?n:t,onSearchContacts:function(t){var i;return(i=e.searchContacts)===null||i===void 0?void 0:i.emit(t.detail)}}))):o("div",{class:"recipient",style:{borderColor:b(p(e.roleStore,t.name))},onClick:function(i){return e.handleClickRole(i,t)},id:c},(l=(r=e.rolesCompleted[t.id])===null||r===void 0?void 0:r.full_name)!==null&&l!==void 0?l:t.full_name,o("div",{class:"icon",innerHTML:A}),e.showPickerForId===t.id&&o("verdocs-portal",{anchor:c,onClickAway:function(){return e.showPickerForId=""}},o("verdocs-contact-picker",{onExit:function(){return e.showPickerForId=""},onNext:function(i){return e.handleSelectContact(i,t)},contactSuggestions:e.sessionContacts,templateRole:(a=e.rolesCompleted[t.id])!==null&&a!==void 0?a:t,onSearchContacts:function(t){var i;return(i=e.searchContacts)===null||i===void 0?void 0:i.emit(t.detail)}})))})))})),o("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),o("div",{class:"complete"},"Signing Complete"))),o("div",{class:"buttons"},o("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)},disabled:this.sending}),o("verdocs-button",{label:"Send",size:"small",disabled:!l||this.sending,onClick:function(t){return e.handleSend(t)}}),this.sending&&o("verdocs-spinner",null)))};return e}());H.style=U;var F='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-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;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';var B=e("verdocs_template_attachments",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.templateUpdated=i(this,"templateUpdated",7);this.sdkError=i(this,"sdkError",7);this.endpoint=n.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.store=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}o=this;return[4,u(this.endpoint,this.templateId,false)];case 1:o.store=n.sent();return[3,3];case 2:s=n.sent();console.log("[TEMPLATE ATTACHMENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(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,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:e.stopPropagation();n=e.detail.file;if(!n){return[2]}console.log("[ATTACHMENTS] Uploading...",n);this.uploading=true;this.progressLabel="Uploading...";d.label=1;case 1:d.trys.push([1,4,,5]);return[4,x(this.endpoint,this.templateId,n,this.handleUploadProgress.bind(this))];case 2:r=d.sent();console.log("[ATTACHMENTS] Created attachment",r);l=this;return[4,u(this.endpoint,this.templateId,false)];case 3:l.store=d.sent();console.log("[ATTACHMENTS] Updated template",this.store.state);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:a=d.sent();console.log("[ATTACHMENTS] Error creating template",a);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new m(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(s=a.response)===null||s===void 0?void 0:s.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.store.state})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,y(this.endpoint,this.templateId,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,u(this.endpoint,this.templateId,false)];case 2:e.store=t.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){if(((t=this.store.state)===null||t===void 0?void 0:t.template_documents.length)>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return S;case"image/jpeg":return k;case"image/png":return _;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return w}return I};e.prototype.render=function(){var e=this;var t,i,n;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var r=(t=this.store)===null||t===void 0?void 0:t.state;if(!r.isLoaded){return o(s,{class:"loading"},o("verdocs-loader",null))}if(!this.endpoint.session||!r.profile_id){return o(s,{class:"empty"})}return o(s,null,o("h5",null,"Existing Attachments"),o("div",{class:"attachments"},(i=this.store)===null||i===void 0?void 0:i.state.template_documents.map((function(t){return o("div",{class:"attachment"},o("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),o("div",{class:"filename",title:t.name},t.name),o("div",{class:"pages"},o("div",{class:"count"},t.page_numbers),o("div",{class:"pages-icon",innerHTML:E})),o("div",{class:"trash-icon",innerHTML:C,onClick:function(){return e.handleDelete(t)}}))}))),o("h5",null,"Attach a New Document"),this.uploading?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),this.progressLabel&&o("div",{class:"progress-wrapper"},o("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):o("verdocs-file-chooser",{onFileSelected:function(t){return e.handleUpload(t)}}),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),o("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!((n=this.store)===null||n===void 0?void 0:n.state.template_documents.length)||this.uploading})),this.showDeleteError&&o("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:function(){return e.showDeleteError=false}}),this.confirmDeleteDocument&&o("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}());B.style=F;var O='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';var W=["attachments","roles","settings","fields","preview"];var V=e("verdocs_template_build_tabs",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.stepChanged=i(this,"stepChanged",7);this.endpoint=n.getDefault();this.templateId=null;this.step="preview";this.store=null}e.prototype.onStepChanged=function(){console.log("Step changed",this.step,this.templateId);this.loadTemplate().catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){this.step="preview";return[2]}this.loadTemplate().catch((function(e){return console.log("[BUILD_TABS] Unable to load template",e)}))}catch(o){console.log("[BUILD_TABS] Error loading template",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.loadTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!this.templateId)return[3,2];e=this;return[4,u(this.endpoint,this.templateId,false)];case 1:e.store=t.sent();t.label=2;case 2:return[2]}}))}))};e.prototype.setStep=function(e){var t;console.log("Selected step",e.detail.tab.id);e.stopPropagation();e.preventDefault();this.step=e.detail.tab.id;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e.detail.tab.id)};e.prototype.render=function(){var e=this;var t,i,n,r,l,a,d,c,p;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var u=false;var h=false;var m=false;console.log("[BUILD_TABS] Rendering tabs",this.templateId,this.step);if(this.templateId&&this.store&&this.store.state){m=((n=(i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.template_documents)===null||n===void 0?void 0:n.length)>0;h=m&&((a=(l=(r=this.store)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.roles)===null||a===void 0?void 0:a.length)>0;u=h&&((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.fields)===null||p===void 0?void 0:p.length)>0}var f=Math.max(W.indexOf(this.step),0);if(!u&&f>=4){f=3}if(!h&&f>=3){f=1}if(!m&&f>=1){f=0}console.log({selectedStepIndex:f,canPreview:u,canEditFields:h,canEditRoles:m});return o(s,null,o("verdocs-tabs",{onSelectTab:function(t){return e.setStep(t)},selectedTab:f,tabs:[{id:"attachments",disabled:false,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!m,label:"Roles"},{id:"settings",disabled:!h,label:"Settings"},{id:"fields",disabled:!h,label:"Fields"},{id:"preview",disabled:!u,label:"Preview/Send"}]}))};Object.defineProperty(e,"watchers",{get:function(){return{step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());V.style=O;var q='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var Y=" ";var G='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var J=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.templateCreated=i(this,"templateCreated",7);this.endpoint=n.getDefault();this.file=undefined;this.creating=false;this.progressLabel="Uploading...";this.progressPercent=0}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,s,n;var l=this;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;this.progressLabel="Uploading...";a.label=1;case 1:a.trys.push([1,3,,4]);return[4,r(this.endpoint,{name:this.file.name,documents:[this.file]},(function(e){if(e>=99){l.progressLabel="Processing...";l.progressPercent=100}else{l.progressPercent=e}}))];case 2:s=a.sent();console.log("[CREATE] Created template",s);u(this.endpoint,s.id,true).then((function(){var e,t;(e=l.templateCreated)===null||e===void 0?void 0:e.emit({endpoint:l.endpoint,template:s,templateId:s.id});(t=l.next)===null||t===void 0?void 0:t.emit(s);l.creating=false;l.progressLabel="";l.progressPercent=0})).catch((function(e){console.log(e)}));return[3,4];case 3:n=a.sent();console.log("[CREATE] Error creating template",n);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new m(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(o=n.response)===null||o===void 0?void 0:o.data));this.creating=false;return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),this.progressLabel&&o("div",{class:"progress-wrapper"},o("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):o("div",{class:"upload-box",onDrop:function(t){t.preventDefault();t.target.classList.remove("drag-over");e.file=t.dataTransfer.files[0]},onDragOver:function(e){e.preventDefault();e.dataTransfer.dropEffect="copy"},onDragEnter:function(e){return e.target.classList.add("drag-over")},onDragLeave:function(e){return e.target.classList.remove("drag-over")}},o("div",null,o("span",{innerHTML:G})),o("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),o("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?Y:"Or, if you prefer..."),o("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),o("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating}))))};return e}());J.style=q;var K="";var Q=e("verdocs_template_name",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.name="";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE NAME] Error loading template",r);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new m(r.message,(o=r.response)===null||o===void 0?void 0:o.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,i,o;e.stopPropagation();this.name=(i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.name;this.dirty=false;console.log("Closing");(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{name:this.name})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.name=this.name}this.dirty=false;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"});(o=this.close)===null||o===void 0?void 0:o.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,i;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.isLoading){return o(s,{class:"loading"},o("verdocs-loader",null))}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("label",{htmlFor:"verdocs-template-name"},"Template Name"),o("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:function(t){var i,o;e.name=t.target.value;e.dirty=e.name!==((o=(i=e.store)===null||i===void 0?void 0:i.state)===null||o===void 0?void 0:o.name)}}),o("div",{class:"buttons"},o("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}());Q.style=K;var X='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var Z=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}n=this;return[4,u(this.endpoint,this.templateId,false)];case 1:n.store=l.sent();this.sendReminders=!!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.reminder_id);this.dirty=false;return[3,3];case 2:r=l.sent();console.log("[TEMPLATE REMINDERS] Error loading template",r);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new m(r.message,(o=r.response)===null||o===void 0?void 0:o.status,(s=r.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,i,o;e.stopPropagation();this.sendReminders=!!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.reminder_id);this.dirty=false;(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,s,n,r,l,a,d,c,p,h,f,v;return __generator(this,(function(g){switch(g.label){case 0:e.stopPropagation();g.label=1;case 1:g.trys.push([1,12,,13]);if(!this.sendReminders)return[3,8];c={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};if(!!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.reminder_id))return[3,4];return[4,D(this.endpoint,this.templateId,c)];case 2:g.sent();p=this;return[4,u(this.endpoint,this.templateId,false)];case 3:p.store=g.sent();return[3,7];case 4:return[4,L(this.endpoint,this.templateId,(o=this.store)===null||o===void 0?void 0:o.state.reminder_id,c)];case 5:g.sent();h=this;return[4,u(this.endpoint,this.templateId,false)];case 6:h.store=g.sent();g.label=7;case 7:return[3,11];case 8:return[4,T(this.endpoint,this.templateId,(s=this.store)===null||s===void 0?void 0:s.state.reminder_id)];case 9:g.sent();f=this;return[4,u(this.endpoint,this.templateId,false)];case 10:f.store=g.sent();g.label=11;case 11:(n=this.templateUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"});return[3,13];case 12:v=g.sent();console.log("[TEMPLATE REMINDERS] Unable to update reminders",v);P(v.message);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new m(v.message,(l=v.response)===null||l===void 0?void 0:l.status,(a=v.response)===null||a===void 0?void 0:a.data));return[3,13];case 13:this.dirty=false;(d=this.close)===null||d===void 0?void 0:d.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,i;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.isLoaded)){return o(s,{class:"empty"})}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("h5",null,"Reminders"),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),o("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.sendReminders=t.target.checked;e.dirty=true}})),o("p",null,o("strong",null,"NOTE:")," Reminders will only be sent for up to 14 days."),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),o("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){e.firstReminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),o("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){e.reminderDays=t.target.value;e.dirty=true},disabled:!this.sendReminders})),o("div",{class:"buttons"},o("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&o("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());Z.style=X;var $='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';var ee=e("verdocs_template_visibility",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.dirty=false;this.personal=false;this.public=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,s,n,r,l,a;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[VISIBILITY] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[VISIBILITY] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,u(this.endpoint,this.templateId,false)];case 1:l.store=d.sent();this.personal=((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.is_personal)||true;this.public=((o=(i=this.store)===null||i===void 0?void 0:i.state)===null||o===void 0?void 0:o.is_public)||false;this.dirty=false;return[3,3];case 2:a=d.sent();console.log("[TEMPLATE VISIBILITY] Error loading template",a);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new m(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(r=a.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,i,o,s,n;e.stopPropagation();this.personal=(i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.is_personal;this.public=(s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.is_public;this.dirty=false;(n=this.close)===null||n===void 0?void 0:n.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o;return __generator(this,(function(s){switch(s.label){case 0:e.stopPropagation();return[4,l(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public})];case 1:s.sent();if((t=this.store)===null||t===void 0?void 0:t.state){this.store.state.is_personal=this.personal;this.store.state.is_public=this.public}this.dirty=false;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"});(o=this.close)===null||o===void 0?void 0:o.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,i;if(!this.endpoint.session){return o(s,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((i=(t=this.store)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.isLoaded)){return o(s,{class:"empty"})}return o(s,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("h5",null,"Visibility"),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-is-shared"},"Shared"),o("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:function(t){e.personal=!t.target.checked;e.dirty=true}})),o("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),o("div",{class:"input-row"},o("label",{htmlFor:"verdocs-is-public"},"Public"),o("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:function(t){e.public=t.target.checked;e.dirty=true}})),o("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),o("div",{class:"buttons"},o("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};return e}());ee.style=$}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-cacffa79.system.js","./p-bbee73c8.system.js","./p-8aae8d16.system.js","./p-d8cd6b59.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,o,n,i,s,a;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H},function(){},function(e){s=e.V},function(e){a=e.c},function(){},function(){},function(){},function(){}],execute:function(){var c='verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .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-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var l='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 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-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var r='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var d='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var u=e("verdocs_contact_picker",function(){function e(e){t(this,e);this.searchContacts=o(this,"searchContacts",7);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.endpoint=s.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=a(e.target.value)};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("div",{class:"row"},n("label",{htmlFor:this.nameFieldId},"Name:"),n("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&n("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return n("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?n("img",{alt:"Avatar",class:"avatar",src:t.avatar}):n("div",{class:"avatar",innerHTML:d}),n("div",{class:"details"},n("div",{class:"name"},t.name),t.email&&n("div",{class:"destination"},t.email),t.phone&&n("div",{class:"destination"},t.phone)))})))),n("div",{class:"row"},n("label",{htmlFor:this.emailFieldId},"Email:"),n("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),n("div",{class:"row"},n("label",{htmlFor:this.phoneFieldId},"Phone:"),n("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),n("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),n("div",{class:"buttons"},n("verdocs-toggle-button",{icon:l,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),n("verdocs-toggle-button",{icon:r,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),n("div",{class:"flex-fill"}),n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());u.style=c;var p='verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';var h=e("verdocs_toggle_button",function(){function e(e){t(this,e);this.toggle=o(this,"toggle",7);this.active=false;this.icon=null;this.label=null;this.size="normal";this._active=false}e.prototype.componentWillLoad=function(){this._active=this.active};e.prototype.handleToggle=function(e){var t;e.stopPropagation();var o=!this._active;this._active=o;(t=this.toggle)===null||t===void 0?void 0:t.emit({active:o})};e.prototype.render=function(){var e=this;return n(i,{class:"size-".concat(this.size)},this.icon?n("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(t){return e.handleToggle(t)}}):n("button",{class:{active:this._active},onClick:function(t){return e.handleToggle(t)}},this.label))};return e}());h.style=p}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as e,h as t,H as i,c as o,a as s}from"./p-14b44491.js";import{a as l}from"./p-eab67c09.js";import"./p-05788c2b.js";import{V as r}from"./p-035f6b38.js";import{u as n,d as a}from"./p-feb442b1.js";import{g as d,u as p}from"./p-ef20cb50.js";import{g as c}from"./p-b086f9be.js";import{g as h}from"./p-47c63cc7.js";import{S as f}from"./p-7a1b2643.js";import"./p-7648c449.js";const u=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(i,{class:{disabled:this.disabled,[this.theme]:!0}},t("label",null,t("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",null,this.label)))}};u.style='@charset "UTF-8";verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const v=class{constructor(t){e(this,t),this.message=""}render(){return t(i,null,t("div",{class:"inner"},this.message))}};v.style='verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const m=class{constructor(t){e(this,t),this.clickAway=o(this,"clickAway",7),this.moved=!1,this.anchor=void 0,this.voffset=0,this.align="left"}handleScroll(){this.calculatePosition()}handleResize(){this.calculatePosition()}handleClick(e){var t;this.element.contains(e.target)||null===(t=this.clickAway)||void 0===t||t.emit()}calculateLeft(){const e=document.getElementById(this.anchor);if(!e)return 0;const t=e.getBoundingClientRect();return"left"===this.align?Math.max(t.left,0):"right"===this.align?Math.max(t.left+t.width-this.portal.offsetWidth,0):Math.max(t.left-this.portal.offsetWidth/2+t.width/2,0)}calculateTop(){const e=document.getElementById(this.anchor);return e?e.getBoundingClientRect().bottom+this.voffset:0}calculatePosition(){this.portal.style.top=`${this.calculateTop()}px`,this.portal.style.left=`${this.calculateLeft()}px`}componentWillLoad(){var e;const t=`${this.anchor}-portal`;null===(e=document.getElementById(t))||void 0===e||e.remove(),this.portal=document.createElement("div"),this.portal.setAttribute("id",t),this.portal.style.zIndex="10001",this.portal.style.position="absolute",document.body.append(this.portal)}componentDidLoad(){this.portal.appendChild(this.element),this.calculatePosition()}disconnectedCallback(){this.moved?this.portal.remove():this.moved=!0}render(){return t(i,{ref:e=>this.element=e},t("slot",null))}};m.style="";const x=class{constructor(t){e(this,t),this.value="",this.label="",this.options=void 0,this.disabled=!1}render(){return t(i,{class:"input-field"},t("label",null,this.label?t("div",{class:"input-label"},this.label+":"):t("div",null),t("select",{class:"input-element",disabled:this.disabled},this.options.map((e=>t("option",{value:e.value,selected:e.value===this.value},e.label))))))}};var b;x.style='verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var g=void 0!==l&&(l.crypto||l.msCrypto);if(g&&g.getRandomValues){var w=new Uint8Array(16);b=function(){return g.getRandomValues(w),w}}if(!b){var y=new Array(16);b=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),y[t]=e>>>((3&t)<<3)&255;return y}}for(var k=b,I=[],q=0;q<256;++q)I[q]=(q+256).toString(16).substr(1);var E=function(e,t){var i=t||0;return I[e[i++]]+I[e[i++]]+I[e[i++]]+I[e[i++]]+"-"+I[e[i++]]+I[e[i++]]+"-"+I[e[i++]]+I[e[i++]]+"-"+I[e[i++]]+I[e[i++]]+"-"+I[e[i++]]+I[e[i++]]+I[e[i++]]+I[e[i++]]+I[e[i++]]+I[e[i++]]},L=k(),z=[1|L[0],L[1],L[2],L[3],L[4],L[5]],T=16383&(L[6]<<8|L[7]),_=0,R=0,j=function(e,t,i){var o=t&&i||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||k)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var l=0;l<16;++l)t[o+l]=s[l];return t||E(s)},C=j;C.v1=function(e,t,i){var o=t&&i||0,s=t||[],l=void 0!==(e=e||{}).clockseq?e.clockseq:T,r=void 0!==e.msecs?e.msecs:(new Date).getTime(),n=void 0!==e.nsecs?e.nsecs:R+1,a=r-_+(n-R)/1e4;if(a<0&&void 0===e.clockseq&&(l=l+1&16383),(a<0||r>_)&&void 0===e.nsecs&&(n=0),n>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_=r,R=n,T=l;var d=(1e4*(268435455&(r+=122192928e5))+n)%4294967296;s[o++]=d>>>24&255,s[o++]=d>>>16&255,s[o++]=d>>>8&255,s[o++]=255&d;var p=r/4294967296*1e4&268435455;s[o++]=p>>>8&255,s[o++]=255&p,s[o++]=p>>>24&15|16,s[o++]=p>>>16&255,s[o++]=l>>>8|128,s[o++]=255&l;for(var c=e.node||z,h=0;h<6;++h)s[o+h]=c[h];return t||E(s)},C.v4=j;var P=C;const S=e=>e.charAt(0).toUpperCase()+e.slice(1),M='<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>',D='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>',O=class{constructor(t){e(this,t),this.close=o(this,"close",7),this.delete=o(this,"delete",7),this.settingsChanged=o(this,"settingsChanged",7),this.sdkError=o(this,"sdkError",7),this.templateStore=null,this.fieldStore=null,this.roleStore=null,this.endpoint=r.getDefault(),this.templateId="",this.fieldName="",this.helpText="",this.dirty=!1,this.loading=!0,this.setting=null,this.label="",this.type="textbox",this.name="",this.required=!1,this.roleName="",this.group="",this.fieldType="",this.options=[],this.placeholder="",this.value="",this.leading=0,this.showingHelp=!1}async componentWillLoad(){var e,t,i,o,s,l,r;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.fieldName)return void console.error("[FIELD PROPERTIES] Missing required field name");if(!this.endpoint.session)return void console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");this.templateStore=await h(this.endpoint,this.templateId),this.fieldStore=await d(this.templateId),this.roleStore=await c(this.templateId);const s=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));s?console.log("props",s):console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in fields`),this.type=s.type,this.name=s.name,this.label=s.label,this.group=s.name,this.roleName=s.role_name,this.required=s.required,this.fieldType=s.type,this.placeholder=(null===(e=s.setting)||void 0===e?void 0:e.placeholder)||"",this.value=(null===(t=s.setting)||void 0===t?void 0:t.result)||"",this.leading=(null===(i=s.setting)||void 0===i?void 0:i.leading)||0,this.setting=s.setting||{},this.options=(null===(o=s.setting)||void 0===o?void 0:o.options)||[],this.dirty=!1,this.loading=!1,console.log("Displaying settings for",this.setting)}catch(e){console.log("[FIELD PROPERTIES] Error loading template",e),this.loading=!1,null===(s=this.sdkError)||void 0===s||s.emit(new f(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(r=e.response)||void 0===r?void 0:r.data))}}handleCancel(e){var t,i,o,s,l;e.stopPropagation();const r=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));r&&(this.name=r.name,this.label=r.label,this.roleName=r.role_name,this.required=r.required,this.placeholder=(null===(t=r.setting)||void 0===t?void 0:t.placeholder)||"",this.value=(null===(i=r.setting)||void 0===i?void 0:i.result)||"",this.leading=(null===(o=r.setting)||void 0===o?void 0:o.leading)||0),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit(),null===(l=document.getElementById("verdocs-template-field-properties"))||void 0===l||l.remove()}handleSave(e){e.stopPropagation();const t={name:this.name,label:this.label||null,required:this.required,role_name:this.roleName};"checkbox_group"===this.type||"radio_button_group"===this.type?(t.setting=this.setting,t.setting.options=this.options):"textarea"===this.type||"textbox"===this.type?(t.setting={...this.setting},t.setting.result=(this.value||"").trim()):"dropdown"===this.type&&(t.setting={x:this.setting.x,y:this.setting.y,options:this.options}),console.log("FP: Will update",this.fieldName,t),n(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o,s;this.dirty=!1,p(this.fieldStore,this.fieldName,e),null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(s=document.getElementById("verdocs-template-field-properties"))||void 0===s||s.remove()})).catch((()=>{console.log("Field update failed",e)}))}handleAddOption(e){e.stopPropagation();const t={name:this.name,required:this.required,role_name:this.roleName};this.options.push("radio_button_group"===this.type?{id:P(),value:`Option ${this.options.length+1}`,selected:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:P(),value:`Option ${this.options.length+1}`,checked:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}),t.setting={...this.setting},delete t.setting.result,t.setting.options=[...this.options],n(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o,s;this.dirty=!1,p(this.fieldStore,this.fieldName,e),this.fieldName=e.name,null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(s=document.getElementById("verdocs-template-field-properties"))||void 0===s||s.remove()})).catch((()=>{console.log("Field update failed",e)}))}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")&&a(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,t;this.fieldStore.set("fields",this.fieldStore.get("fields").filter((e=>e.name!==this.fieldName))),null===(e=this.delete)||void 0===e||e.emit({templateId:this.templateId,roleName:this.roleName}),null===(t=document.getElementById("verdocs-template-field-properties"))||void 0===t||t.remove()})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}render(){var e;return this.endpoint.session?this.endpoint.session&&this.fieldStore.get("fields").some((e=>e.name===this.fieldName))?this.helpText&&this.showingHelp?t(i,null,t("h6",null,S(this.fieldType)," Settings ",t("div",{style:{flex:"1"}}),t("div",{class:"help-icon",innerHTML:D,onClick:()=>this.showingHelp=!1})),t("p",{class:"instructions",innerHTML:this.helpText})):t(i,{id:"verdocs-template-field-properties"},t("h6",null,S(this.fieldType.replace(/_/g," "))," Settings ",t("div",{style:{flex:"1"}}),this.helpText&&t("div",{class:"help-icon",innerHTML:D,onClick:()=>this.showingHelp=!0})),t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:e=>{this.label=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("div",{class:"input-label"},"Role:"),t("verdocs-select-input",{value:this.roleName,options:null===(e=this.roleStore.state)||void 0===e?void 0:e.roles.map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:e=>{this.value=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value,this.dirty=!0}})),t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),t("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked,this.dirty=!0}})),["checkbox_group","radio_button_group"].includes(this.type)&&t("verdocs-button",{size:"small",onClick:e=>this.handleAddOption(e),label:"Add Option"}),["dropdown"].includes(this.type)&&t("div",{class:"options"},t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),t("div",{class:"row-header"},t("h6",null,"ID"),t("h6",null,"Label"),t("div",{style:{width:"34px"}})),this.options.map(((e,i)=>t("div",{class:"row option-row",key:i},t("verdocs-text-input",{id:`verdocs-option-id-${e.id}`,value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[i].id=e.target.value,this.dirty=!0}}),t("verdocs-text-input",{id:`verdocs-option-value-${e.id}`,value:e.value,placeholder:"Display value",onInput:e=>{this.options[i].value=e.target.value,this.dirty=!0}}),t("button",{innerHTML:M,class:"remove-button",onClick:()=>{this.options=this.options.filter((t=>t.id!==e.id)),this.dirty=!0}})))),t("div",{class:"row-header"},t("button",{class:"add-option-button",onClick:()=>{this.options=[...this.options,{id:`option-${this.options.length+1}`,value:`Option ${this.options.length+1}`}],this.dirty=!0}},"Add Option"))),t("div",{class:"buttons"},t("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:M}),t("div",{style:{flex:"1"}}),t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(i,{class:"empty"}):t(i,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}get el(){return s(this)}};O.style='verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0px #0000001f;box-shadow:2px 2px 10px 0px #0000001f}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-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-field-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-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-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-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;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-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;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-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:#a50021}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';export{u as verdocs_checkbox,v as verdocs_component_error,m as verdocs_portal,x as verdocs_select_input,O as verdocs_template_field_properties}
|
@@ -0,0 +1 @@
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,n){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return e(t,n)};return function(t,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function s(e){try{u(r.next(e))}catch(e){a(e)}}function o(e){try{u(r["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(s,o)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++){if(a||!(r in t)){if(!a)a=Array.prototype.slice.call(t,0,r);a[r]=t[r]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-3bcd86ea.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-cd20fb77.system.js","./p-dc9c4361.system.js","./p-cacffa79.system.js","./p-bbee73c8.system.js","./p-8aae8d16.system.js","./p-d8cd6b59.system.js"],(function(e){"use strict";var t,n,r,i,a,s,o,u,l,c,d,f,p,h,v;return{setters:[function(e){t=e.r;n=e.c;r=e.h;i=e.H},function(){},function(e){a=e.V},function(e){s=e.a;o=e.c;u=e.b},function(e){l=e.V},function(e){c=e.S},function(e){d=e.g;f=e.a;p=e.u},function(e){h=e.f},function(e){v=e.c},function(){},function(){},function(){}],execute:function(){var m=function(e,t){return e.api.get("/organizations/".concat(t,"/api_key")).then((function(e){return e.data}))};var _=function(e,t,n){return e.api.post("/organizations/".concat(t,"/api_key"),n).then((function(e){return e.data}))};var g=function(e,t,n){return e.api.put("/organizations/".concat(t,"/api_key/").concat(n,"/rotate")).then((function(e){return e.data}))};var y=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/api_key/").concat(n)).then((function(e){return e.data}))};var b=function(e,t){return e.api.get("/organizations/".concat(t,"/invitation")).then((function(e){return e.data}))};var T=function(e,t,n){return e.api.post("/organizations/".concat(t,"/invitation"),n).then((function(e){return e.data}))};var x=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/invitation/").concat(n)).then((function(e){return e.data}))};var M=function(e,t,n){return e.api.post("/organizations/".concat(t,"/invitation/").concat(n,"/resend")).then((function(e){return e.data}))};var k=function(e,t){return e.api.get("/organizations/".concat(t,"/profiles")).then((function(e){return e.data}))};var w=function(e,t,n){return e.api.delete("/organizations/".concat(t,"/profiles/").concat(n)).then((function(e){return e.data}))};var G=function(e,t){return e.api.get("/organizations/".concat(t)).then((function(e){return e.data}))};var I=function(e,t,n){return e.api.patch("/organizations/".concat(t),n).then((function(e){return e.data}))};var S='verdocs-settings-api-keys{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-api-keys .table{margin:12px 0}verdocs-settings-api-keys .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-api-keys .data-col svg{width:24px;height:24px}verdocs-settings-api-keys .col-name svg,verdocs-settings-api-keys .col-client_id svg,verdocs-settings-api-keys .col-profile_id svg{fill:#a1a1aa}verdocs-settings-api-keys .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-api-keys .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-api-keys .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-api-keys .header-col.col-actions{text-align:center}verdocs-settings-api-keys verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}@media all and (max-width: 450px){verdocs-settings-api-keys .col-client_id,verdocs-settings-api-keys .col-actions{display:none}}';var C='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M5.5 3A2.5 2.5 0 003 5.5v2.879a2.5 2.5 0 00.732 1.767l6.5 6.5a2.5 2.5 0 003.536 0l2.878-2.878a2.5 2.5 0 000-3.536l-6.5-6.5A2.5 2.5 0 008.38 3H5.5zM6 7a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd" /></svg>';var A='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-5.5-2.5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zM10 12a5.99 5.99 0 00-4.793 2.39A6.483 6.483 0 0010 16.5a6.483 6.483 0 004.793-2.11A5.99 5.99 0 0010 12z" clip-rule="evenodd" /></svg>';var P='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var j='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>';var O=e("verdocs_settings_api_keys",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.memberInvited=n(this,"memberInvited",7);this.memberUpdated=n(this,"memberUpdated",7);this.memberRemoved=n(this,"memberRemoved",7);this.endpoint=a.getDefault();this.keys=[];this.creatingKey=false;this.createdKey=null;this.deletingKey=null;this.rotatingKey=null;this.newApiKeyName="";this.newApiKeyProfileId="";this.members=[]}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.newApiKeyProfileId=this.endpoint.session.profile_id;k(this.endpoint,this.endpoint.session.organization_id).then((function(t){e.members=t})).catch((function(t){var n,r,i;console.log("[SETTINGS] Error loading organization members",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to load API keys. Please try again later",{style:"error"})}));this.loadKeys();return[2]}))}))};e.prototype.loadKeys=function(){var e=this;m(this.endpoint,this.endpoint.session.organization_id).then((function(t){e.keys=t})).catch((function(t){var n,r,i;console.log("[SETTINGS] Unable to load API keys",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to load API keys. Please try again later",{style:"error"})}))};e.prototype.handleDeleteKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){y(this.endpoint,this.deletingKey.organization_id,this.deletingKey.client_id).then((function(){e.deletingKey=null;l("API key deleted",{style:"success"});e.loadKeys()})).catch((function(t){var n,r,i;e.deletingKey=null;console.log("[SETTINGS] Unable to delete API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to delete API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleRotateKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){g(this.endpoint,this.rotatingKey.organization_id,this.rotatingKey.client_id).then((function(t){e.rotatingKey=null;l("API key rotated",{style:"success"});e.loadKeys();e.createdKey=t})).catch((function(t){var n,r,i;e.rotatingKey=null;console.log("[SETTINGS] Unable to rotate API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to rotate API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleCreateKey=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){_(this.endpoint,this.endpoint.session.organization_id,{name:this.newApiKeyName,profile_id:this.newApiKeyProfileId}).then((function(t){e.creatingKey=false;e.createdKey=t;l("API key created",{style:"success"});e.loadKeys()})).catch((function(t){var n,r,i;e.creatingKey=false;console.log("[SETTINGS] Unable to create API key",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new c(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(i=t.response)===null||i===void 0?void 0:i.data));l("Unable to create API key. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.render=function(){var e=this;var t,n,a,o;var u=this.members.map((function(e){return{label:s(e),value:e.id}}));if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("verdocs-table",{data:this.keys,columns:[{id:"name",header:"Name",renderCell:function(e,t){return r("div",null,r("div",null,t.name))}},{id:"client_id",header:"Client ID",renderCell:function(e,t){return r("div",null,r("div",{innerHTML:C}),r("div",null,t.client_id))}},{id:"profile_id",header:"Acts as",renderCell:function(e,t){return r("div",null,r("div",{innerHTML:A}),r("div",null,s(t.profile)))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,r("div",{innerHTML:P,onClick:function(){return e.deletingKey=n}}),r("div",{innerHTML:j,onClick:function(){return e.rotatingKey=n}}))}}]}),r("verdocs-button",{label:"Add API Key",size:"normal",onClick:function(){return e.creatingKey=true}}),this.deletingKey&&r("verdocs-dialog",{onExit:function(){return e.deletingKey=null}},r("div",{slot:"title",class:"heading"},'Delete API key "',this.deletingKey.name,'"?'),r("div",{class:"content"},r("p",null,"Are you sure you want to delete this key? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.deletingKey=null}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleDeleteKey()}})))),this.rotatingKey&&r("verdocs-dialog",{onExit:function(){return e.rotatingKey=null}},r("div",{slot:"title",class:"heading"},'Rotate API key "',this.rotatingKey.name,'"?'),r("div",{class:"content"},r("p",null,"Are you sure you want to rotate this key? A new client secret will be generated, and the old value will become unusable. This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.rotatingKey=null}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleRotateKey()}})))),this.creatingKey&&r("verdocs-dialog",{onExit:function(){return e.creatingKey=false}},r("div",{slot:"title",class:"heading"},"Create API Key"),r("div",{class:"content"},r("verdocs-text-input",{label:"Name",placeholder:"API key name...",id:"verdocs-api-key-name",value:this.newApiKeyName,autocomplete:"off",required:true,onInput:function(t){return e.newApiKeyName=t.target.value},onFocusout:function(t){e.newApiKeyName=t.target.value.trim()}}),r("p",null,'API keys must be associated with a profile. Actions performed via API calls using this key will "act as" this profile.'),r("verdocs-select-input",{options:u,label:"Act as Profile",onInput:function(t){e.newApiKeyProfileId=t.target.value}}),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:function(){return e.creatingKey=false}}),r("verdocs-button",{size:"small",label:"OK",onClick:function(){return e.handleCreateKey()}})))),this.createdKey&&r("verdocs-dialog",{onExit:function(){return e.createdKey=null}},r("div",{slot:"title",class:"heading"},"API Key Details"),r("div",{class:"content"},r("verdocs-text-input",{label:"Name",disabled:true,value:(t=this.createdKey)===null||t===void 0?void 0:t.name}),r("verdocs-text-input",{label:"Profile",disabled:true,value:s((n=this.createdKey)===null||n===void 0?void 0:n.profile)}),r("p",null,"Please save the Client ID and Secret below. Be sure to never expose your secret key in insecure (Web or mobile environments)!"),r("verdocs-text-input",{label:"Client ID",disabled:true,value:(a=this.createdKey)===null||a===void 0?void 0:a.client_id,copyable:true}),r("verdocs-text-input",{label:"Secret Key",disabled:true,value:(o=this.createdKey)===null||o===void 0?void 0:o.client_secret,copyable:true}),r("div",{class:"buttons"},r("verdocs-button",{size:"small",label:"Done",onClick:function(){return e.createdKey=null}})))))};return e}());O.style=S;var E='verdocs-settings-members{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .role{font-size:12px;width:32px;height:32px;border-radius:32px;background:#777777;color:#ffffff;font-weight:700;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-settings-members .table{margin:12px 0}verdocs-settings-members .data-col div{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-settings-members .data-col svg{width:24px;height:24px}verdocs-settings-members .col-name svg,verdocs-settings-members .col-client_id svg,verdocs-settings-members .col-profile_id svg{fill:#a1a1aa}verdocs-settings-members .col-actions svg{fill:#ffffff;stroke:#a1a1aa}verdocs-settings-members .col-actions svg:hover{cursor:pointer;stroke:red}verdocs-settings-members .col-actions>div{-ms-flex-pack:center;justify-content:center}verdocs-settings-members .header-col.col-actions{text-align:center}verdocs-settings-members verdocs-dialog p{font-size:16px;line-height:18px;margin:0 0 1em 0}@media all and (max-width: 450px){verdocs-settings-members .col-email,verdocs-settings-members .col-phone,verdocs-settings-members .col-actions{display:none}}';var Z='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var N='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>';var z=function(e){if(e.find((function(e){return e.name==="owner"}))!==undefined)return"Owner";if(e.find((function(e){return e.name==="admin"}))!==undefined)return"Admin";if(e.find((function(e){return e.name==="member"}))!==undefined)return"Member";if(e.find((function(e){return e.name==="basic_user"}))!==undefined)return"Basic User";if(e.find((function(e){return e.name==="contact"}))!==undefined)return"Contact"};var K=function(e){if(e.find((function(e){return e.name==="owner"}))!==undefined)return"#9333ea";if(e.find((function(e){return e.name==="admin"}))!==undefined)return"#2563eb";if(e.find((function(e){return e.name==="member"}))!==undefined)return"#16a34a";if(e.find((function(e){return e.name==="basic_user"}))!==undefined)return"#ea580c";if(e.find((function(e){return e.name==="contact"}))!==undefined)return"#52525B"};var R=e("verdocs_settings_members",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.memberInvited=n(this,"memberInvited",7);this.memberUpdated=n(this,"memberUpdated",7);this.memberRemoved=n(this,"memberRemoved",7);this.endpoint=a.getDefault();this.members=[];this.invited=[];this.roles=[];this.selectedTab=0;this.invitingMember=false;this.newEmailAddress="";this.newRoleId="";this.submitting=false;this.deletingInvitation=null;this.resendingInvitation=null;this.deletingMember=null}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.loadMembers().catch((function(e){return console.log("Unknown Error",e)}));return[2]}))}))};e.prototype.loadMembers=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i,a,s,o,u;return __generator(this,(function(f){switch(f.label){case 0:f.trys.push([0,2,,3]);return[4,Promise.all([d(this.endpoint),k(this.endpoint,this.endpoint.session.organization_id),b(this.endpoint,this.endpoint.session.organization_id)])];case 1:i=f.sent(),a=i[0],s=i[1],o=i[2];this.roles=a;this.members=s;this.invited=o;this.newRoleId=((e=a.find((function(e){return e.name==="member"})))===null||e===void 0?void 0:e.id)||"";return[3,3];case 2:u=f.sent();(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(u.message,(n=u.response)===null||n===void 0?void 0:n.status,(r=u.response)===null||r===void 0?void 0:r.data));l("Unable to load members. Please try again later");return[3,3];case 3:return[2]}}))}))};e.prototype.handleInviteMember=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;T(a.getDefault(),this.endpoint.session.organization_id,{email:this.newEmailAddress,role_id:this.newRoleId,organization_id:this.endpoint.session.organization_id}).then((function(t){console.log("[SETTINGS] Invited member",t);e.invitingMember=false;e.submitting=false;e.newRoleId="";e.newEmailAddress="";l("Invitation sent!",{style:"success"});e.loadMembers()})).catch((function(t){console.log("[SETTINGS] Unable to invite member",t);e.invitingMember=false;e.submitting=false;e.newRoleId="";e.newEmailAddress="";l("Unable to invite member. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleDeleteMember=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;w(a.getDefault(),this.deletingMember.organization_id,this.deletingMember.email).then((function(){e.submitting=false;e.deletingMember=null;l("The member has been deleted.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.deletingMember=null;console.log("Delete error",t);l("Unable to cancel invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleDeleteInvitation=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;x(a.getDefault(),this.deletingInvitation.organization_id,this.deletingInvitation.email).then((function(){e.submitting=false;e.deletingInvitation=null;l("The invitation has been cancelled.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.deletingInvitation=null;console.log("Delete error",t);l("Unable to cancel invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.handleResendInvitation=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.submitting=true;M(a.getDefault(),this.resendingInvitation.organization_id,this.resendingInvitation.email).then((function(){e.submitting=false;e.resendingInvitation=null;l("The invitation has been resent.",{style:"success"});e.loadMembers()})).catch((function(t){e.submitting=false;e.resendingInvitation=null;console.log("REsend error",t);l("Unable to resend invitation. Please try again later",{style:"error"})}));return[2]}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}var t=this.roles.map((function(e){return{label:z([{name:e.name}]),value:e.id}}));return r(i,null,r("verdocs-tabs",{tabs:[{label:"Members (".concat(this.members.length,")")},{label:"Pending Invitations (".concat(this.invited.length,")")}],onSelectTab:function(t){return e.selectedTab=t.detail.index}}),this.selectedTab===0&&r("verdocs-table",{data:this.members,columns:[{id:"name",renderHeader:function(){return"Member"},renderCell:function(e,t){return r("div",{style:{display:"flex",flexDirection:"row",gap:"10px",alignItems:"center"}},r("div",{class:"role",style:{backgroundColor:K(t.roles)}},u(t)),r("span",null,s(t)))}},{id:"email",header:"E-mail Address"},{id:"phone",header:"Phone Number"},{id:"roles",header:"Role",renderCell:function(e,t){return"".concat(z(t.roles))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,n.id!==e.endpoint.session.profile_id&&r("div",{innerHTML:Z,onClick:function(){return e.deletingMember=n}}))}}]}),this.selectedTab===1&&r("verdocs-table",{data:this.invited,columns:[{id:"email",header:"E-mail Address"},{id:"generated_at",header:"Invited",renderCell:function(e,t){return r("div",null,h(new Date(t.generated_at),"MMM d, Y"))}},{id:"role_id",header:"Role",renderCell:function(t,n){var i;return r("div",null,z([{name:(i=e.roles.find((function(e){return e.id===n.role_id})))===null||i===void 0?void 0:i.name}]))}},{id:"status",header:"Status",renderCell:function(e,t){return r("div",null,o(t.status))}},{id:"actions",header:"Actions",renderCell:function(t,n){return r("div",null,r("div",{innerHTML:Z,onClick:function(){return e.deletingInvitation=n}}),r("div",{innerHTML:N,onClick:function(){return e.resendingInvitation=n}}))}}]}),r("verdocs-button",{label:"Invite New Member",size:"normal",disabled:this.submitting,onClick:function(){return e.invitingMember=true}}),this.invitingMember&&r("verdocs-dialog",{onExit:function(){return e.invitingMember=false}},r("div",{slot:"title",class:"heading"},"Invite New Member"),r("div",{class:"content"},r("verdocs-text-input",{label:"E-mail Address",placeholder:"Enter the user's email address...",id:"verdocs-invite-email",value:this.newEmailAddress,autocomplete:"off",required:true,onInput:function(t){return e.newEmailAddress=t.target.value},onFocusout:function(t){e.newEmailAddress=t.target.value.trim()}}),r("div",{style:{marginBottom:"20px"}}),r("verdocs-select-input",{options:t,label:"Role",onInput:function(t){e.newRoleId=t.target.value}}),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",label:"Cancel",disabled:this.submitting,onClick:function(){return e.invitingMember=false}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting||!this.newEmailAddress||!this.newRoleId,onClick:function(){return e.handleInviteMember()}})))),this.deletingMember&&r("verdocs-dialog",{onExit:function(){return e.deletingMember=null}},r("div",{slot:"title",class:"heading"},"Delete Member?"),r("div",{class:"content"},r("p",null,"Are you sure you want to delete this member? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.deletingMember=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleDeleteMember()}})))),this.deletingInvitation&&r("verdocs-dialog",{onExit:function(){return e.deletingInvitation=null}},r("div",{slot:"title",class:"heading"},"Cancel Invitation?"),r("div",{class:"content"},r("p",null,"Are you sure you want to cancel this invitation? This action cannot be undone."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.deletingInvitation=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleDeleteInvitation()}})))),this.resendingInvitation&&r("verdocs-dialog",{onExit:function(){return e.resendingInvitation=null}},r("div",{slot:"title",class:"heading"},"Resend Invitation?"),r("div",{class:"content"},r("p",null,"The user will receive an email reminder to join your organization."),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:function(){return e.resendingInvitation=null}}),r("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:function(){return e.handleResendInvitation()}})))))};return e}());R.style=E;var L;(function(e){e.assertEqual=function(e){return e};function t(e){}e.assertIs=t;function n(e){throw new Error}e.assertNever=n;e.arrayToEnum=function(e){var t={};for(var n=0,r=e;n<r.length;n++){var i=r[n];t[i]=i}return t};e.getValidEnumValues=function(t){var n=e.objectKeys(t).filter((function(e){return typeof t[t[e]]!=="number"}));var r={};for(var i=0,a=n;i<a.length;i++){var s=a[i];r[s]=t[s]}return e.objectValues(r)};e.objectValues=function(t){return e.objectKeys(t).map((function(e){return t[e]}))};e.objectKeys=typeof Object.keys==="function"?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n)){t.push(n)}}return t};e.find=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n];if(t(i))return i}return undefined};e.isInteger=typeof Number.isInteger==="function"?function(e){return Number.isInteger(e)}:function(e){return typeof e==="number"&&isFinite(e)&&Math.floor(e)===e};function r(e,t){if(t===void 0){t=" | "}return e.map((function(e){return typeof e==="string"?"'".concat(e,"'"):e})).join(t)}e.joinValues=r;e.jsonStringifyReplacer=function(e,t){if(typeof t==="bigint"){return t.toString()}return t}})(L||(L={}));var D;(function(e){e.mergeShapes=function(e,t){return __assign(__assign({},e),t)}})(D||(D={}));var U=L.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var B=function(e){var t=typeof e;switch(t){case"undefined":return U.undefined;case"string":return U.string;case"number":return isNaN(e)?U.nan:U.number;case"boolean":return U.boolean;case"function":return U.function;case"bigint":return U.bigint;case"symbol":return U.symbol;case"object":if(Array.isArray(e)){return U.array}if(e===null){return U.null}if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function"){return U.promise}if(typeof Map!=="undefined"&&e instanceof Map){return U.map}if(typeof Set!=="undefined"&&e instanceof Set){return U.set}if(typeof Date!=="undefined"&&e instanceof Date){return U.date}return U.object;default:return U.unknown}};var F=L.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var V=function(e){var t=JSON.stringify(e,null,2);return t.replace(/"([^"]+)":/g,"$1:")};var q=function(e){__extends(t,e);function t(t){var n=this.constructor;var r=e.call(this)||this;r.issues=[];r.addIssue=function(e){r.issues=__spreadArray(__spreadArray([],r.issues,true),[e],false)};r.addIssues=function(e){if(e===void 0){e=[]}r.issues=__spreadArray(__spreadArray([],r.issues,true),e,true)};var i=n.prototype;if(Object.setPrototypeOf){Object.setPrototypeOf(r,i)}else{r.__proto__=i}r.name="ZodError";r.issues=t;return r}Object.defineProperty(t.prototype,"errors",{get:function(){return this.issues},enumerable:false,configurable:true});t.prototype.format=function(e){var t=e||function(e){return e.message};var n={_errors:[]};var r=function(e){for(var i=0,a=e.issues;i<a.length;i++){var s=a[i];if(s.code==="invalid_union"){s.unionErrors.map(r)}else if(s.code==="invalid_return_type"){r(s.returnTypeError)}else if(s.code==="invalid_arguments"){r(s.argumentsError)}else if(s.path.length===0){n._errors.push(t(s))}else{var o=n;var u=0;while(u<s.path.length){var l=s.path[u];var c=u===s.path.length-1;if(!c){o[l]=o[l]||{_errors:[]}}else{o[l]=o[l]||{_errors:[]};o[l]._errors.push(t(s))}o=o[l];u++}}}};r(this);return n};t.prototype.toString=function(){return this.message};Object.defineProperty(t.prototype,"message",{get:function(){return JSON.stringify(this.issues,L.jsonStringifyReplacer,2)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.issues.length===0},enumerable:false,configurable:true});t.prototype.flatten=function(e){if(e===void 0){e=function(e){return e.message}}var t={};var n=[];for(var r=0,i=this.issues;r<i.length;r++){var a=i[r];if(a.path.length>0){t[a.path[0]]=t[a.path[0]]||[];t[a.path[0]].push(e(a))}else{n.push(e(a))}}return{formErrors:n,fieldErrors:t}};Object.defineProperty(t.prototype,"formErrors",{get:function(){return this.flatten()},enumerable:false,configurable:true});return t}(Error);q.create=function(e){var t=new q(e);return t};var W=function(e,t){var n;switch(e.code){case F.invalid_type:if(e.received===U.undefined){n="Required"}else{n="Expected ".concat(e.expected,", received ").concat(e.received)}break;case F.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,L.jsonStringifyReplacer));break;case F.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(L.joinValues(e.keys,", "));break;case F.invalid_union:n="Invalid input";break;case F.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(L.joinValues(e.options));break;case F.invalid_enum_value:n="Invalid enum value. Expected ".concat(L.joinValues(e.options),", received '").concat(e.received,"'");break;case F.invalid_arguments:n="Invalid function arguments";break;case F.invalid_return_type:n="Invalid function return type";break;case F.invalid_date:n="Invalid date";break;case F.invalid_string:if(typeof e.validation==="object"){if("includes"in e.validation){n='Invalid input: must include "'.concat(e.validation.includes,'"');if(typeof e.validation.position==="number"){n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position)}}else if("startsWith"in e.validation){n='Invalid input: must start with "'.concat(e.validation.startsWith,'"')}else if("endsWith"in e.validation){n='Invalid input: must end with "'.concat(e.validation.endsWith,'"')}else{L.assertNever(e.validation)}}else if(e.validation!=="regex"){n="Invalid ".concat(e.validation)}else{n="Invalid"}break;case F.too_small:if(e.type==="array")n="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)");else if(e.type==="string")n="String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)");else if(e.type==="number")n="Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum);else if(e.type==="date")n="Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum)));else n="Invalid input";break;case F.too_big:if(e.type==="array")n="Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)");else if(e.type==="string")n="String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)");else if(e.type==="number")n="Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum);else if(e.type==="bigint")n="BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum);else if(e.type==="date")n="Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum)));else n="Invalid input";break;case F.custom:n="Invalid input";break;case F.invalid_intersection_types:n="Intersection results could not be merged";break;case F.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case F.not_finite:n="Number must be finite";break;default:n=t.defaultError;L.assertNever(e)}return{message:n}};var H=W;function $(e){H=e}function J(){return H}var Y=function(e){var t=e.data,n=e.path,r=e.errorMaps,i=e.issueData;var a=__spreadArray(__spreadArray([],n,true),i.path||[],true);var s=__assign(__assign({},i),{path:a});var o="";var u=r.filter((function(e){return!!e})).slice().reverse();for(var l=0,c=u;l<c.length;l++){var d=c[l];o=d(s,{data:t,defaultError:o}).message}return __assign(__assign({},i),{path:a,message:i.message||o})};var Q=[];function X(e,t){var n=Y({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,J(),W].filter((function(e){return!!e}))});e.common.issues.push(n)}var ee=function(){function e(){this.value="valid"}e.prototype.dirty=function(){if(this.value==="valid")this.value="dirty"};e.prototype.abort=function(){if(this.value!=="aborted")this.value="aborted"};e.mergeArray=function(e,t){var n=[];for(var r=0,i=t;r<i.length;r++){var a=i[r];if(a.status==="aborted")return te;if(a.status==="dirty")e.dirty();n.push(a.value)}return{status:e.value,value:n}};e.mergeObjectAsync=function(t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,s,o,u;var l;return __generator(this,(function(c){switch(c.label){case 0:r=[];i=0,a=n;c.label=1;case 1:if(!(i<a.length))return[3,5];s=a[i];u=(o=r).push;l={};return[4,s.key];case 2:l.key=c.sent();return[4,s.value];case 3:u.apply(o,[(l.value=c.sent(),l)]);c.label=4;case 4:i++;return[3,1];case 5:return[2,e.mergeObjectSync(t,r)]}}))}))};e.mergeObjectSync=function(e,t){var n={};for(var r=0,i=t;r<i.length;r++){var a=i[r];var s=a.key,o=a.value;if(s.status==="aborted")return te;if(o.status==="aborted")return te;if(s.status==="dirty")e.dirty();if(o.status==="dirty")e.dirty();if(s.value!=="__proto__"&&(typeof o.value!=="undefined"||a.alwaysSet)){n[s.value]=o.value}}return{status:e.value,value:n}};return e}();var te=Object.freeze({status:"aborted"});var ne=function(e){return{status:"dirty",value:e}};var re=function(e){return{status:"valid",value:e}};var ie=function(e){return e.status==="aborted"};var ae=function(e){return e.status==="dirty"};var se=function(e){return e.status==="valid"};var oe=function(e){return typeof Promise!=="undefined"&&e instanceof Promise};var ue;(function(e){e.errToObj=function(e){return typeof e==="string"?{message:e}:e||{}};e.toString=function(e){return typeof e==="string"?e:e===null||e===void 0?void 0:e.message}})(ue||(ue={}));var le=function(){function e(e,t,n,r){this._cachedPath=[];this.parent=e;this.data=t;this._path=n;this._key=r}Object.defineProperty(e.prototype,"path",{get:function(){var e,t;if(!this._cachedPath.length){if(this._key instanceof Array){(e=this._cachedPath).push.apply(e,__spreadArray(__spreadArray([],this._path,false),this._key,false))}else{(t=this._cachedPath).push.apply(t,__spreadArray(__spreadArray([],this._path,false),[this._key],false))}}return this._cachedPath},enumerable:false,configurable:true});return e}();var ce=function(e,t){if(se(t)){return{success:true,data:t.value}}else{if(!e.common.issues.length){throw new Error("Validation failed but no issues detected.")}return{success:false,get error(){if(this._error)return this._error;var t=new q(e.common.issues);this._error=t;return this._error}}}};function de(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,i=e.description;if(t&&(n||r)){throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.')}if(t)return{errorMap:t,description:i};var a=function(e,t){if(e.code!=="invalid_type")return{message:t.defaultError};if(typeof t.data==="undefined"){return{message:r!==null&&r!==void 0?r:t.defaultError}}return{message:n!==null&&n!==void 0?n:t.defaultError}};return{errorMap:a,description:i}}var fe=function(){function e(e){this.spa=this.safeParseAsync;this._def=e;this.parse=this.parse.bind(this);this.safeParse=this.safeParse.bind(this);this.parseAsync=this.parseAsync.bind(this);this.safeParseAsync=this.safeParseAsync.bind(this);this.spa=this.spa.bind(this);this.refine=this.refine.bind(this);this.refinement=this.refinement.bind(this);this.superRefine=this.superRefine.bind(this);this.optional=this.optional.bind(this);this.nullable=this.nullable.bind(this);this.nullish=this.nullish.bind(this);this.array=this.array.bind(this);this.promise=this.promise.bind(this);this.or=this.or.bind(this);this.and=this.and.bind(this);this.transform=this.transform.bind(this);this.brand=this.brand.bind(this);this.default=this.default.bind(this);this.catch=this.catch.bind(this);this.describe=this.describe.bind(this);this.pipe=this.pipe.bind(this);this.readonly=this.readonly.bind(this);this.isNullable=this.isNullable.bind(this);this.isOptional=this.isOptional.bind(this)}Object.defineProperty(e.prototype,"description",{get:function(){return this._def.description},enumerable:false,configurable:true});e.prototype._getType=function(e){return B(e.data)};e.prototype._getOrReturnCtx=function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}};e.prototype._processInputParams=function(e){return{status:new ee,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}};e.prototype._parseSync=function(e){var t=this._parse(e);if(oe(t)){throw new Error("Synchronous parse encountered promise.")}return t};e.prototype._parseAsync=function(e){var t=this._parse(e);return Promise.resolve(t)};e.prototype.parse=function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error};e.prototype.safeParse=function(e,t){var n;var r={common:{issues:[],async:(n=t===null||t===void 0?void 0:t.async)!==null&&n!==void 0?n:false,contextualErrorMap:t===null||t===void 0?void 0:t.errorMap},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};var i=this._parseSync({data:e,path:r.path,parent:r});return ce(r,i)};e.prototype.parseAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.safeParseAsync(e,t)];case 1:n=r.sent();if(n.success)return[2,n.data];throw n.error}}))}))};e.prototype.safeParseAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(a){switch(a.label){case 0:n={common:{issues:[],contextualErrorMap:t===null||t===void 0?void 0:t.errorMap,async:true},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};r=this._parse({data:e,path:n.path,parent:n});return[4,oe(r)?r:Promise.resolve(r)];case 1:i=a.sent();return[2,ce(n,i)]}}))}))};e.prototype.refine=function(e,t){var n=function(e){if(typeof t==="string"||typeof t==="undefined"){return{message:t}}else if(typeof t==="function"){return t(e)}else{return t}};return this._refinement((function(t,r){var i=e(t);var a=function(){return r.addIssue(__assign({code:F.custom},n(t)))};if(typeof Promise!=="undefined"&&i instanceof Promise){return i.then((function(e){if(!e){a();return false}else{return true}}))}if(!i){a();return false}else{return true}}))};e.prototype.refinement=function(e,t){return this._refinement((function(n,r){if(!e(n)){r.addIssue(typeof t==="function"?t(n,r):t);return false}else{return true}}))};e.prototype._refinement=function(e){return new nt({schema:this,typeName:ht.ZodEffects,effect:{type:"refinement",refinement:e}})};e.prototype.superRefine=function(e){return this._refinement(e)};e.prototype.optional=function(){return rt.create(this,this._def)};e.prototype.nullable=function(){return it.create(this,this._def)};e.prototype.nullish=function(){return this.nullable().optional()};e.prototype.array=function(){return ze.create(this,this._def)};e.prototype.promise=function(){return tt.create(this,this._def)};e.prototype.or=function(e){return Le.create([this,e],this._def)};e.prototype.and=function(e){return Fe.create(this,e,this._def)};e.prototype.transform=function(e){return new nt(__assign(__assign({},de(this._def)),{schema:this,typeName:ht.ZodEffects,effect:{type:"transform",transform:e}}))};e.prototype.default=function(e){var t=typeof e==="function"?e:function(){return e};return new at(__assign(__assign({},de(this._def)),{innerType:this,defaultValue:t,typeName:ht.ZodDefault}))};e.prototype.brand=function(){return new lt(__assign({typeName:ht.ZodBranded,type:this},de(this._def)))};e.prototype.catch=function(e){var t=typeof e==="function"?e:function(){return e};return new st(__assign(__assign({},de(this._def)),{innerType:this,catchValue:t,typeName:ht.ZodCatch}))};e.prototype.describe=function(e){var t=this.constructor;return new t(__assign(__assign({},this._def),{description:e}))};e.prototype.pipe=function(e){return ct.create(this,e)};e.prototype.readonly=function(){return dt.create(this)};e.prototype.isOptional=function(){return this.safeParse(undefined).success};e.prototype.isNullable=function(){return this.safeParse(null).success};return e}();var pe=/^c[^\s-]{8,}$/i;var he=/^[a-z][a-z0-9]*$/;var ve=/^[0-9A-HJKMNP-TV-Z]{26}$/;var me=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;var _e=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;var ge="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";var ye;var be=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;var Te=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;var xe=function(e){if(e.precision){if(e.offset){return new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{".concat(e.precision,"}(([+-]\\d{2}(:?\\d{2})?)|Z)$"))}else{return new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{".concat(e.precision,"}Z$"))}}else if(e.precision===0){if(e.offset){return new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$")}else{return new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$")}}else{if(e.offset){return new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$")}else{return new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")}}};function Me(e,t){if((t==="v4"||!t)&&be.test(e)){return true}if((t==="v6"||!t)&&Te.test(e)){return true}return false}var ke=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=String(e.data)}var t=this._getType(e);if(t!==U.string){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.string,received:n.parsedType});return te}var r=new ee;var i=undefined;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="min"){if(e.data.length<o.value){i=this._getOrReturnCtx(e,i);X(i,{code:F.too_small,minimum:o.value,type:"string",inclusive:true,exact:false,message:o.message});r.dirty()}}else if(o.kind==="max"){if(e.data.length>o.value){i=this._getOrReturnCtx(e,i);X(i,{code:F.too_big,maximum:o.value,type:"string",inclusive:true,exact:false,message:o.message});r.dirty()}}else if(o.kind==="length"){var u=e.data.length>o.value;var l=e.data.length<o.value;if(u||l){i=this._getOrReturnCtx(e,i);if(u){X(i,{code:F.too_big,maximum:o.value,type:"string",inclusive:true,exact:true,message:o.message})}else if(l){X(i,{code:F.too_small,minimum:o.value,type:"string",inclusive:true,exact:true,message:o.message})}r.dirty()}}else if(o.kind==="email"){if(!_e.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"email",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="emoji"){if(!ye){ye=new RegExp(ge,"u")}if(!ye.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"emoji",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="uuid"){if(!me.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"uuid",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="cuid"){if(!pe.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"cuid",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="cuid2"){if(!he.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"cuid2",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="ulid"){if(!ve.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{validation:"ulid",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="url"){try{new URL(e.data)}catch(t){i=this._getOrReturnCtx(e,i);X(i,{validation:"url",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="regex"){o.regex.lastIndex=0;var c=o.regex.test(e.data);if(!c){i=this._getOrReturnCtx(e,i);X(i,{validation:"regex",code:F.invalid_string,message:o.message});r.dirty()}}else if(o.kind==="trim"){e.data=e.data.trim()}else if(o.kind==="includes"){if(!e.data.includes(o.value,o.position)){i=this._getOrReturnCtx(e,i);X(i,{code:F.invalid_string,validation:{includes:o.value,position:o.position},message:o.message});r.dirty()}}else if(o.kind==="toLowerCase"){e.data=e.data.toLowerCase()}else if(o.kind==="toUpperCase"){e.data=e.data.toUpperCase()}else if(o.kind==="startsWith"){if(!e.data.startsWith(o.value)){i=this._getOrReturnCtx(e,i);X(i,{code:F.invalid_string,validation:{startsWith:o.value},message:o.message});r.dirty()}}else if(o.kind==="endsWith"){if(!e.data.endsWith(o.value)){i=this._getOrReturnCtx(e,i);X(i,{code:F.invalid_string,validation:{endsWith:o.value},message:o.message});r.dirty()}}else if(o.kind==="datetime"){var d=xe(o);if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);X(i,{code:F.invalid_string,validation:"datetime",message:o.message});r.dirty()}}else if(o.kind==="ip"){if(!Me(e.data,o.version)){i=this._getOrReturnCtx(e,i);X(i,{validation:"ip",code:F.invalid_string,message:o.message});r.dirty()}}else{L.assertNever(o)}}return{status:r.value,value:e.data}};t.prototype._regex=function(e,t,n){return this.refinement((function(t){return e.test(t)}),__assign({validation:t,code:F.invalid_string},ue.errToObj(n)))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.email=function(e){return this._addCheck(__assign({kind:"email"},ue.errToObj(e)))};t.prototype.url=function(e){return this._addCheck(__assign({kind:"url"},ue.errToObj(e)))};t.prototype.emoji=function(e){return this._addCheck(__assign({kind:"emoji"},ue.errToObj(e)))};t.prototype.uuid=function(e){return this._addCheck(__assign({kind:"uuid"},ue.errToObj(e)))};t.prototype.cuid=function(e){return this._addCheck(__assign({kind:"cuid"},ue.errToObj(e)))};t.prototype.cuid2=function(e){return this._addCheck(__assign({kind:"cuid2"},ue.errToObj(e)))};t.prototype.ulid=function(e){return this._addCheck(__assign({kind:"ulid"},ue.errToObj(e)))};t.prototype.ip=function(e){return this._addCheck(__assign({kind:"ip"},ue.errToObj(e)))};t.prototype.datetime=function(e){var t;if(typeof e==="string"){return this._addCheck({kind:"datetime",precision:null,offset:false,message:e})}return this._addCheck(__assign({kind:"datetime",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,offset:(t=e===null||e===void 0?void 0:e.offset)!==null&&t!==void 0?t:false},ue.errToObj(e===null||e===void 0?void 0:e.message)))};t.prototype.regex=function(e,t){return this._addCheck(__assign({kind:"regex",regex:e},ue.errToObj(t)))};t.prototype.includes=function(e,t){return this._addCheck(__assign({kind:"includes",value:e,position:t===null||t===void 0?void 0:t.position},ue.errToObj(t===null||t===void 0?void 0:t.message)))};t.prototype.startsWith=function(e,t){return this._addCheck(__assign({kind:"startsWith",value:e},ue.errToObj(t)))};t.prototype.endsWith=function(e,t){return this._addCheck(__assign({kind:"endsWith",value:e},ue.errToObj(t)))};t.prototype.min=function(e,t){return this._addCheck(__assign({kind:"min",value:e},ue.errToObj(t)))};t.prototype.max=function(e,t){return this._addCheck(__assign({kind:"max",value:e},ue.errToObj(t)))};t.prototype.length=function(e,t){return this._addCheck(__assign({kind:"length",value:e},ue.errToObj(t)))};t.prototype.nonempty=function(e){return this.min(1,ue.errToObj(e))};t.prototype.trim=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"trim"}],false)}))};t.prototype.toLowerCase=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"toLowerCase"}],false)}))};t.prototype.toUpperCase=function(){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:"toUpperCase"}],false)}))};Object.defineProperty(t.prototype,"isDatetime",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="datetime"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmail",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="email"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isURL",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="url"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmoji",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="emoji"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isUUID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="uuid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isCUID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="cuid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isCUID2",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="cuid2"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isULID",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="ulid"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isIP",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="ip"}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"minLength",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxLength",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});return t}(fe);ke.create=function(e){var t;return new ke(__assign({checks:[],typeName:ht.ZodString,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false},de(e)))};function we(e,t){var n=(e.toString().split(".")[1]||"").length;var r=(t.toString().split(".")[1]||"").length;var i=n>r?n:r;var a=parseInt(e.toFixed(i).replace(".",""));var s=parseInt(t.toFixed(i).replace(".",""));return a%s/Math.pow(10,i)}var Ge=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.min=t.gte;t.max=t.lte;t.step=t.multipleOf;return t}t.prototype._parse=function(e){if(this._def.coerce){e.data=Number(e.data)}var t=this._getType(e);if(t!==U.number){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.number,received:n.parsedType});return te}var r=undefined;var i=new ee;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="int"){if(!L.isInteger(e.data)){r=this._getOrReturnCtx(e,r);X(r,{code:F.invalid_type,expected:"integer",received:"float",message:o.message});i.dirty()}}else if(o.kind==="min"){var u=o.inclusive?e.data<o.value:e.data<=o.value;if(u){r=this._getOrReturnCtx(e,r);X(r,{code:F.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:false,message:o.message});i.dirty()}}else if(o.kind==="max"){var l=o.inclusive?e.data>o.value:e.data>=o.value;if(l){r=this._getOrReturnCtx(e,r);X(r,{code:F.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:false,message:o.message});i.dirty()}}else if(o.kind==="multipleOf"){if(we(e.data,o.value)!==0){r=this._getOrReturnCtx(e,r);X(r,{code:F.not_multiple_of,multipleOf:o.value,message:o.message});i.dirty()}}else if(o.kind==="finite"){if(!Number.isFinite(e.data)){r=this._getOrReturnCtx(e,r);X(r,{code:F.not_finite,message:o.message});i.dirty()}}else{L.assertNever(o)}}return{status:i.value,value:e.data}};t.prototype.gte=function(e,t){return this.setLimit("min",e,true,ue.toString(t))};t.prototype.gt=function(e,t){return this.setLimit("min",e,false,ue.toString(t))};t.prototype.lte=function(e,t){return this.setLimit("max",e,true,ue.toString(t))};t.prototype.lt=function(e,t){return this.setLimit("max",e,false,ue.toString(t))};t.prototype.setLimit=function(e,n,r,i){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:e,value:n,inclusive:r,message:ue.toString(i)}],false)}))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.int=function(e){return this._addCheck({kind:"int",message:ue.toString(e)})};t.prototype.positive=function(e){return this._addCheck({kind:"min",value:0,inclusive:false,message:ue.toString(e)})};t.prototype.negative=function(e){return this._addCheck({kind:"max",value:0,inclusive:false,message:ue.toString(e)})};t.prototype.nonpositive=function(e){return this._addCheck({kind:"max",value:0,inclusive:true,message:ue.toString(e)})};t.prototype.nonnegative=function(e){return this._addCheck({kind:"min",value:0,inclusive:true,message:ue.toString(e)})};t.prototype.multipleOf=function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ue.toString(t)})};t.prototype.finite=function(e){return this._addCheck({kind:"finite",message:ue.toString(e)})};t.prototype.safe=function(e){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:ue.toString(e)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:ue.toString(e)})};Object.defineProperty(t.prototype,"minValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isInt",{get:function(){return!!this._def.checks.find((function(e){return e.kind==="int"||e.kind==="multipleOf"&&L.isInteger(e.value)}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFinite",{get:function(){var e=null,t=null;for(var n=0,r=this._def.checks;n<r.length;n++){var i=r[n];if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf"){return true}else if(i.kind==="min"){if(t===null||i.value>t)t=i.value}else if(i.kind==="max"){if(e===null||i.value<e)e=i.value}}return Number.isFinite(t)&&Number.isFinite(e)},enumerable:false,configurable:true});return t}(fe);Ge.create=function(e){return new Ge(__assign({checks:[],typeName:ht.ZodNumber,coerce:(e===null||e===void 0?void 0:e.coerce)||false},de(e)))};var Ie=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.min=t.gte;t.max=t.lte;return t}t.prototype._parse=function(e){if(this._def.coerce){e.data=BigInt(e.data)}var t=this._getType(e);if(t!==U.bigint){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.bigint,received:n.parsedType});return te}var r=undefined;var i=new ee;for(var a=0,s=this._def.checks;a<s.length;a++){var o=s[a];if(o.kind==="min"){var u=o.inclusive?e.data<o.value:e.data<=o.value;if(u){r=this._getOrReturnCtx(e,r);X(r,{code:F.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message});i.dirty()}}else if(o.kind==="max"){var l=o.inclusive?e.data>o.value:e.data>=o.value;if(l){r=this._getOrReturnCtx(e,r);X(r,{code:F.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message});i.dirty()}}else if(o.kind==="multipleOf"){if(e.data%o.value!==BigInt(0)){r=this._getOrReturnCtx(e,r);X(r,{code:F.not_multiple_of,multipleOf:o.value,message:o.message});i.dirty()}}else{L.assertNever(o)}}return{status:i.value,value:e.data}};t.prototype.gte=function(e,t){return this.setLimit("min",e,true,ue.toString(t))};t.prototype.gt=function(e,t){return this.setLimit("min",e,false,ue.toString(t))};t.prototype.lte=function(e,t){return this.setLimit("max",e,true,ue.toString(t))};t.prototype.lt=function(e,t){return this.setLimit("max",e,false,ue.toString(t))};t.prototype.setLimit=function(e,n,r,i){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[{kind:e,value:n,inclusive:r,message:ue.toString(i)}],false)}))};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.positive=function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:ue.toString(e)})};t.prototype.negative=function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:ue.toString(e)})};t.prototype.nonpositive=function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:ue.toString(e)})};t.prototype.nonnegative=function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:ue.toString(e)})};t.prototype.multipleOf=function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ue.toString(t)})};Object.defineProperty(t.prototype,"minValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxValue",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e},enumerable:false,configurable:true});return t}(fe);Ie.create=function(e){var t;return new Ie(__assign({checks:[],typeName:ht.ZodBigInt,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false},de(e)))};var Se=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=Boolean(e.data)}var t=this._getType(e);if(t!==U.boolean){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.boolean,received:n.parsedType});return te}return re(e.data)};return t}(fe);Se.create=function(e){return new Se(__assign({typeName:ht.ZodBoolean,coerce:(e===null||e===void 0?void 0:e.coerce)||false},de(e)))};var Ce=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(this._def.coerce){e.data=new Date(e.data)}var t=this._getType(e);if(t!==U.date){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.date,received:n.parsedType});return te}if(isNaN(e.data.getTime())){var r=this._getOrReturnCtx(e);X(r,{code:F.invalid_date});return te}var i=new ee;var a=undefined;for(var s=0,o=this._def.checks;s<o.length;s++){var u=o[s];if(u.kind==="min"){if(e.data.getTime()<u.value){a=this._getOrReturnCtx(e,a);X(a,{code:F.too_small,message:u.message,inclusive:true,exact:false,minimum:u.value,type:"date"});i.dirty()}}else if(u.kind==="max"){if(e.data.getTime()>u.value){a=this._getOrReturnCtx(e,a);X(a,{code:F.too_big,message:u.message,inclusive:true,exact:false,maximum:u.value,type:"date"});i.dirty()}}else{L.assertNever(u)}}return{status:i.value,value:new Date(e.data.getTime())}};t.prototype._addCheck=function(e){return new t(__assign(__assign({},this._def),{checks:__spreadArray(__spreadArray([],this._def.checks,true),[e],false)}))};t.prototype.min=function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ue.toString(t)})};t.prototype.max=function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ue.toString(t)})};Object.defineProperty(t.prototype,"minDate",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="min"){if(e===null||r.value>e)e=r.value}}return e!=null?new Date(e):null},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxDate",{get:function(){var e=null;for(var t=0,n=this._def.checks;t<n.length;t++){var r=n[t];if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return e!=null?new Date(e):null},enumerable:false,configurable:true});return t}(fe);Ce.create=function(e){return new Ce(__assign({checks:[],coerce:(e===null||e===void 0?void 0:e.coerce)||false,typeName:ht.ZodDate},de(e)))};var Ae=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.symbol){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.symbol,received:n.parsedType});return te}return re(e.data)};return t}(fe);Ae.create=function(e){return new Ae(__assign({typeName:ht.ZodSymbol},de(e)))};var Pe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.undefined){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.undefined,received:n.parsedType});return te}return re(e.data)};return t}(fe);Pe.create=function(e){return new Pe(__assign({typeName:ht.ZodUndefined},de(e)))};var je=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.null){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.null,received:n.parsedType});return te}return re(e.data)};return t}(fe);je.create=function(e){return new je(__assign({typeName:ht.ZodNull},de(e)))};var Oe=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._any=true;return t}t.prototype._parse=function(e){return re(e.data)};return t}(fe);Oe.create=function(e){return new Oe(__assign({typeName:ht.ZodAny},de(e)))};var Ee=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._unknown=true;return t}t.prototype._parse=function(e){return re(e.data)};return t}(fe);Ee.create=function(e){return new Ee(__assign({typeName:ht.ZodUnknown},de(e)))};var Ze=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getOrReturnCtx(e);X(t,{code:F.invalid_type,expected:U.never,received:t.parsedType});return te};return t}(fe);Ze.create=function(e){return new Ze(__assign({typeName:ht.ZodNever},de(e)))};var Ne=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.undefined){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.void,received:n.parsedType});return te}return re(e.data)};return t}(fe);Ne.create=function(e){return new Ne(__assign({typeName:ht.ZodVoid},de(e)))};var ze=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.ctx,r=t.status;var i=this._def;if(n.parsedType!==U.array){X(n,{code:F.invalid_type,expected:U.array,received:n.parsedType});return te}if(i.exactLength!==null){var a=n.data.length>i.exactLength.value;var s=n.data.length<i.exactLength.value;if(a||s){X(n,{code:a?F.too_big:F.too_small,minimum:s?i.exactLength.value:undefined,maximum:a?i.exactLength.value:undefined,type:"array",inclusive:true,exact:true,message:i.exactLength.message});r.dirty()}}if(i.minLength!==null){if(n.data.length<i.minLength.value){X(n,{code:F.too_small,minimum:i.minLength.value,type:"array",inclusive:true,exact:false,message:i.minLength.message});r.dirty()}}if(i.maxLength!==null){if(n.data.length>i.maxLength.value){X(n,{code:F.too_big,maximum:i.maxLength.value,type:"array",inclusive:true,exact:false,message:i.maxLength.message});r.dirty()}}if(n.common.async){return Promise.all(__spreadArray([],n.data,true).map((function(e,t){return i.type._parseAsync(new le(n,e,n.path,t))}))).then((function(e){return ee.mergeArray(r,e)}))}var o=__spreadArray([],n.data,true).map((function(e,t){return i.type._parseSync(new le(n,e,n.path,t))}));return ee.mergeArray(r,o)};Object.defineProperty(t.prototype,"element",{get:function(){return this._def.type},enumerable:false,configurable:true});t.prototype.min=function(e,n){return new t(__assign(__assign({},this._def),{minLength:{value:e,message:ue.toString(n)}}))};t.prototype.max=function(e,n){return new t(__assign(__assign({},this._def),{maxLength:{value:e,message:ue.toString(n)}}))};t.prototype.length=function(e,n){return new t(__assign(__assign({},this._def),{exactLength:{value:e,message:ue.toString(n)}}))};t.prototype.nonempty=function(e){return this.min(1,e)};return t}(fe);ze.create=function(e,t){return new ze(__assign({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ht.ZodArray},de(t)))};function Ke(e){if(e instanceof Re){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=rt.create(Ke(r))}return new Re(__assign(__assign({},e._def),{shape:function(){return t}}))}else if(e instanceof ze){return new ze(__assign(__assign({},e._def),{type:Ke(e.element)}))}else if(e instanceof rt){return rt.create(Ke(e.unwrap()))}else if(e instanceof it){return it.create(Ke(e.unwrap()))}else if(e instanceof Ve){return Ve.create(e.items.map((function(e){return Ke(e)})))}else{return e}}var Re=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t._cached=null;t.nonstrict=t.passthrough;t.augment=t.extend;return t}t.prototype._getCached=function(){if(this._cached!==null)return this._cached;var e=this._def.shape();var t=L.objectKeys(e);return this._cached={shape:e,keys:t}};t.prototype._parse=function(e){var t=this;var n=this._getType(e);if(n!==U.object){var r=this._getOrReturnCtx(e);X(r,{code:F.invalid_type,expected:U.object,received:r.parsedType});return te}var i=this._processInputParams(e),a=i.status,s=i.ctx;var o=this._getCached(),u=o.shape,l=o.keys;var c=[];if(!(this._def.catchall instanceof Ze&&this._def.unknownKeys==="strip")){for(var d in s.data){if(!l.includes(d)){c.push(d)}}}var f=[];for(var p=0,h=l;p<h.length;p++){var d=h[p];var v=u[d];var m=s.data[d];f.push({key:{status:"valid",value:d},value:v._parse(new le(s,m,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof Ze){var _=this._def.unknownKeys;if(_==="passthrough"){for(var g=0,y=c;g<y.length;g++){var d=y[g];f.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}})}}else if(_==="strict"){if(c.length>0){X(s,{code:F.unrecognized_keys,keys:c});a.dirty()}}else if(_==="strip");else{throw new Error("Internal ZodObject error: invalid unknownKeys value.")}}else{var b=this._def.catchall;for(var T=0,x=c;T<x.length;T++){var d=x[T];var m=s.data[d];f.push({key:{status:"valid",value:d},value:b._parse(new le(s,m,s.path,d)),alwaysSet:d in s.data})}}if(s.common.async){return Promise.resolve().then((function(){return __awaiter(t,void 0,void 0,(function(){var e,t,n,r,i,a,s;var o;return __generator(this,(function(u){switch(u.label){case 0:e=[];t=0,n=f;u.label=1;case 1:if(!(t<n.length))return[3,5];r=n[t];return[4,r.key];case 2:i=u.sent();s=(a=e).push;o={key:i};return[4,r.value];case 3:s.apply(a,[(o.value=u.sent(),o.alwaysSet=r.alwaysSet,o)]);u.label=4;case 4:t++;return[3,1];case 5:return[2,e]}}))}))})).then((function(e){return ee.mergeObjectSync(a,e)}))}else{return ee.mergeObjectSync(a,f)}};Object.defineProperty(t.prototype,"shape",{get:function(){return this._def.shape()},enumerable:false,configurable:true});t.prototype.strict=function(e){var n=this;return new t(__assign(__assign(__assign({},this._def),{unknownKeys:"strict"}),e!==undefined?{errorMap:function(t,r){var i,a,s,o;var u=(s=(a=(i=n._def).errorMap)===null||a===void 0?void 0:a.call(i,t,r).message)!==null&&s!==void 0?s:r.defaultError;if(t.code==="unrecognized_keys")return{message:(o=ue.errToObj(e).message)!==null&&o!==void 0?o:u};return{message:u}}}:{}))};t.prototype.strip=function(){return new t(__assign(__assign({},this._def),{unknownKeys:"strip"}))};t.prototype.passthrough=function(){return new t(__assign(__assign({},this._def),{unknownKeys:"passthrough"}))};t.prototype.extend=function(e){var n=this;return new t(__assign(__assign({},this._def),{shape:function(){return __assign(__assign({},n._def.shape()),e)}}))};t.prototype.merge=function(e){var n=this;var r=new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return __assign(__assign({},n._def.shape()),e._def.shape())},typeName:ht.ZodObject});return r};t.prototype.setKey=function(e,t){var n;return this.augment((n={},n[e]=t,n))};t.prototype.catchall=function(e){return new t(__assign(__assign({},this._def),{catchall:e}))};t.prototype.pick=function(e){var n=this;var r={};L.objectKeys(e).forEach((function(t){if(e[t]&&n.shape[t]){r[t]=n.shape[t]}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.omit=function(e){var n=this;var r={};L.objectKeys(this.shape).forEach((function(t){if(!e[t]){r[t]=n.shape[t]}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.deepPartial=function(){return Ke(this)};t.prototype.partial=function(e){var n=this;var r={};L.objectKeys(this.shape).forEach((function(t){var i=n.shape[t];if(e&&!e[t]){r[t]=i}else{r[t]=i.optional()}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.required=function(e){var n=this;var r={};L.objectKeys(this.shape).forEach((function(t){if(e&&!e[t]){r[t]=n.shape[t]}else{var i=n.shape[t];var a=i;while(a instanceof rt){a=a._def.innerType}r[t]=a}}));return new t(__assign(__assign({},this._def),{shape:function(){return r}}))};t.prototype.keyof=function(){return Qe(L.objectKeys(this.shape))};return t}(fe);Re.create=function(e,t){return new Re(__assign({shape:function(){return e},unknownKeys:"strip",catchall:Ze.create(),typeName:ht.ZodObject},de(t)))};Re.strictCreate=function(e,t){return new Re(__assign({shape:function(){return e},unknownKeys:"strict",catchall:Ze.create(),typeName:ht.ZodObject},de(t)))};Re.lazycreate=function(e,t){return new Re(__assign({shape:e,unknownKeys:"strip",catchall:Ze.create(),typeName:ht.ZodObject},de(t)))};var Le=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t;var n=this;var r=this._processInputParams(e).ctx;var i=this._def.options;function a(e){var t;for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.result.status==="valid"){return a.result}}for(var s=0,o=e;s<o.length;s++){var a=o[s];if(a.result.status==="dirty"){(t=r.common.issues).push.apply(t,a.ctx.common.issues);return a.result}}var u=e.map((function(e){return new q(e.ctx.common.issues)}));X(r,{code:F.invalid_union,unionErrors:u});return te}if(r.common.async){return Promise.all(i.map((function(e){return __awaiter(n,void 0,void 0,(function(){var t;var n;return __generator(this,(function(i){switch(i.label){case 0:t=__assign(__assign({},r),{common:__assign(__assign({},r.common),{issues:[]}),parent:null});n={};return[4,e._parseAsync({data:r.data,path:r.path,parent:t})];case 1:return[2,(n.result=i.sent(),n.ctx=t,n)]}}))}))}))).then(a)}else{var s=undefined;var o=[];for(var u=0,l=i;u<l.length;u++){var c=l[u];var d=__assign(__assign({},r),{common:__assign(__assign({},r.common),{issues:[]}),parent:null});var f=c._parseSync({data:r.data,path:r.path,parent:d});if(f.status==="valid"){return f}else if(f.status==="dirty"&&!s){s={result:f,ctx:d}}if(d.common.issues.length){o.push(d.common.issues)}}if(s){(t=r.common.issues).push.apply(t,s.ctx.common.issues);return s.result}var p=o.map((function(e){return new q(e)}));X(r,{code:F.invalid_union,unionErrors:p});return te}};Object.defineProperty(t.prototype,"options",{get:function(){return this._def.options},enumerable:false,configurable:true});return t}(fe);Le.create=function(e,t){return new Le(__assign({options:e,typeName:ht.ZodUnion},de(t)))};var De=function(e){if(e instanceof Je){return De(e.schema)}else if(e instanceof nt){return De(e.innerType())}else if(e instanceof Ye){return[e.value]}else if(e instanceof Xe){return e.options}else if(e instanceof et){return Object.keys(e.enum)}else if(e instanceof at){return De(e._def.innerType)}else if(e instanceof Pe){return[undefined]}else if(e instanceof je){return[null]}else{return null}};var Ue=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==U.object){X(t,{code:F.invalid_type,expected:U.object,received:t.parsedType});return te}var n=this.discriminator;var r=t.data[n];var i=this.optionsMap.get(r);if(!i){X(t,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]});return te}if(t.common.async){return i._parseAsync({data:t.data,path:t.path,parent:t})}else{return i._parseSync({data:t.data,path:t.path,parent:t})}};Object.defineProperty(t.prototype,"discriminator",{get:function(){return this._def.discriminator},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"options",{get:function(){return this._def.options},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"optionsMap",{get:function(){return this._def.optionsMap},enumerable:false,configurable:true});t.create=function(e,n,r){var i=new Map;for(var a=0,s=n;a<s.length;a++){var o=s[a];var u=De(o.shape[e]);if(!u){throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"))}for(var l=0,c=u;l<c.length;l++){var d=c[l];if(i.has(d)){throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(d)))}i.set(d,o)}}return new t(__assign({typeName:ht.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i},de(r)))};return t}(fe);function Be(e,t){var n=B(e);var r=B(t);if(e===t){return{valid:true,data:e}}else if(n===U.object&&r===U.object){var i=L.objectKeys(t);var a=L.objectKeys(e).filter((function(e){return i.indexOf(e)!==-1}));var s=__assign(__assign({},e),t);for(var o=0,u=a;o<u.length;o++){var l=u[o];var c=Be(e[l],t[l]);if(!c.valid){return{valid:false}}s[l]=c.data}return{valid:true,data:s}}else if(n===U.array&&r===U.array){if(e.length!==t.length){return{valid:false}}var d=[];for(var f=0;f<e.length;f++){var p=e[f];var h=t[f];var c=Be(p,h);if(!c.valid){return{valid:false}}d.push(c.data)}return{valid:true,data:d}}else if(n===U.date&&r===U.date&&+e===+t){return{valid:true,data:e}}else{return{valid:false}}}var Fe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;var i=function(e,t){if(ie(e)||ie(t)){return te}var i=Be(e.value,t.value);if(!i.valid){X(r,{code:F.invalid_intersection_types});return te}if(ae(e)||ae(t)){n.dirty()}return{status:n.value,value:i.data}};if(r.common.async){return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((function(e){var t=e[0],n=e[1];return i(t,n)}))}else{return i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};return t}(fe);Fe.create=function(e,t,n){return new Fe(__assign({left:e,right:t,typeName:ht.ZodIntersection},de(n)))};var Ve=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==U.array){X(i,{code:F.invalid_type,expected:U.array,received:i.parsedType});return te}if(i.data.length<this._def.items.length){X(i,{code:F.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"});return te}var a=this._def.rest;if(!a&&i.data.length>this._def.items.length){X(i,{code:F.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"});r.dirty()}var s=__spreadArray([],i.data,true).map((function(e,n){var r=t._def.items[n]||t._def.rest;if(!r)return null;return r._parse(new le(i,e,i.path,n))})).filter((function(e){return!!e}));if(i.common.async){return Promise.all(s).then((function(e){return ee.mergeArray(r,e)}))}else{return ee.mergeArray(r,s)}};Object.defineProperty(t.prototype,"items",{get:function(){return this._def.items},enumerable:false,configurable:true});t.prototype.rest=function(e){return new t(__assign(__assign({},this._def),{rest:e}))};return t}(fe);Ve.create=function(e,t){if(!Array.isArray(e)){throw new Error("You must pass an array of schemas to z.tuple([ ... ])")}return new Ve(__assign({items:e,typeName:ht.ZodTuple,rest:null},de(t)))};var qe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"keySchema",{get:function(){return this._def.keyType},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"valueSchema",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==U.object){X(r,{code:F.invalid_type,expected:U.object,received:r.parsedType});return te}var i=[];var a=this._def.keyType;var s=this._def.valueType;for(var o in r.data){i.push({key:a._parse(new le(r,o,r.path,o)),value:s._parse(new le(r,r.data[o],r.path,o))})}if(r.common.async){return ee.mergeObjectAsync(n,i)}else{return ee.mergeObjectSync(n,i)}};Object.defineProperty(t.prototype,"element",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.create=function(e,n,r){if(n instanceof fe){return new t(__assign({keyType:e,valueType:n,typeName:ht.ZodRecord},de(r)))}return new t(__assign({keyType:ke.create(),valueType:e,typeName:ht.ZodRecord},de(n)))};return t}(fe);var We=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"keySchema",{get:function(){return this._def.keyType},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"valueSchema",{get:function(){return this._def.valueType},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.parsedType!==U.map){X(i,{code:F.invalid_type,expected:U.map,received:i.parsedType});return te}var a=this._def.keyType;var s=this._def.valueType;var o=__spreadArray([],i.data.entries(),true).map((function(e,t){var n=e[0],r=e[1];return{key:a._parse(new le(i,n,i.path,[t,"key"])),value:s._parse(new le(i,r,i.path,[t,"value"]))}}));if(i.common.async){var u=new Map;return Promise.resolve().then((function(){return __awaiter(t,void 0,void 0,(function(){var e,t,n,i,a;return __generator(this,(function(s){switch(s.label){case 0:e=0,t=o;s.label=1;case 1:if(!(e<t.length))return[3,5];n=t[e];return[4,n.key];case 2:i=s.sent();return[4,n.value];case 3:a=s.sent();if(i.status==="aborted"||a.status==="aborted"){return[2,te]}if(i.status==="dirty"||a.status==="dirty"){r.dirty()}u.set(i.value,a.value);s.label=4;case 4:e++;return[3,1];case 5:return[2,{status:r.value,value:u}]}}))}))}))}else{var l=new Map;for(var c=0,d=o;c<d.length;c++){var f=d[c];var p=f.key;var h=f.value;if(p.status==="aborted"||h.status==="aborted"){return te}if(p.status==="dirty"||h.status==="dirty"){r.dirty()}l.set(p.value,h.value)}return{status:r.value,value:l}}};return t}(fe);We.create=function(e,t,n){return new We(__assign({valueType:t,keyType:e,typeName:ht.ZodMap},de(n)))};var He=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e),n=t.status,r=t.ctx;if(r.parsedType!==U.set){X(r,{code:F.invalid_type,expected:U.set,received:r.parsedType});return te}var i=this._def;if(i.minSize!==null){if(r.data.size<i.minSize.value){X(r,{code:F.too_small,minimum:i.minSize.value,type:"set",inclusive:true,exact:false,message:i.minSize.message});n.dirty()}}if(i.maxSize!==null){if(r.data.size>i.maxSize.value){X(r,{code:F.too_big,maximum:i.maxSize.value,type:"set",inclusive:true,exact:false,message:i.maxSize.message});n.dirty()}}var a=this._def.valueType;function s(e){var t=new Set;for(var r=0,i=e;r<i.length;r++){var a=i[r];if(a.status==="aborted")return te;if(a.status==="dirty")n.dirty();t.add(a.value)}return{status:n.value,value:t}}var o=__spreadArray([],r.data.values(),true).map((function(e,t){return a._parse(new le(r,e,r.path,t))}));if(r.common.async){return Promise.all(o).then((function(e){return s(e)}))}else{return s(o)}};t.prototype.min=function(e,n){return new t(__assign(__assign({},this._def),{minSize:{value:e,message:ue.toString(n)}}))};t.prototype.max=function(e,n){return new t(__assign(__assign({},this._def),{maxSize:{value:e,message:ue.toString(n)}}))};t.prototype.size=function(e,t){return this.min(e,t).max(e,t)};t.prototype.nonempty=function(e){return this.min(1,e)};return t}(fe);He.create=function(e,t){return new He(__assign({valueType:e,minSize:null,maxSize:null,typeName:ht.ZodSet},de(t)))};var $e=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.validate=t.implement;return t}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==U.function){X(t,{code:F.invalid_type,expected:U.function,received:t.parsedType});return te}function n(e,n){return Y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),W].filter((function(e){return!!e})),issueData:{code:F.invalid_arguments,argumentsError:n}})}function r(e,n){return Y({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,J(),W].filter((function(e){return!!e})),issueData:{code:F.invalid_return_type,returnTypeError:n}})}var i={errorMap:t.common.contextualErrorMap};var a=t.data;if(this._def.returns instanceof tt){var s=this;return re((function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return __awaiter(this,void 0,void 0,(function(){var t,o,u,l;return __generator(this,(function(c){switch(c.label){case 0:t=new q([]);return[4,s._def.args.parseAsync(e,i).catch((function(r){t.addIssue(n(e,r));throw t}))];case 1:o=c.sent();return[4,Reflect.apply(a,this,o)];case 2:u=c.sent();return[4,s._def.returns._def.type.parseAsync(u,i).catch((function(e){t.addIssue(r(u,e));throw t}))];case 3:l=c.sent();return[2,l]}}))}))}))}else{var o=this;return re((function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var s=o._def.args.safeParse(e,i);if(!s.success){throw new q([n(e,s.error)])}var u=Reflect.apply(a,this,s.data);var l=o._def.returns.safeParse(u,i);if(!l.success){throw new q([r(u,l.error)])}return l.data}))}};t.prototype.parameters=function(){return this._def.args};t.prototype.returnType=function(){return this._def.returns};t.prototype.args=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}return new t(__assign(__assign({},this._def),{args:Ve.create(e).rest(Ee.create())}))};t.prototype.returns=function(e){return new t(__assign(__assign({},this._def),{returns:e}))};t.prototype.implement=function(e){var t=this.parse(e);return t};t.prototype.strictImplement=function(e){var t=this.parse(e);return t};t.create=function(e,n,r){return new t(__assign({args:e?e:Ve.create([]).rest(Ee.create()),returns:n||Ee.create(),typeName:ht.ZodFunction},de(r)))};return t}(fe);var Je=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"schema",{get:function(){return this._def.getter()},enumerable:false,configurable:true});t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=this._def.getter();return n._parse({data:t.data,path:t.path,parent:t})};return t}(fe);Je.create=function(e,t){return new Je(__assign({getter:e,typeName:ht.ZodLazy},de(t)))};var Ye=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);X(t,{received:t.data,code:F.invalid_literal,expected:this._def.value});return te}return{status:"valid",value:e.data}};Object.defineProperty(t.prototype,"value",{get:function(){return this._def.value},enumerable:false,configurable:true});return t}(fe);Ye.create=function(e,t){return new Ye(__assign({value:e,typeName:ht.ZodLiteral},de(t)))};function Qe(e,t){return new Xe(__assign({values:e,typeName:ht.ZodEnum},de(t)))}var Xe=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){if(typeof e.data!=="string"){var t=this._getOrReturnCtx(e);var n=this._def.values;X(t,{expected:L.joinValues(n),received:t.parsedType,code:F.invalid_type});return te}if(this._def.values.indexOf(e.data)===-1){var t=this._getOrReturnCtx(e);var n=this._def.values;X(t,{received:t.data,code:F.invalid_enum_value,options:n});return te}return re(e.data)};Object.defineProperty(t.prototype,"options",{get:function(){return this._def.values},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"enum",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"Values",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"Enum",{get:function(){var e={};for(var t=0,n=this._def.values;t<n.length;t++){var r=n[t];e[r]=r}return e},enumerable:false,configurable:true});t.prototype.extract=function(e){return t.create(e)};t.prototype.exclude=function(e){return t.create(this.options.filter((function(t){return!e.includes(t)})))};return t}(fe);Xe.create=Qe;var et=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=L.getValidEnumValues(this._def.values);var n=this._getOrReturnCtx(e);if(n.parsedType!==U.string&&n.parsedType!==U.number){var r=L.objectValues(t);X(n,{expected:L.joinValues(r),received:n.parsedType,code:F.invalid_type});return te}if(t.indexOf(e.data)===-1){var r=L.objectValues(t);X(n,{received:n.data,code:F.invalid_enum_value,options:r});return te}return re(e.data)};Object.defineProperty(t.prototype,"enum",{get:function(){return this._def.values},enumerable:false,configurable:true});return t}(fe);et.create=function(e,t){return new et(__assign({values:e,typeName:ht.ZodNativeEnum},de(t)))};var tt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.unwrap=function(){return this._def.type};t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e).ctx;if(n.parsedType!==U.promise&&n.common.async===false){X(n,{code:F.invalid_type,expected:U.promise,received:n.parsedType});return te}var r=n.parsedType===U.promise?n.data:Promise.resolve(n.data);return re(r.then((function(e){return t._def.type.parseAsync(e,{path:n.path,errorMap:n.common.contextualErrorMap})})))};return t}(fe);tt.create=function(e,t){return new tt(__assign({type:e,typeName:ht.ZodPromise},de(t)))};var nt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.innerType=function(){return this._def.schema};t.prototype.sourceType=function(){return this._def.schema._def.typeName===ht.ZodEffects?this._def.schema.sourceType():this._def.schema};t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;var a=this._def.effect||null;var s={addIssue:function(e){X(i,e);if(e.fatal){r.abort()}else{r.dirty()}},get path(){return i.path}};s.addIssue=s.addIssue.bind(s);if(a.type==="preprocess"){var o=a.transform(i.data,s);if(i.common.issues.length){return{status:"dirty",value:i.data}}if(i.common.async){return Promise.resolve(o).then((function(e){return t._def.schema._parseAsync({data:e,path:i.path,parent:i})}))}else{return this._def.schema._parseSync({data:o,path:i.path,parent:i})}}if(a.type==="refinement"){var u=function(e){var t=a.refinement(e,s);if(i.common.async){return Promise.resolve(t)}if(t instanceof Promise){throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.")}return e};if(i.common.async===false){var l=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(l.status==="aborted")return te;if(l.status==="dirty")r.dirty();u(l.value);return{status:r.value,value:l.value}}else{return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){if(e.status==="aborted")return te;if(e.status==="dirty")r.dirty();return u(e.value).then((function(){return{status:r.value,value:e.value}}))}))}}if(a.type==="transform"){if(i.common.async===false){var c=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!se(c))return c;var d=a.transform(c.value,s);if(d instanceof Promise){throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.")}return{status:r.value,value:d}}else{return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((function(e){if(!se(e))return e;return Promise.resolve(a.transform(e.value,s)).then((function(e){return{status:r.value,value:e}}))}))}}L.assertNever(a)};return t}(fe);nt.create=function(e,t,n){return new nt(__assign({schema:e,typeName:ht.ZodEffects,effect:t},de(n)))};nt.createWithPreprocess=function(e,t,n){return new nt(__assign({schema:t,effect:{type:"preprocess",transform:e},typeName:ht.ZodEffects},de(n)))};var rt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t===U.undefined){return re(undefined)}return this._def.innerType._parse(e)};t.prototype.unwrap=function(){return this._def.innerType};return t}(fe);rt.create=function(e,t){return new rt(__assign({innerType:e,typeName:ht.ZodOptional},de(t)))};var it=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t===U.null){return re(null)}return this._def.innerType._parse(e)};t.prototype.unwrap=function(){return this._def.innerType};return t}(fe);it.create=function(e,t){return new it(__assign({innerType:e,typeName:ht.ZodNullable},de(t)))};var at=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=t.data;if(t.parsedType===U.undefined){n=this._def.defaultValue()}return this._def.innerType._parse({data:n,path:t.path,parent:t})};t.prototype.removeDefault=function(){return this._def.innerType};return t}(fe);at.create=function(e,t){return new at(__assign({innerType:e,typeName:ht.ZodDefault,defaultValue:typeof t.default==="function"?t.default:function(){return t.default}},de(t)))};var st=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e).ctx;var r=__assign(__assign({},n),{common:__assign(__assign({},n.common),{issues:[]})});var i=this._def.innerType._parse({data:r.data,path:r.path,parent:__assign({},r)});if(oe(i)){return i.then((function(e){return{status:"valid",value:e.status==="valid"?e.value:t._def.catchValue({get error(){return new q(r.common.issues)},input:r.data})}}))}else{return{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new q(r.common.issues)},input:r.data})}}};t.prototype.removeCatch=function(){return this._def.innerType};return t}(fe);st.create=function(e,t){return new st(__assign({innerType:e,typeName:ht.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:function(){return t.catch}},de(t)))};var ot=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._getType(e);if(t!==U.nan){var n=this._getOrReturnCtx(e);X(n,{code:F.invalid_type,expected:U.nan,received:n.parsedType});return te}return{status:"valid",value:e.data}};return t}(fe);ot.create=function(e){return new ot(__assign({typeName:ht.ZodNaN},de(e)))};var ut=Symbol("zod_brand");var lt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._processInputParams(e).ctx;var n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})};t.prototype.unwrap=function(){return this._def.type};return t}(fe);var ct=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this;var n=this._processInputParams(e),r=n.status,i=n.ctx;if(i.common.async){var a=function(){return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this._def.in._parseAsync({data:i.data,path:i.path,parent:i})];case 1:e=t.sent();if(e.status==="aborted")return[2,te];if(e.status==="dirty"){r.dirty();return[2,ne(e.value)]}else{return[2,this._def.out._parseAsync({data:e.value,path:i.path,parent:i})]}return[2]}}))}))};return a()}else{var s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});if(s.status==="aborted")return te;if(s.status==="dirty"){r.dirty();return{status:"dirty",value:s.value}}else{return this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}};t.create=function(e,n){return new t({in:e,out:n,typeName:ht.ZodPipeline})};return t}(fe);var dt=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype._parse=function(e){var t=this._def.innerType._parse(e);if(se(t)){t.value=Object.freeze(t.value)}return t};return t}(fe);dt.create=function(e,t){return new dt(__assign({innerType:e,typeName:ht.ZodReadonly},de(t)))};var ft=function(e,t,n){if(t===void 0){t={}}if(e)return Oe.create().superRefine((function(r,i){var a,s;if(!e(r)){var o=typeof t==="function"?t(r):typeof t==="string"?{message:t}:t;var u=(s=(a=o.fatal)!==null&&a!==void 0?a:n)!==null&&s!==void 0?s:true;var l=typeof o==="string"?{message:o}:o;i.addIssue(__assign(__assign({code:"custom"},l),{fatal:u}))}}));return Oe.create()};var pt={object:Re.lazycreate};var ht;(function(e){e["ZodString"]="ZodString";e["ZodNumber"]="ZodNumber";e["ZodNaN"]="ZodNaN";e["ZodBigInt"]="ZodBigInt";e["ZodBoolean"]="ZodBoolean";e["ZodDate"]="ZodDate";e["ZodSymbol"]="ZodSymbol";e["ZodUndefined"]="ZodUndefined";e["ZodNull"]="ZodNull";e["ZodAny"]="ZodAny";e["ZodUnknown"]="ZodUnknown";e["ZodNever"]="ZodNever";e["ZodVoid"]="ZodVoid";e["ZodArray"]="ZodArray";e["ZodObject"]="ZodObject";e["ZodUnion"]="ZodUnion";e["ZodDiscriminatedUnion"]="ZodDiscriminatedUnion";e["ZodIntersection"]="ZodIntersection";e["ZodTuple"]="ZodTuple";e["ZodRecord"]="ZodRecord";e["ZodMap"]="ZodMap";e["ZodSet"]="ZodSet";e["ZodFunction"]="ZodFunction";e["ZodLazy"]="ZodLazy";e["ZodLiteral"]="ZodLiteral";e["ZodEnum"]="ZodEnum";e["ZodEffects"]="ZodEffects";e["ZodNativeEnum"]="ZodNativeEnum";e["ZodOptional"]="ZodOptional";e["ZodNullable"]="ZodNullable";e["ZodDefault"]="ZodDefault";e["ZodCatch"]="ZodCatch";e["ZodPromise"]="ZodPromise";e["ZodBranded"]="ZodBranded";e["ZodPipeline"]="ZodPipeline";e["ZodReadonly"]="ZodReadonly"})(ht||(ht={}));var vt=function(e,t){if(t===void 0){t={message:"Input not instance of ".concat(e.name)}}return ft((function(t){return t instanceof e}),t)};var mt=ke.create;var _t=Ge.create;var gt=ot.create;var yt=Ie.create;var bt=Se.create;var Tt=Ce.create;var xt=Ae.create;var Mt=Pe.create;var kt=je.create;var wt=Oe.create;var Gt=Ee.create;var It=Ze.create;var St=Ne.create;var Ct=ze.create;var At=Re.create;var Pt=Re.strictCreate;var jt=Le.create;var Ot=Ue.create;var Et=Fe.create;var Zt=Ve.create;var Nt=qe.create;var zt=We.create;var Kt=He.create;var Rt=$e.create;var Lt=Je.create;var Dt=Ye.create;var Ut=Xe.create;var Bt=et.create;var Ft=tt.create;var Vt=nt.create;var qt=rt.create;var Wt=it.create;var Ht=nt.createWithPreprocess;var $t=ct.create;var Jt=function(){return mt().optional()};var Yt=function(){return _t().optional()};var Qt=function(){return bt().optional()};var Xt={string:function(e){return ke.create(__assign(__assign({},e),{coerce:true}))},number:function(e){return Ge.create(__assign(__assign({},e),{coerce:true}))},boolean:function(e){return Se.create(__assign(__assign({},e),{coerce:true}))},bigint:function(e){return Ie.create(__assign(__assign({},e),{coerce:true}))},date:function(e){return Ce.create(__assign(__assign({},e),{coerce:true}))}};var en=te;var tn=Object.freeze({__proto__:null,defaultErrorMap:W,setErrorMap:$,getErrorMap:J,makeIssue:Y,EMPTY_PATH:Q,addIssueToContext:X,ParseStatus:ee,INVALID:te,DIRTY:ne,OK:re,isAborted:ie,isDirty:ae,isValid:se,isAsync:oe,get util(){return L},get objectUtil(){return D},ZodParsedType:U,getParsedType:B,ZodType:fe,ZodString:ke,ZodNumber:Ge,ZodBigInt:Ie,ZodBoolean:Se,ZodDate:Ce,ZodSymbol:Ae,ZodUndefined:Pe,ZodNull:je,ZodAny:Oe,ZodUnknown:Ee,ZodNever:Ze,ZodVoid:Ne,ZodArray:ze,ZodObject:Re,ZodUnion:Le,ZodDiscriminatedUnion:Ue,ZodIntersection:Fe,ZodTuple:Ve,ZodRecord:qe,ZodMap:We,ZodSet:He,ZodFunction:$e,ZodLazy:Je,ZodLiteral:Ye,ZodEnum:Xe,ZodNativeEnum:et,ZodPromise:tt,ZodEffects:nt,ZodTransformer:nt,ZodOptional:rt,ZodNullable:it,ZodDefault:at,ZodCatch:st,ZodNaN:ot,BRAND:ut,ZodBranded:lt,ZodPipeline:ct,ZodReadonly:dt,custom:ft,Schema:fe,ZodSchema:fe,late:pt,get ZodFirstPartyTypeKind(){return ht},coerce:Xt,any:wt,array:Ct,bigint:yt,boolean:bt,date:Tt,discriminatedUnion:Ot,effect:Vt,enum:Ut,function:Rt,instanceof:vt,intersection:Et,lazy:Lt,literal:Dt,map:zt,nan:gt,nativeEnum:Bt,never:It,null:kt,nullable:Wt,number:_t,object:At,oboolean:Qt,onumber:Yt,optional:qt,ostring:Jt,pipeline:$t,preprocess:Ht,promise:Ft,record:Nt,set:Kt,strictObject:Pt,string:mt,symbol:xt,transformer:Vt,tuple:Zt,undefined:Mt,union:jt,unknown:Gt,void:St,NEVER:en,ZodIssueCode:F,quotelessJson:V,ZodError:q});var nn=[["International Date Line West","GMT-11:00","(GMT-11:00) International Date Line West"],["Midway Island","GMT-11:00","(GMT-11:00) Midway Island"],["Samoa","GMT-11:00","(GMT-11:00) Samoa"],["Hawaii","GMT-10:00","(GMT-10:00) Hawaii"],["Alaska","GMT-09:00","(GMT-09:00) Alaska"],["Pacific Time (US & Canada)","GMT-08:00","(GMT-08:00) Pacific Time (US & Canada)"],["Tijuana","GMT-08:00","(GMT-08:00) Tijuana"],["Arizona","GMT-07:00","(GMT-07:00) Arizona"],["Chihuahua","GMT-07:00","(GMT-07:00) Chihuahua"],["Mazatlan","GMT-07:00","(GMT-07:00) Mazatlan"],["Mountain Time (US & Canada)","GMT-07:00","(GMT-07:00) Mountain Time (US & Canada)"],["Central America","GMT-06:00","(GMT-06:00) Central America"],["Central Time (US & Canada)","GMT-06:00","(GMT-06:00) Central Time (US & Canada)"],["Guadalajara","GMT-06:00","(GMT-06:00) Guadalajara"],["Mexico City","GMT-06:00","(GMT-06:00) Mexico City"],["Monterrey","GMT-06:00","(GMT-06:00) Monterrey"],["Saskatchewan","GMT-06:00","(GMT-06:00) Saskatchewan"],["Bogota","GMT-05:00","(GMT-05:00) Bogota"],["Eastern Time (US & Canada)","GMT-05:00","(GMT-05:00) Eastern Time (US & Canada)"],["Indiana (East)","GMT-05:00","(GMT-05:00) Indiana (East)"],["Lima","GMT-05:00","(GMT-05:00) Lima"],["Quito","GMT-05:00","(GMT-05:00) Quito"],["Caracas","GMT-04:30","(GMT-04:30) Caracas"],["Atlantic Time (Canada)","GMT-04:00","(GMT-04:00) Atlantic Time (Canada)"],["Georgetown","GMT-04:00","(GMT-04:00) Georgetown"],["La Paz","GMT-04:00","(GMT-04:00) La Paz"],["Santiago","GMT-04:00","(GMT-04:00) Santiago"],["Newfoundland","GMT-03:30","(GMT-03:30) Newfoundland"],["Brasilia","GMT-03:00","(GMT-03:00) Brasilia"],["Buenos Aires","GMT-03:00","(GMT-03:00) Buenos Aires"],["Greenland","GMT-03:00","(GMT-03:00) Greenland"],["Mid-Atlantic","GMT-02:00","(GMT-02:00) Mid-Atlantic"],["Azores","GMT-01:00","(GMT-01:00) Azores"],["Cape Verde Is.","GMT-01:00","(GMT-01:00) Cape Verde Is."],["Casablanca","GMT+00:00","(GMT+00:00) Casablanca"],["Dublin","GMT+00:00","(GMT+00:00) Dublin"],["Edinburgh","GMT+00:00","(GMT+00:00) Edinburgh"],["Lisbon","GMT+00:00","(GMT+00:00) Lisbon"],["London","GMT+00:00","(GMT+00:00) London"],["Monrovia","GMT+00:00","(GMT+00:00) Monrovia"],["UTC","GMT+00:00","(GMT+00:00) UTC"],["Amsterdam","GMT+01:00","(GMT+01:00) Amsterdam"],["Belgrade","GMT+01:00","(GMT+01:00) Belgrade"],["Berlin","GMT+01:00","(GMT+01:00) Berlin"],["Bern","GMT+01:00","(GMT+01:00) Bern"],["Bratislava","GMT+01:00","(GMT+01:00) Bratislava"],["Brussels","GMT+01:00","(GMT+01:00) Brussels"],["Budapest","GMT+01:00","(GMT+01:00) Budapest"],["Copenhagen","GMT+01:00","(GMT+01:00) Copenhagen"],["Ljubljana","GMT+01:00","(GMT+01:00) Ljubljana"],["Madrid","GMT+01:00","(GMT+01:00) Madrid"],["Paris","GMT+01:00","(GMT+01:00) Paris"],["Prague","GMT+01:00","(GMT+01:00) Prague"],["Rome","GMT+01:00","(GMT+01:00) Rome"],["Sarajevo","GMT+01:00","(GMT+01:00) Sarajevo"],["Skopje","GMT+01:00","(GMT+01:00) Skopje"],["Stockholm","GMT+01:00","(GMT+01:00) Stockholm"],["Vienna","GMT+01:00","(GMT+01:00) Vienna"],["Warsaw","GMT+01:00","(GMT+01:00) Warsaw"],["West Central Africa","(GMT+01:00","(GMT+01:00) West Central Africa"],["Zagreb","GMT+01:00","(GMT+01:00) Zagreb"],["Athens","GMT+02:00","(GMT+02:00) Athens"],["Bucharest","GMT+02:00","(GMT+02:00) Bucharest"],["Cairo","GMT+02:00","(GMT+02:00) Cairo"],["Harare","GMT+02:00","(GMT+02:00) Harare"],["Helsinki","GMT+02:00","(GMT+02:00) Helsinki"],["Istanbul","GMT+02:00","(GMT+02:00) Istanbul"],["Jerusalem","GMT+02:00","(GMT+02:00) Jerusalem"],["Kyiv","GMT+02:00","(GMT+02:00) Kyiv"],["Minsk","GMT+02:00","(GMT+02:00) Minsk"],["Pretoria","GMT+02:00","(GMT+02:00) Pretoria"],["Riga","GMT+02:00","(GMT+02:00) Riga"],["Sofia","GMT+02:00","(GMT+02:00) Sofia"],["Tallinn","GMT+02:00","(GMT+02:00) Tallinn"],["Vilnius","GMT+02:00","(GMT+02:00) Vilnius"],["Baghdad","GMT+03:00","(GMT+03:00) Baghdad"],["Kuwait","GMT+03:00","(GMT+03:00) Kuwait"],["Moscow","GMT+03:00","(GMT+03:00) Moscow"],["Nairobi","GMT+03:00","(GMT+03:00) Nairobi"],["Riyadh","GMT+03:00","(GMT+03:00) Riyadh"],["St. Petersburg","GMT+03:00","(GMT+03:00) St. Petersburg"],["Volgograd","GMT+03:00","(GMT+03:00) Volgograd"],["Tehran","GMT+03:30","(GMT+03:30) Tehran"],["Abu Dhabi","GMT+04:00","(GMT+04:00) Abu Dhabi"],["Baku","GMT+04:00","(GMT+04:00) Baku"],["Muscat","GMT+04:00","(GMT+04:00) Muscat"],["Tbilisi","GMT+04:00","(GMT+04:00) Tbilisi"],["Yerevan","GMT+04:00","(GMT+04:00) Yerevan"],["Kabul","GMT+04:30","(GMT+04:30) Kabul"],["Ekaterinburg","GMT+05:00","(GMT+05:00) Ekaterinburg"],["Islamabad","GMT+05:00","(GMT+05:00) Islamabad"],["Karachi","GMT+05:00","(GMT+05:00) Karachi"],["Tashkent","GMT+05:00","(GMT+05:00) Tashkent"],["Chennai","GMT+05:30","(GMT+05:30) Chennai"],["Kolkata","GMT+05:30","(GMT+05:30) Kolkata"],["Mumbai","GMT+05:30","(GMT+05:30) Mumbai"],["New Delhi","GMT+05:30","(GMT+05:30) New Delhi"],["Sri Jayawardenepura","GMT+05:30","(GMT+05:30) Sri Jayawardenepura"],["Kathmandu","GMT+05:45","(GMT+05:45) Kathmandu"],["Almaty","GMT+06:00","(GMT+06:00) Almaty"],["Astana","GMT+06:00","(GMT+06:00) Astana"],["Dhaka","GMT+06:00","(GMT+06:00) Dhaka"],["Novosibirsk","GMT+06:00","(GMT+06:00) Novosibirsk"],["Rangoon","GMT+06:30","(GMT+06:30) Rangoon"],["Bangkok","GMT+07:00","(GMT+07:00) Bangkok"],["Hanoi","GMT+07:00","(GMT+07:00) Hanoi"],["Jakarta","GMT+07:00","(GMT+07:00) Jakarta"],["Krasnoyarsk","GMT+07:00","(GMT+07:00) Krasnoyarsk"],["Beijing","GMT+08:00","(GMT+08:00) Beijing"],["Chongqing","GMT+08:00","(GMT+08:00) Chongqing"],["Hong Kong","GMT+08:00","(GMT+08:00) Hong Kong"],["Irkutsk","GMT+08:00","(GMT+08:00) Irkutsk"],["Kuala Lumpur","GMT+08:00","(GMT+08:00) Kuala Lumpur"],["Perth","GMT+08:00","(GMT+08:00) Perth"],["Singapore","GMT+08:00","(GMT+08:00) Singapore"],["Taipei","GMT+08:00","(GMT+08:00) Taipei"],["Ulaan Bataar","GMT+08:00","(GMT+08:00) Ulaan Bataar"],["Urumqi","GMT+08:00","(GMT+08:00) Urumqi"],["Osaka","GMT+09:00","(GMT+09:00) Osaka"],["Sapporo","GMT+09:00","(GMT+09:00) Sapporo"],["Seoul","GMT+09:00","(GMT+09:00) Seoul"],["Tokyo","GMT+09:00","(GMT+09:00) Tokyo"],["Yakutsk","GMT+09:00","(GMT+09:00) Yakutsk"],["Adelaide","GMT+09:30","(GMT+09:30) Adelaide"],["Darwin","GMT+09:30","(GMT+09:30) Darwin"],["Brisbane","GMT+10:00","(GMT+10:00) Brisbane"],["Canberra","GMT+10:00","(GMT+10:00) Canberra"],["Guam","GMT+10:00","(GMT+10:00) Guam"],["Hobart","GMT+10:00","(GMT+10:00) Hobart"],["Melbourne","GMT+10:00","(GMT+10:00) Melbourne"],["Port Moresby","GMT+10:00","(GMT+10:00) Port Moresby"],["Sydney","GMT+10:00","(GMT+10:00) Sydney"],["Vladivostok","GMT+10:00","(GMT+10:00) Vladivostok"],["Kamchatka","GMT+11:00","(GMT+11:00) Kamchatka"],["Magadan","GMT+11:00","(GMT+11:00) Magadan"],["New Caledonia","GMT+11:00","(GMT+11:00) New Caledonia"],["Solomon Is.","GMT+11:00","(GMT+11:00) Solomon Is."],["Auckland","GMT+12:00","(GMT+12:00) Auckland"],["Fiji","GMT+12:00","(GMT+12:00) Fiji"],["Marshall Is.","GMT+12:00","(GMT+12:00) Marshall Is."],["Wellington","GMT+12:00","(GMT+12:00) Wellington"],["Nuku'alofa","GMT+13:00","(GMT+13:00) Nuku'alofa"]];var rn='verdocs-settings-organization{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-organization .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-organization .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-organization verdocs-text-input{margin:10px 0}verdocs-settings-organization verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-organization .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}';var an=nn.map((function(e){return{value:e[2],label:e[2]}}));var sn=tn.object({business_name:tn.string().trim().max(30).optional(),contact_email:tn.string().trim().email("Invalid email").optional().or(tn.literal("")),phone:tn.preprocess((function(e){return v(String(e).trim())}),tn.string().optional()),timezone:tn.string().trim().optional(),url:tn.string().trim().optional()});var on=e("verdocs_settings_organization",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.organizationUpdated=n(this,"organizationUpdated",7);this.endpoint=a.getDefault();this.valid=false;this.dirty=false;this.submitting=false;this.name="";this.business_name="";this.contact_email="";this.phone="";this.address="";this.address2="";this.timezone="";this.url=""}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,G(this.endpoint,this.endpoint.session.organization_id)];case 1:e=t.sent();console.log("[SETTINGS] Loaded organization",e);this.resetForm(e);return[2]}}))}))};e.prototype.resetForm=function(e){this.name=e.name;this.business_name=e.business_name;this.contact_email=e.contact_email;this.phone=e.phone;this.address=e.address;this.address2=e.address2;this.timezone=e.timezone;this.url=e.url;this.dirty=false;this.valid=true};e.prototype.handleSubmit=function(e){var t=this;e.preventDefault();e.stopPropagation();I(a.getDefault(),this.endpoint.session.organization_id,{name:this.name,business_name:this.business_name,contact_email:this.contact_email,phone:this.phone,address:this.address,address2:this.address2,timezone:this.timezone,url:this.url}).then((function(e){var n;console.log("[SETTINGS] Update result",e);(n=t.organizationUpdated)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,organization:e});t.resetForm(e)})).catch((function(e){return l("Error updating organization: ".concat(e.message),{style:"error"})}))};e.prototype.processFields=function(){var e=sn.safeParse({name:this.name,business_name:this.business_name,contact_email:this.contact_email,phone:this.phone,address:this.address,address2:this.address2,timezone:this.timezone,url:this.url});console.log("[SETTINGS] Validation result",e);this.valid=e.success;this.dirty=true};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("h1",null,"Organization Profile"),r("form",{onSubmit:function(t){return e.handleSubmit(t)}},r("div",{class:"columns"},r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-organization-name",value:this.name,autocomplete:"off",label:"Name",required:false,disabled:false,placeholder:"Enter your organization's name...",onInput:function(t){return e.name=t.target.value},onFocusout:function(t){e.name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-business-name",value:this.business_name,autocomplete:"off",label:"Display Name",placeholder:"The name to display on communications...",onInput:function(t){return e.business_name=t.target.value},onFocusout:function(t){e.business_name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-url",value:this.url,autocomplete:"off",label:"Web URL",placeholder:"Enter your Web URL...",onInput:function(t){return e.url=t.target.value},onFocusout:function(t){e.url=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-organization-phone",value:this.phone,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:function(t){return e.phone=t.target.value},onFocusout:function(t){e.phone=t.target.value.trim();e.processFields()}})),r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-organization-email",value:this.contact_email,clearable:true,autocomplete:"off",label:"Contact Email",placeholder:"Enter your contact email address...",onInput:function(t){return e.contact_email=t.target.value},onFocusout:function(t){e.contact_email=t.target.value.trim();e.processFields()}}),r("verdocs-select-input",{options:an,value:this.timezone,label:"Time Zone"}))),r("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty})))};return e}());on.style=rn;var un='verdocs-settings-profile{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}verdocs-settings-profile .columns{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-settings-profile .column{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-settings-profile verdocs-text-input{margin:10px 0}verdocs-settings-profile verdocs-text-input input{height:32px}@media screen and (max-width: 600px){verdocs-settings-profile .columns{gap:0;-ms-flex-direction:column;flex-direction:column}}';var ln=tn.object({first_name:tn.string().trim().min(1,"First name is required").max(30),last_name:tn.string().trim().min(1,"Last name is required").max(30),email:tn.string().trim().email("Invalid email").min(1,"Email is required"),phone:tn.preprocess((function(e){return v(String(e).trim())}),tn.string())});var cn=e("verdocs_settings_profile",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.profileUpdated=n(this,"profileUpdated",7);this.endpoint=a.getDefault();this.valid=false;this.dirty=false;this.submitting=false;this.first_name="";this.last_name="";this.email="";this.phone=""}e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,f(this.endpoint)];case 1:e=t.sent();console.log("[SETTINGS] Loaded profile",e);this.resetForm(e);return[2]}}))}))};e.prototype.resetForm=function(e){this.first_name=e.first_name;this.last_name=e.last_name;this.email=e.email;this.phone=e.phone;this.dirty=false;this.valid=true};e.prototype.handleSubmit=function(e){var t=this;e.preventDefault();e.stopPropagation();p(a.getDefault(),this.endpoint.session.profile_id,{first_name:this.first_name,last_name:this.last_name,phone:this.phone}).then((function(e){var n;console.log("[SETTINGS] Update result",e);(n=t.profileUpdated)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,profile:e});t.resetForm(e)})).catch((function(e){return l("Error updating profile: ".concat(e.message),{style:"error"})}))};e.prototype.processFields=function(){var e=ln.safeParse({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone});console.log("[SETTINGS] Validation result",e);this.valid=e.success;this.dirty=true};e.prototype.render=function(){var e=this;if(!this.endpoint.session){console.log("[SETTINGS] Must be authenticated");return r(i,{class:"authentication-required"},"Must be authenticated")}return r(i,null,r("h1",null,"My Profile"),r("form",{onSubmit:function(t){return e.handleSubmit(t)}},r("div",{class:"columns"},r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-profile-first-name",value:this.first_name,autocomplete:"off",label:"First Name",required:true,placeholder:"Enter your first name...",onInput:function(t){return e.first_name=t.target.value},onFocusout:function(t){e.first_name=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-profile-last-name",value:this.last_name,autocomplete:"off",label:"Last Name",required:true,placeholder:"Enter your last name...",onInput:function(t){return e.last_name=t.target.value},onFocusout:function(t){e.last_name=t.target.value.trim();e.processFields()}})),r("div",{class:"column"},r("verdocs-text-input",{id:"verdocs-profile-email",value:this.email,autocomplete:"off",label:"Email Address",required:true,disabled:true,placeholder:"Enter your email address...",onInput:function(t){return e.email=t.target.value},onFocusout:function(t){e.email=t.target.value.trim();e.processFields()}}),r("verdocs-text-input",{id:"verdocs-profile-phone",value:this.phone,clearable:true,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:function(t){return e.phone=t.target.value},onFocusout:function(t){e.phone=t.target.value.trim();e.processFields()}}))),r("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty})))};return e}());cn.style=un}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as t,c as o,h as e,H as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as s}from"./p-035f6b38.js";import{c}from"./p-a3d7cdda.js";import"./p-eab67c09.js";import"./p-dc2ad047.js";import"./p-839f6f0d.js";import"./p-c220af42.js";const a=class{constructor(e){t(this,e),this.searchContacts=o(this,"searchContacts",7),this.exit=o(this,"exit",7),this.next=o(this,"next",7),this.endpoint=s.getDefault(),this.templateRole=null,this.contactSuggestions=[],this.name=void 0,this.email=void 0,this.phone=void 0,this.message=void 0,this.showSuggestions=!1,this.showMessage=!1,this.delegator=!1,this.nameFieldId=`verdocs-contact-picker-name-${Math.random().toString(36).substring(2,11)}`,this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`,this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){this.templateRole&&(this.name=this.templateRole.full_name||"",this.email=this.templateRole.email||"",this.phone=this.templateRole.phone||"",this.delegator=this.templateRole.delegator||!1,this.message=this.templateRole.message||"",this.showMessage=""!==this.message)}handleNameChange(t){var o;this.name=t.target.value,null===(o=this.searchContacts)||void 0===o||o.emit({query:this.name})}handleEmailChange(t){this.email=t.target.value}handlePhoneChange(t){this.phone=c(t.target.value)}handleMessageChange(t){this.message=t.target.value}handleCancel(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.exit)||void 0===o||o.emit()}handleSubmit(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.next)||void 0===o||o.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})}handleSelectSuggestion(t,o){t.stopPropagation(),this.name=o.name,this.email=o.email,this.phone=o.phone,this.showSuggestions=!1}render(){return e("form",{onSubmit:t=>t.preventDefault(),onClick:t=>t.stopPropagation(),autocomplete:"off"},e("div",{class:"row"},e("label",{htmlFor:this.nameFieldId},"Name:"),e("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:()=>{var t;return this.showSuggestions=(null===(t=this.contactSuggestions)||void 0===t?void 0:t.length)>0},onInput:t=>this.handleNameChange(t)}),this.showSuggestions&&e("div",{class:"dropdown"},this.contactSuggestions.map((t=>{var o;return e("div",{key:null!==(o=t.id)&&void 0!==o?o:t.name,class:"suggestion",onClick:o=>this.handleSelectSuggestion(o,t)},t.avatar?e("img",{alt:"Avatar",class:"avatar",src:t.avatar}):e("div",{class:"avatar",innerHTML:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>'}),e("div",{class:"details"},e("div",{class:"name"},t.name),t.email&&e("div",{class:"destination"},t.email),t.phone&&e("div",{class:"destination"},t.phone)))})))),e("div",{class:"row"},e("label",{htmlFor:this.emailFieldId},"Email:"),e("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleEmailChange(t)})),e("div",{class:"row"},e("label",{htmlFor:this.phoneFieldId},"Phone:"),e("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handlePhoneChange(t)})),this.showMessage&&e("div",{class:"row"},e("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),e("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleMessageChange(t)})),e("div",{class:"buttons"},e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 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-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>',size:"small",active:this.showMessage,onToggle:t=>{this.showMessage=t.detail.active,this.showSuggestions=!1}}),e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>',size:"small",active:this.delegator,onToggle:t=>{this.delegator=t.detail.active,this.showSuggestions=!1}}),e("div",{class:"flex-fill"}),e("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:t=>this.handleCancel(t)}),e("verdocs-button",{label:"OK",size:"small",onClick:t=>this.handleSubmit(t)})))}};a.style='verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .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-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';const n=class{constructor(e){t(this,e),this.toggle=o(this,"toggle",7),this.active=!1,this.icon=null,this.label=null,this.size="normal",this._active=!1}componentWillLoad(){this._active=this.active}handleToggle(t){var o;t.stopPropagation();const e=!this._active;this._active=e,null===(o=this.toggle)||void 0===o||o.emit({active:e})}render(){return e(i,{class:`size-${this.size}`},this.icon?e("button",{innerHTML:this.icon,class:{active:this._active},onClick:t=>this.handleToggle(t)}):e("button",{class:{active:this._active},onClick:t=>this.handleToggle(t)},this.label))}};n.style='verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';export{a as verdocs_contact_picker,n as verdocs_toggle_button}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{c as e}from"./p-7648c449.js";const s={},o=o=>(s[o]||(s[o]=e({fields:[]})),s[o]),l=l=>{let t=o(l.id);return t||(console.log("Creating template field store for template",l),t=e({fields:[]}),s[l.id]=t),t.set("fields",[...l.fields]),t},t=l=>{let t=o(l.template_id);return t?(console.log("Resetting field store for envelope",l.id,l.template_id),t.reset()):(console.log("Creating field store for envelope",l.id,l.template_id),t=e({fields:[]}),s[l.template_id]=t),t.set("fields",[...l.fields]),t},i=(e,s,o)=>{const l=e.get("fields")||[];if(s!==o.name){console.log("Renaming",s,o.name);const t=l.filter((e=>e.name!==s));e.set("fields",[...t,o])}else console.log("Updating",s),e.set("fields",l.map((e=>e.name===s?{...e,...o}:{...e})))};export{t as a,l as c,o as g,i as u}
|