@verdocs/web-sdk 2.3.76 → 2.3.79
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/{TemplateStore-ae59084b.js → TemplateStore-9a87282d.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-f4ef9333.js → VerdocsEndpoint-38bcb409.js} +1 -1
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +3 -3
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +0 -1
- package/dist/components/VerdocsEndpoint.js +1 -1
- package/dist/components/verdocs-auth.js +3 -3
- package/dist/components/verdocs-preview2.js +1 -1
- package/dist/components/verdocs-template-fields2.js +0 -1
- package/dist/custom-elements.json +2147 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +4 -4
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-checkbox_5.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_15.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +3 -3
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +2 -3
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{TemplateStore-99bf97f0.js → TemplateStore-6a7d7297.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-eab308f6.js → VerdocsEndpoint-9a11e843.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
- 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-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.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 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.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-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-f246348c.system.js → p-034bd59e.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b0e0084b.system.entry.js → p-05026d67.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bbf52926.entry.js → p-07cf78e3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e7d7bcae.system.entry.js → p-094ea4ba.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-15c88a05.system.entry.js → p-0d1f4272.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1978c7bd.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-58e85310.system.entry.js → p-1a29b57f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a12b2c26.system.entry.js → p-24742737.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6a93295c.entry.js → p-283d935e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ef99042b.entry.js → p-2bcd953d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8f36c42a.system.entry.js → p-337466c7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ea2211d7.system.entry.js → p-340d2daa.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d61bf72b.system.entry.js → p-4618665e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7e5a1766.system.entry.js → p-48c14014.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d0d9ac6d.system.js → p-49139f23.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8a7324b6.entry.js → p-5059ff08.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-159aeaf2.entry.js → p-55403539.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a7907ccf.entry.js → p-6dad60bb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9da16c6.entry.js → p-6ec51b4b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1d5f10f4.entry.js → p-70137c9e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e3623a0c.system.entry.js → p-786725d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-91e94910.entry.js → p-812d7568.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-06618569.entry.js → p-8b46dcc3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-baf16d17.system.entry.js → p-8b78ee37.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b3dfc4b.system.entry.js → p-90734d54.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-92a6f625.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9b306355.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-40f5b1c5.entry.js → p-a15e1a57.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9d748d04.entry.js → p-a87f2e56.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bf8e6ba1.system.entry.js → p-b1e92d11.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77c145b3.system.entry.js → p-b293e7d0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c73e78c8.system.entry.js → p-b9376079.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bc6ce10f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9a816526.system.entry.js → p-bf2fd0eb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9b80271.system.entry.js → p-cb48d6b9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ccac4998.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-45ecd6eb.js → p-cda8b816.js} +1 -1
- package/dist/verdocs-web-sdk/{p-84679597.entry.js → p-d075b6e8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c179b3e4.entry.js → p-d522f008.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-28c93a3a.system.entry.js → p-d524266d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e04d8f5d.js → p-d77962af.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac042888.entry.js → p-daebba0a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-de5b9b23.system.entry.js → p-e3bfe2de.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1c52218.entry.js → p-e93796e2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b8063124.entry.js → p-ed319550.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac07d476.entry.js → p-ee9336c4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-5e8e5761.system.entry.js → p-f15263ff.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d11ffc76.entry.js → p-f6b75e4c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/verdocs-web-sdk/p-30492f83.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-332141f2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7519fe6e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-755b5223.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b2d3ac44.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as s,H as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as n}from"./p-e04d8f5d.js";import{a,c as r,b as o}from"./p-5e808a0b.js";import{V as l}from"./p-ed416acf.js";import{S as c}from"./p-7a1b2643.js";import{g as d,a as u,u as h}from"./p-3e607686.js";import{f as m}from"./p-c220af42.js";import{c as p}from"./p-b72328af.js";import"./p-eab67c09.js";import"./p-dc2ad047.js";import"./p-1b4e7078.js";var v=function(e,t){return e.api.get("/organizations/".concat(t,"/profiles")).then((function(e){return e.data}))};const f=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.memberInvited=t(this,"memberInvited",7),this.memberUpdated=t(this,"memberUpdated",7),this.memberRemoved=t(this,"memberRemoved",7),this.endpoint=n.getDefault(),this.keys=[],this.creatingKey=!1,this.createdKey=null,this.deletingKey=null,this.rotatingKey=null,this.newApiKeyName="",this.newApiKeyProfileId="",this.members=[]}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){this.newApiKeyProfileId=this.endpoint.session.profile_id,v(this.endpoint,this.endpoint.session.organization_id).then((e=>{this.members=e})).catch((e=>{var t,s,i;console.log("[SETTINGS] Error loading organization members",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to load API keys. Please try again later",{style:"error"})})),this.loadKeys()}loadKeys(){var e,t;(e=this.endpoint,t=this.endpoint.session.organization_id,e.api.get("/organizations/".concat(t,"/api_key")).then((function(e){return e.data}))).then((e=>{this.keys=e})).catch((e=>{var t,s,i;console.log("[SETTINGS] Unable to load API keys",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to load API keys. Please try again later",{style:"error"})}))}async handleDeleteKey(){var e,t,s;(e=this.endpoint,t=this.deletingKey.organization_id,s=this.deletingKey.client_id,e.api.delete("/organizations/".concat(t,"/api_key/").concat(s)).then((function(e){return e.data}))).then((()=>{this.deletingKey=null,l("API key deleted",{style:"success"}),this.loadKeys()})).catch((e=>{var t,s,i;this.deletingKey=null,console.log("[SETTINGS] Unable to delete API key",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to delete API key. Please try again later",{style:"error"})}))}async handleRotateKey(){var e,t,s;(e=this.endpoint,t=this.rotatingKey.organization_id,s=this.rotatingKey.client_id,e.api.put("/organizations/".concat(t,"/api_key/").concat(s,"/rotate")).then((function(e){return e.data}))).then((e=>{this.rotatingKey=null,l("API key rotated",{style:"success"}),this.loadKeys(),this.createdKey=e})).catch((e=>{var t,s,i;this.rotatingKey=null,console.log("[SETTINGS] Unable to rotate API key",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to rotate API key. Please try again later",{style:"error"})}))}async handleCreateKey(){var e,t,s;(e=this.endpoint,t=this.endpoint.session.organization_id,s={name:this.newApiKeyName,profile_id:this.newApiKeyProfileId},e.api.post("/organizations/".concat(t,"/api_key"),s).then((function(e){return e.data}))).then((e=>{this.creatingKey=!1,this.createdKey=e,l("API key created",{style:"success"}),this.loadKeys()})).catch((e=>{var t,s,i;this.creatingKey=!1,console.log("[SETTINGS] Unable to create API key",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to create API key. Please try again later",{style:"error"})}))}render(){var e,t,n,r;const o=this.members.map((e=>({label:a(e),value:e.id})));return this.endpoint.session?s(i,null,s("verdocs-table",{data:this.keys,columns:[{id:"name",header:"Name",renderCell:(e,t)=>s("div",null,s("div",null,t.name))},{id:"client_id",header:"Client ID",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:'<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>'}),s("div",null,t.client_id))},{id:"profile_id",header:"Acts as",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:'<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>'}),s("div",null,a(t.profile)))},{id:"actions",header:"Actions",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:'<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>',onClick:()=>this.deletingKey=t}),s("div",{innerHTML:'<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>',onClick:()=>this.rotatingKey=t}))}]}),s("verdocs-button",{label:"Add API Key",size:"normal",onClick:()=>this.creatingKey=!0}),this.deletingKey&&s("verdocs-dialog",{onExit:()=>this.deletingKey=null},s("div",{slot:"title",class:"heading"},'Delete API key "',this.deletingKey.name,'"?'),s("div",{class:"content"},s("p",null,"Are you sure you want to delete this key? This action cannot be undone."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:()=>this.deletingKey=null}),s("verdocs-button",{size:"small",label:"OK",onClick:()=>this.handleDeleteKey()})))),this.rotatingKey&&s("verdocs-dialog",{onExit:()=>this.rotatingKey=null},s("div",{slot:"title",class:"heading"},'Rotate API key "',this.rotatingKey.name,'"?'),s("div",{class:"content"},s("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."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:()=>this.rotatingKey=null}),s("verdocs-button",{size:"small",label:"OK",onClick:()=>this.handleRotateKey()})))),this.creatingKey&&s("verdocs-dialog",{onExit:()=>this.creatingKey=!1},s("div",{slot:"title",class:"heading"},"Create API Key"),s("div",{class:"content"},s("verdocs-text-input",{label:"Name",placeholder:"API key name...",id:"verdocs-api-key-name",value:this.newApiKeyName,autocomplete:"off",required:!0,onInput:e=>this.newApiKeyName=e.target.value,onFocusout:e=>{this.newApiKeyName=e.target.value.trim()}}),s("p",null,'API keys must be associated with a profile. Actions performed via API calls using this key will "act as" this profile.'),s("verdocs-select-input",{options:o,label:"Act as Profile",onInput:e=>{this.newApiKeyProfileId=e.target.value}}),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:()=>this.creatingKey=!1}),s("verdocs-button",{size:"small",label:"OK",onClick:()=>this.handleCreateKey()})))),this.createdKey&&s("verdocs-dialog",{onExit:()=>this.createdKey=null},s("div",{slot:"title",class:"heading"},"API Key Details"),s("div",{class:"content"},s("verdocs-text-input",{label:"Name",disabled:!0,value:null===(e=this.createdKey)||void 0===e?void 0:e.name}),s("verdocs-text-input",{label:"Profile",disabled:!0,value:a(null===(t=this.createdKey)||void 0===t?void 0:t.profile)}),s("p",null,"Please save the Client ID and Secret below. Be sure to never expose your secret key in insecure (Web or mobile environments)!"),s("verdocs-text-input",{label:"Client ID",disabled:!0,value:null===(n=this.createdKey)||void 0===n?void 0:n.client_id,copyable:!0}),s("verdocs-text-input",{label:"Secret Key",disabled:!0,value:null===(r=this.createdKey)||void 0===r?void 0:r.client_secret,copyable:!0}),s("div",{class:"buttons"},s("verdocs-button",{size:"small",label:"Done",onClick:()=>this.createdKey=null}))))):(console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated"))}};f.style='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}}';const g='<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>',y=e=>void 0!==e.find((e=>"owner"===e.name))?"Owner":void 0!==e.find((e=>"admin"===e.name))?"Admin":void 0!==e.find((e=>"member"===e.name))?"Member":void 0!==e.find((e=>"basic_user"===e.name))?"Basic User":void 0!==e.find((e=>"contact"===e.name))?"Contact":void 0,T=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.memberInvited=t(this,"memberInvited",7),this.memberUpdated=t(this,"memberUpdated",7),this.memberRemoved=t(this,"memberRemoved",7),this.endpoint=n.getDefault(),this.members=[],this.invited=[],this.roles=[],this.selectedTab=0,this.invitingMember=!1,this.newEmailAddress="",this.newRoleId="",this.submitting=!1,this.deletingInvitation=null,this.resendingInvitation=null,this.deletingMember=null}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){this.loadMembers().catch((e=>console.log("Unknown Error",e)))}async loadMembers(){var e,t,s,i,n,a;try{const[t,s,i]=await Promise.all([d(this.endpoint),v(this.endpoint,this.endpoint.session.organization_id),(n=this.endpoint,a=this.endpoint.session.organization_id,n.api.get("/organizations/".concat(a,"/invitation")).then((function(e){return e.data})))]);this.roles=t,this.members=s,this.invited=i,this.newRoleId=(null===(e=t.find((e=>"member"===e.name)))||void 0===e?void 0:e.id)||""}catch(e){null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to load members. Please try again later")}}async handleInviteMember(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.endpoint.session.organization_id,s={email:this.newEmailAddress,role_id:this.newRoleId,organization_id:this.endpoint.session.organization_id},e.api.post("/organizations/".concat(t,"/invitation"),s).then((function(e){return e.data}))).then((e=>{console.log("[SETTINGS] Invited member",e),this.invitingMember=!1,this.submitting=!1,this.newRoleId="",this.newEmailAddress="",l("Invitation sent!",{style:"success"}),this.loadMembers()})).catch((e=>{console.log("[SETTINGS] Unable to invite member",e),this.invitingMember=!1,this.submitting=!1,this.newRoleId="",this.newEmailAddress="",l("Unable to invite member. Please try again later",{style:"error"})}))}async handleDeleteMember(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.deletingMember.organization_id,s=this.deletingMember.email,e.api.delete("/organizations/".concat(t,"/profiles/").concat(s)).then((function(e){return e.data}))).then((()=>{this.submitting=!1,this.deletingMember=null,l("The member has been deleted.",{style:"success"}),this.loadMembers()})).catch((e=>{this.submitting=!1,this.deletingMember=null,console.log("Delete error",e),l("Unable to cancel invitation. Please try again later",{style:"error"})}))}async handleDeleteInvitation(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.deletingInvitation.organization_id,s=this.deletingInvitation.email,e.api.delete("/organizations/".concat(t,"/invitation/").concat(s)).then((function(e){return e.data}))).then((()=>{this.submitting=!1,this.deletingInvitation=null,l("The invitation has been cancelled.",{style:"success"}),this.loadMembers()})).catch((e=>{this.submitting=!1,this.deletingInvitation=null,console.log("Delete error",e),l("Unable to cancel invitation. Please try again later",{style:"error"})}))}async handleResendInvitation(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.resendingInvitation.organization_id,s=this.resendingInvitation.email,e.api.post("/organizations/".concat(t,"/invitation/").concat(s,"/resend")).then((function(e){return e.data}))).then((()=>{this.submitting=!1,this.resendingInvitation=null,l("The invitation has been resent.",{style:"success"}),this.loadMembers()})).catch((e=>{this.submitting=!1,this.resendingInvitation=null,console.log("REsend error",e),l("Unable to resend invitation. Please try again later",{style:"error"})}))}render(){if(!this.endpoint.session)return console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated");const e=this.roles.map((e=>({label:y([{name:e.name}]),value:e.id})));return s(i,null,s("verdocs-tabs",{tabs:[{label:`Members (${this.members.length})`},{label:`Pending Invitations (${this.invited.length})`}],onSelectTab:e=>this.selectedTab=e.detail.index}),0===this.selectedTab&&s("verdocs-table",{data:this.members,columns:[{id:"name",renderHeader:()=>"Member",renderCell:(e,t)=>{return s("div",{style:{display:"flex",flexDirection:"row",gap:"10px",alignItems:"center"}},s("div",{class:"role",style:{backgroundColor:(i=t.roles,void 0!==i.find((e=>"owner"===e.name))?"#9333ea":void 0!==i.find((e=>"admin"===e.name))?"#2563eb":void 0!==i.find((e=>"member"===e.name))?"#16a34a":void 0!==i.find((e=>"basic_user"===e.name))?"#ea580c":void 0!==i.find((e=>"contact"===e.name))?"#52525B":void 0)}},o(t)),s("span",null,a(t)));var i}},{id:"email",header:"E-mail Address"},{id:"phone",header:"Phone Number"},{id:"roles",header:"Role",renderCell:(e,t)=>`${y(t.roles)}`},{id:"actions",header:"Actions",renderCell:(e,t)=>s("div",null,t.id!==this.endpoint.session.profile_id&&s("div",{innerHTML:g,onClick:()=>this.deletingMember=t}))}]}),1===this.selectedTab&&s("verdocs-table",{data:this.invited,columns:[{id:"email",header:"E-mail Address"},{id:"generated_at",header:"Invited",renderCell:(e,t)=>s("div",null,m(new Date(t.generated_at),"MMM d, Y"))},{id:"role_id",header:"Role",renderCell:(e,t)=>{var i;return s("div",null,y([{name:null===(i=this.roles.find((e=>e.id===t.role_id)))||void 0===i?void 0:i.name}]))}},{id:"status",header:"Status",renderCell:(e,t)=>s("div",null,r(t.status))},{id:"actions",header:"Actions",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:g,onClick:()=>this.deletingInvitation=t}),s("div",{innerHTML:'<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>',onClick:()=>this.resendingInvitation=t}))}]}),s("verdocs-button",{label:"Invite New Member",size:"normal",disabled:this.submitting,onClick:()=>this.invitingMember=!0}),this.invitingMember&&s("verdocs-dialog",{onExit:()=>this.invitingMember=!1},s("div",{slot:"title",class:"heading"},"Invite New Member"),s("div",{class:"content"},s("verdocs-text-input",{label:"E-mail Address",placeholder:"Enter the user's email address...",id:"verdocs-invite-email",value:this.newEmailAddress,autocomplete:"off",required:!0,onInput:e=>this.newEmailAddress=e.target.value,onFocusout:e=>{this.newEmailAddress=e.target.value.trim()}}),s("div",{style:{marginBottom:"20px"}}),s("verdocs-select-input",{options:e,label:"Role",onInput:e=>{this.newRoleId=e.target.value}}),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",disabled:this.submitting,onClick:()=>this.invitingMember=!1}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting||!this.newEmailAddress||!this.newRoleId,onClick:()=>this.handleInviteMember()})))),this.deletingMember&&s("verdocs-dialog",{onExit:()=>this.deletingMember=null},s("div",{slot:"title",class:"heading"},"Delete Member?"),s("div",{class:"content"},s("p",null,"Are you sure you want to delete this member? This action cannot be undone."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:()=>this.deletingMember=null}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:()=>this.handleDeleteMember()})))),this.deletingInvitation&&s("verdocs-dialog",{onExit:()=>this.deletingInvitation=null},s("div",{slot:"title",class:"heading"},"Cancel Invitation?"),s("div",{class:"content"},s("p",null,"Are you sure you want to cancel this invitation? This action cannot be undone."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:()=>this.deletingInvitation=null}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:()=>this.handleDeleteInvitation()})))),this.resendingInvitation&&s("verdocs-dialog",{onExit:()=>this.resendingInvitation=null},s("div",{slot:"title",class:"heading"},"Resend Invitation?"),s("div",{class:"content"},s("p",null,"The user will receive an email reminder to join your organization."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:()=>this.resendingInvitation=null}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:()=>this.handleResendInvitation()})))))}};var b,M;T.style='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}}',function(e){e.assertEqual=e=>e,e.assertIs=function(){},e.assertNever=function(){throw new Error},e.arrayToEnum=e=>{const t={};for(const s of e)t[s]=s;return t},e.getValidEnumValues=t=>{const s=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(const e of s)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(s);return t},e.find=(e,t)=>{for(const s of e)if(t(s))return s},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(b||(b={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(M||(M={}));const x=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),G=e=>{switch(typeof e){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(e)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(e)?x.array:null===e?x.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?x.promise:"undefined"!=typeof Map&&e instanceof Map?x.map:"undefined"!=typeof Set&&e instanceof Set?x.set:"undefined"!=typeof Date&&e instanceof Date?x.date:x.object;default:return x.unknown}},w=b.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"]);class k extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},s={_errors:[]},i=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(i);else if("invalid_return_type"===n.code)i(n.returnTypeError);else if("invalid_arguments"===n.code)i(n.argumentsError);else if(0===n.path.length)s._errors.push(t(n));else{let e=s,i=0;for(;i<n.path.length;){const s=n.path[i];i===n.path.length-1?(e[s]=e[s]||{_errors:[]},e[s]._errors.push(t(n))):e[s]=e[s]||{_errors:[]},e=e[s],i++}}};return i(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,b.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},s=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):s.push(e(i));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}k.create=e=>new k(e);const I=(e,t)=>{let s;switch(e.code){case w.invalid_type:s=e.received===x.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,b.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:s=`Unrecognized key(s) in object: ${b.joinValues(e.keys,", ")}`;break;case w.invalid_union:s="Invalid input";break;case w.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${b.joinValues(e.options)}`;break;case w.invalid_enum_value:s=`Invalid enum value. Expected ${b.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:s="Invalid function arguments";break;case w.invalid_return_type:s="Invalid function return type";break;case w.invalid_date:s="Invalid date";break;case w.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:b.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case w.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case w.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case w.custom:s="Invalid input";break;case w.invalid_intersection_types:s="Intersection results could not be merged";break;case w.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:s="Number must be finite";break;default:s=t.defaultError,b.assertNever(e)}return{message:s}};let _=I;function N(){return _}const S=e=>{const{data:t,path:s,errorMaps:i,issueData:n}=e,a=[...s,...n.path||[]],r={...n,path:a};let o="";const l=i.filter((e=>!!e)).slice().reverse();for(const e of l)o=e(r,{data:t,defaultError:o}).message;return{...n,path:a,message:n.message||o}};function E(e,t){const s=S({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,N(),I].filter((e=>!!e))});e.common.issues.push(s)}class C{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const i of t){if("aborted"===i.status)return A;"dirty"===i.status&&e.dirty(),s.push(i.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const e of t)s.push({key:await e.key,value:await e.value});return C.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const i of t){const{key:t,value:n}=i;if("aborted"===t.status)return A;if("aborted"===n.status)return A;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"===t.value||void 0===n.value&&!i.alwaysSet||(s[t.value]=n.value)}return{status:e.value,value:s}}}const A=Object.freeze({status:"aborted"}),Z=e=>({status:"dirty",value:e}),P=e=>({status:"valid",value:e}),z=e=>"aborted"===e.status,j=e=>"dirty"===e.status,D=e=>"valid"===e.status,L=e=>"undefined"!=typeof Promise&&e instanceof Promise;var U;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(U||(U={}));class B{constructor(e,t,s,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $=(e,t)=>{if(D(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new k(e.common.issues);return this._error=t,this._error}}};function K(e){if(!e)return{};const{errorMap:t,invalid_type_error:s,required_error:i,description:n}=e;if(t&&(s||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:n}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=i?i:t.defaultError}:{message:null!=s?s:t.defaultError},description:n}}class O{constructor(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)}get description(){return this._def.description}_getType(e){return G(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:G(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:G(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(L(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const i={common:{issues:[],async:null!==(s=null==t?void 0:t.async)&&void 0!==s&&s,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:G(e)},n=this._parseSync({data:e,path:i.path,parent:i});return $(i,n)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:G(e)},i=this._parse({data:e,path:s.path,parent:s}),n=await(L(i)?i:Promise.resolve(i));return $(s,n)}refine(e,t){const s=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{const n=e(t),a=()=>i.addIssue({code:w.custom,...s(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(a(),!1))):!!n||(a(),!1)}))}refinement(e,t){return this._refinement(((s,i)=>!!e(s)||(i.addIssue("function"==typeof t?t(s,i):t),!1)))}_refinement(e){return new Ee({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ce.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this,this._def)}promise(){return Se.create(this,this._def)}or(e){return pe.create([this,e],this._def)}and(e){return ye.create(this,e,this._def)}transform(e){return new Ee({...K(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ze({...K(this._def),innerType:this,defaultValue:t,typeName:Ke.ZodDefault})}brand(){return new De({typeName:Ke.ZodBranded,type:this,...K(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Pe({...K(this._def),innerType:this,catchValue:t,typeName:Ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Le.create(this,e)}readonly(){return Ue.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R=/^c[^\s-]{8,}$/i,q=/^[a-z][a-z0-9]*$/,V=/^[0-9A-HJKMNP-TV-Z]{26}$/,F=/^[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,H=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let W;const J=/^(((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}))$/,Y=/^(([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})))$/;class Q extends O{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.string,received:t.parsedType}),A}const t=new C;let s;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const i=e.data.length>r.value,n=e.data.length<r.value;(i||n)&&(s=this._getOrReturnCtx(e,s),i?E(s,{code:w.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):n&&E(s,{code:w.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)H.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"email",code:w.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)W||(W=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),W.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"emoji",code:w.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)F.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"uuid",code:w.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)R.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"cuid",code:w.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)q.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"cuid2",code:w.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)V.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"ulid",code:w.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch(i){s=this._getOrReturnCtx(e,s),E(s,{validation:"url",code:w.invalid_string,message:r.message}),t.dirty()}else"regex"===r.kind?(r.regex.lastIndex=0,r.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"regex",code:w.invalid_string,message:r.message}),t.dirty())):"trim"===r.kind?e.data=e.data.trim():"includes"===r.kind?e.data.includes(r.value,r.position)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):"toLowerCase"===r.kind?e.data=e.data.toLowerCase():"toUpperCase"===r.kind?e.data=e.data.toUpperCase():"startsWith"===r.kind?e.data.startsWith(r.value)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):"endsWith"===r.kind?e.data.endsWith(r.value)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):"datetime"===r.kind?((a=r).precision?a.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}Z$`):0===a.precision?a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:"datetime",message:r.message}),t.dirty()):"ip"===r.kind?(i=e.data,("v4"!==(n=r.version)&&n||!J.test(i))&&("v6"!==n&&n||!Y.test(i))&&(s=this._getOrReturnCtx(e,s),E(s,{validation:"ip",code:w.invalid_string,message:r.message}),t.dirty())):b.assertNever(r);var i,n,a;return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement((t=>e.test(t)),{validation:t,code:w.invalid_string,...U.errToObj(s)})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...U.errToObj(e)})}url(e){return this._addCheck({kind:"url",...U.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...U.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...U.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...U.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...U.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...U.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...U.errToObj(e)})}datetime(e){var t;return this._addCheck("string"==typeof e?{kind:"datetime",precision:null,offset:!1,message:e}:{kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...U.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...U.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...U.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...U.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...U.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...U.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...U.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...U.errToObj(t)})}nonempty(e){return this.min(1,U.errToObj(e))}trim(){return new Q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function X(e,t){const s=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=s>i?s:i;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}Q.create=e=>{var t;return new Q({checks:[],typeName:Ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class ee extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.number){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.number,received:t.parsedType}),A}let t;const s=new C;for(const i of this._def.checks)"int"===i.kind?b.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):"multipleOf"===i.kind?0!==X(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_finite,message:i.message}),s.dirty()):b.assertNever(i);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,s,i){return new ee({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:U.toString(i)}]})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:U.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:U.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&b.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ee.create=e=>new ee({checks:[],typeName:Ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class te extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==x.bigint){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.bigint,received:t.parsedType}),A}let t;const s=new C;for(const i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):b.assertNever(i);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,s,i){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:U.toString(i)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}te.create=e=>{var t;return new te({checks:[],typeName:Ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class se extends O{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==x.boolean){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.boolean,received:t.parsedType}),A}return P(e.data)}}se.create=e=>new se({typeName:Ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class ie extends O{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.date,received:t.parsedType}),A}if(isNaN(e.data.getTime()))return E(this._getOrReturnCtx(e),{code:w.invalid_date}),A;const t=new C;let s;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):b.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:U.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:U.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ie.create=e=>new ie({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...K(e)});class ne extends O{_parse(e){if(this._getType(e)!==x.symbol){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.symbol,received:t.parsedType}),A}return P(e.data)}}ne.create=e=>new ne({typeName:Ke.ZodSymbol,...K(e)});class ae extends O{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.undefined,received:t.parsedType}),A}return P(e.data)}}ae.create=e=>new ae({typeName:Ke.ZodUndefined,...K(e)});class re extends O{_parse(e){if(this._getType(e)!==x.null){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.null,received:t.parsedType}),A}return P(e.data)}}re.create=e=>new re({typeName:Ke.ZodNull,...K(e)});class oe extends O{constructor(){super(...arguments),this._any=!0}_parse(e){return P(e.data)}}oe.create=e=>new oe({typeName:Ke.ZodAny,...K(e)});class le extends O{constructor(){super(...arguments),this._unknown=!0}_parse(e){return P(e.data)}}le.create=e=>new le({typeName:Ke.ZodUnknown,...K(e)});class ce extends O{_parse(e){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.never,received:t.parsedType}),A}}ce.create=e=>new ce({typeName:Ke.ZodNever,...K(e)});class de extends O{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.void,received:t.parsedType}),A}return P(e.data)}}de.create=e=>new de({typeName:Ke.ZodVoid,...K(e)});class ue extends O{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),i=this._def;if(t.parsedType!==x.array)return E(t,{code:w.invalid_type,expected:x.array,received:t.parsedType}),A;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,n=t.data.length<i.exactLength.value;(e||n)&&(E(t,{code:e?w.too_big:w.too_small,minimum:n?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),s.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(E(t,{code:w.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),s.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(E(t,{code:w.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map(((e,s)=>i.type._parseAsync(new B(t,e,t.path,s))))).then((e=>C.mergeArray(s,e)));const n=[...t.data].map(((e,s)=>i.type._parseSync(new B(t,e,t.path,s))));return C.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new ue({...this._def,minLength:{value:e,message:U.toString(t)}})}max(e,t){return new ue({...this._def,maxLength:{value:e,message:U.toString(t)}})}length(e,t){return new ue({...this._def,exactLength:{value:e,message:U.toString(t)}})}nonempty(e){return this.min(1,e)}}function he(e){if(e instanceof me){const t={};for(const s in e.shape)t[s]=Ce.create(he(e.shape[s]));return new me({...e._def,shape:()=>t})}return e instanceof ue?new ue({...e._def,type:he(e.element)}):e instanceof Ce?Ce.create(he(e.unwrap())):e instanceof Ae?Ae.create(he(e.unwrap())):e instanceof Te?Te.create(e.items.map((e=>he(e)))):e}ue.create=(e,t)=>new ue({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...K(t)});class me extends O{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=b.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.object,received:t.parsedType}),A}const{status:t,ctx:s}=this._processInputParams(e),{shape:i,keys:n}=this._getCached(),a=[];if(!(this._def.catchall instanceof ce&&"strip"===this._def.unknownKeys))for(const e in s.data)n.includes(e)||a.push(e);const r=[];for(const e of n)r.push({key:{status:"valid",value:e},value:i[e]._parse(new B(s,s.data[e],s.path,e)),alwaysSet:e in s.data});if(this._def.catchall instanceof ce){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)r.push({key:{status:"valid",value:e},value:{status:"valid",value:s.data[e]}});else if("strict"===e)a.length>0&&(E(s,{code:w.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a)r.push({key:{status:"valid",value:t},value:e._parse(new B(s,s.data[t],s.path,t)),alwaysSet:t in s.data})}return s.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of r){const s=await t.key;e.push({key:s,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>C.mergeObjectSync(t,e))):C.mergeObjectSync(t,r)}get shape(){return this._def.shape()}strict(e){return new me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,s)=>{var i,n,a,r;const o=null!==(a=null===(n=(i=this._def).errorMap)||void 0===n?void 0:n.call(i,t,s).message)&&void 0!==a?a:s.defaultError;return"unrecognized_keys"===t.code?{message:null!==(r=U.errToObj(e).message)&&void 0!==r?r:o}:{message:o}}}:{}})}strip(){return new me({...this._def,unknownKeys:"strip"})}passthrough(){return new me({...this._def,unknownKeys:"passthrough"})}extend(e){return new me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new me({...this._def,catchall:e})}pick(e){const t={};return b.objectKeys(e).forEach((s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])})),new me({...this._def,shape:()=>t})}omit(e){const t={};return b.objectKeys(this.shape).forEach((s=>{e[s]||(t[s]=this.shape[s])})),new me({...this._def,shape:()=>t})}deepPartial(){return he(this)}partial(e){const t={};return b.objectKeys(this.shape).forEach((s=>{const i=this.shape[s];t[s]=e&&!e[s]?i:i.optional()})),new me({...this._def,shape:()=>t})}required(e){const t={};return b.objectKeys(this.shape).forEach((s=>{if(e&&!e[s])t[s]=this.shape[s];else{let e=this.shape[s];for(;e instanceof Ce;)e=e._def.innerType;t[s]=e}})),new me({...this._def,shape:()=>t})}keyof(){return Ie(b.objectKeys(this.shape))}}me.create=(e,t)=>new me({shape:()=>e,unknownKeys:"strip",catchall:ce.create(),typeName:Ke.ZodObject,...K(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:"strict",catchall:ce.create(),typeName:Ke.ZodObject,...K(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:"strip",catchall:ce.create(),typeName:Ke.ZodObject,...K(t)});class pe extends O{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;if(t.common.async)return Promise.all(s.map((async e=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const s of e)if("dirty"===s.result.status)return t.common.issues.push(...s.ctx.common.issues),s.result;const s=e.map((e=>new k(e.ctx.common.issues)));return E(t,{code:w.invalid_union,unionErrors:s}),A}));{let e;const i=[];for(const n of s){const s={...t,common:{...t.common,issues:[]},parent:null},a=n._parseSync({data:t.data,path:t.path,parent:s});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:s}),s.common.issues.length&&i.push(s.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=i.map((e=>new k(e)));return E(t,{code:w.invalid_union,unionErrors:n}),A}}get options(){return this._def.options}}pe.create=(e,t)=>new pe({options:e,typeName:Ke.ZodUnion,...K(t)});const ve=e=>e instanceof we?ve(e.schema):e instanceof Ee?ve(e.innerType()):e instanceof ke?[e.value]:e instanceof _e?e.options:e instanceof Ne?Object.keys(e.enum):e instanceof Ze?ve(e._def.innerType):e instanceof ae?[void 0]:e instanceof re?[null]:null;class fe extends O{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.object)return E(t,{code:w.invalid_type,expected:x.object,received:t.parsedType}),A;const s=this.discriminator,i=this.optionsMap.get(t.data[s]);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(E(t,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const i=new Map;for(const s of t){const t=ve(s.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(i.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,s)}}return new fe({typeName:Ke.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...K(s)})}}function ge(e,t){const s=G(e),i=G(t);if(e===t)return{valid:!0,data:e};if(s===x.object&&i===x.object){const s=b.objectKeys(t),i=b.objectKeys(e).filter((e=>-1!==s.indexOf(e))),n={...e,...t};for(const s of i){const i=ge(e[s],t[s]);if(!i.valid)return{valid:!1};n[s]=i.data}return{valid:!0,data:n}}if(s===x.array&&i===x.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const n=ge(e[i],t[i]);if(!n.valid)return{valid:!1};s.push(n.data)}return{valid:!0,data:s}}return s===x.date&&i===x.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ye extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),i=(e,i)=>{if(z(e)||z(i))return A;const n=ge(e.value,i.value);return n.valid?((j(e)||j(i))&&t.dirty(),{status:t.value,value:n.data}):(E(s,{code:w.invalid_intersection_types}),A)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ye.create=(e,t,s)=>new ye({left:e,right:t,typeName:Ke.ZodIntersection,...K(s)});class Te extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.array)return E(s,{code:w.invalid_type,expected:x.array,received:s.parsedType}),A;if(s.data.length<this._def.items.length)return E(s,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&s.data.length>this._def.items.length&&(E(s,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...s.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new B(s,e,s.path,t)):null})).filter((e=>!!e));return s.common.async?Promise.all(i).then((e=>C.mergeArray(t,e))):C.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Te({...this._def,rest:e})}}Te.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Te({items:e,typeName:Ke.ZodTuple,rest:null,...K(t)})};class be extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.object)return E(s,{code:w.invalid_type,expected:x.object,received:s.parsedType}),A;const i=[],n=this._def.keyType,a=this._def.valueType;for(const e in s.data)i.push({key:n._parse(new B(s,e,s.path,e)),value:a._parse(new B(s,s.data[e],s.path,e))});return s.common.async?C.mergeObjectAsync(t,i):C.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,s){return new be(t instanceof O?{keyType:e,valueType:t,typeName:Ke.ZodRecord,...K(s)}:{keyType:Q.create(),valueType:e,typeName:Ke.ZodRecord,...K(t)})}}class Me extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.map)return E(s,{code:w.invalid_type,expected:x.map,received:s.parsedType}),A;const i=this._def.keyType,n=this._def.valueType,a=[...s.data.entries()].map((([e,t],a)=>({key:i._parse(new B(s,e,s.path,[a,"key"])),value:n._parse(new B(s,t,s.path,[a,"value"]))})));if(s.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const s of a){const i=await s.key,n=await s.value;if("aborted"===i.status||"aborted"===n.status)return A;"dirty"!==i.status&&"dirty"!==n.status||t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const s of a){const i=s.key,n=s.value;if("aborted"===i.status||"aborted"===n.status)return A;"dirty"!==i.status&&"dirty"!==n.status||t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}}}Me.create=(e,t,s)=>new Me({valueType:t,keyType:e,typeName:Ke.ZodMap,...K(s)});class xe extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.set)return E(s,{code:w.invalid_type,expected:x.set,received:s.parsedType}),A;const i=this._def;null!==i.minSize&&s.data.size<i.minSize.value&&(E(s,{code:w.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&s.data.size>i.maxSize.value&&(E(s,{code:w.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const n=this._def.valueType;function a(e){const s=new Set;for(const i of e){if("aborted"===i.status)return A;"dirty"===i.status&&t.dirty(),s.add(i.value)}return{status:t.value,value:s}}const r=[...s.data.values()].map(((e,t)=>n._parse(new B(s,e,s.path,t))));return s.common.async?Promise.all(r).then((e=>a(e))):a(r)}min(e,t){return new xe({...this._def,minSize:{value:e,message:U.toString(t)}})}max(e,t){return new xe({...this._def,maxSize:{value:e,message:U.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}xe.create=(e,t)=>new xe({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...K(t)});class Ge extends O{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.function)return E(t,{code:w.invalid_type,expected:x.function,received:t.parsedType}),A;function s(e,s){return S({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,N(),I].filter((e=>!!e)),issueData:{code:w.invalid_arguments,argumentsError:s}})}function i(e,s){return S({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,N(),I].filter((e=>!!e)),issueData:{code:w.invalid_return_type,returnTypeError:s}})}const n={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Se){const e=this;return P((async function(...t){const r=new k([]),o=await e._def.args.parseAsync(t,n).catch((e=>{throw r.addIssue(s(t,e)),r})),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,n).catch((e=>{throw r.addIssue(i(l,e)),r}))}))}{const e=this;return P((function(...t){const r=e._def.args.safeParse(t,n);if(!r.success)throw new k([s(t,r.error)]);const o=Reflect.apply(a,this,r.data),l=e._def.returns.safeParse(o,n);if(!l.success)throw new k([i(o,l.error)]);return l.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ge({...this._def,args:Te.create(e).rest(le.create())})}returns(e){return new Ge({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new Ge({args:e||Te.create([]).rest(le.create()),returns:t||le.create(),typeName:Ke.ZodFunction,...K(s)})}}class we extends O{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}we.create=(e,t)=>new we({getter:e,typeName:Ke.ZodLazy,...K(t)});class ke extends O{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:w.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ie(e,t){return new _e({values:e,typeName:Ke.ZodEnum,...K(t)})}ke.create=(e,t)=>new ke({value:e,typeName:Ke.ZodLiteral,...K(t)});class _e extends O{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e);return E(t,{expected:b.joinValues(this._def.values),received:t.parsedType,code:w.invalid_type}),A}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:w.invalid_enum_value,options:this._def.values}),A}return P(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return _e.create(e)}exclude(e){return _e.create(this.options.filter((t=>!e.includes(t))))}}_e.create=Ie;class Ne extends O{_parse(e){const t=b.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==x.string&&s.parsedType!==x.number){const e=b.objectValues(t);return E(s,{expected:b.joinValues(e),received:s.parsedType,code:w.invalid_type}),A}if(-1===t.indexOf(e.data)){const e=b.objectValues(t);return E(s,{received:s.data,code:w.invalid_enum_value,options:e}),A}return P(e.data)}get enum(){return this._def.values}}Ne.create=(e,t)=>new Ne({values:e,typeName:Ke.ZodNativeEnum,...K(t)});class Se extends O{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.promise&&!1===t.common.async)return E(t,{code:w.invalid_type,expected:x.promise,received:t.parsedType}),A;const s=t.parsedType===x.promise?t.data:Promise.resolve(t.data);return P(s.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Se.create=(e,t)=>new Se({type:e,typeName:Ke.ZodPromise,...K(t)});class Ee extends O{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),i=this._def.effect||null,n={addIssue:e=>{E(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===i.type){const e=i.transform(s.data,n);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,n);if(s.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(!1===s.common.async){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===i.status?A:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((s=>"aborted"===s.status?A:("dirty"===s.status&&t.dirty(),e(s.value).then((()=>({status:t.value,value:s.value}))))))}if("transform"===i.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!D(e))return e;const a=i.transform(e.value,n);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>D(e)?Promise.resolve(i.transform(e.value,n)).then((e=>({status:t.value,value:e}))):e))}b.assertNever(i)}}Ee.create=(e,t,s)=>new Ee({schema:e,typeName:Ke.ZodEffects,effect:t,...K(s)}),Ee.createWithPreprocess=(e,t,s)=>new Ee({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...K(s)});class Ce extends O{_parse(e){return this._getType(e)===x.undefined?P(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ce.create=(e,t)=>new Ce({innerType:e,typeName:Ke.ZodOptional,...K(t)});class Ae extends O{_parse(e){return this._getType(e)===x.null?P(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:Ke.ZodNullable,...K(t)});class Ze extends O{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===x.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ze.create=(e,t)=>new Ze({innerType:e,typeName:Ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...K(t)});class Pe extends O{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return L(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new k(s.common.issues)},input:s.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new k(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:Ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...K(t)});class ze extends O{_parse(e){if(this._getType(e)!==x.nan){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.nan,received:t.parsedType}),A}return{status:"valid",value:e.data}}}ze.create=e=>new ze({typeName:Ke.ZodNaN,...K(e)});const je=Symbol("zod_brand");class De extends O{_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.type._parse({data:t.data,path:t.path,parent:t})}unwrap(){return this._def.type}}class Le extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),Z(e.value)):this._def.out._parseAsync({data:e.value,path:s.path,parent:s})})();{const e=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:s.path,parent:s})}}static create(e,t){return new Le({in:e,out:t,typeName:Ke.ZodPipeline})}}class Ue extends O{_parse(e){const t=this._def.innerType._parse(e);return D(t)&&(t.value=Object.freeze(t.value)),t}}Ue.create=(e,t)=>new Ue({innerType:e,typeName:Ke.ZodReadonly,...K(t)});const Be=(e,t={},s)=>e?oe.create().superRefine(((i,n)=>{var a,r;if(!e(i)){const e="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,o=null===(r=null!==(a=e.fatal)&&void 0!==a?a:s)||void 0===r||r;n.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:o})}})):oe.create(),$e={object:me.lazycreate};var Ke;!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"}(Ke||(Ke={}));const Oe=Q.create,Re=ee.create,qe=se.create,Ve=Ee.create,Fe={string:e=>Q.create({...e,coerce:!0}),number:e=>ee.create({...e,coerce:!0}),boolean:e=>se.create({...e,coerce:!0}),bigint:e=>te.create({...e,coerce:!0}),date:e=>ie.create({...e,coerce:!0})};var He=Object.freeze({__proto__:null,defaultErrorMap:I,setErrorMap:function(e){_=e},getErrorMap:N,makeIssue:S,EMPTY_PATH:[],addIssueToContext:E,ParseStatus:C,INVALID:A,DIRTY:Z,OK:P,isAborted:z,isDirty:j,isValid:D,isAsync:L,get util(){return b},get objectUtil(){return M},ZodParsedType:x,getParsedType:G,ZodType:O,ZodString:Q,ZodNumber:ee,ZodBigInt:te,ZodBoolean:se,ZodDate:ie,ZodSymbol:ne,ZodUndefined:ae,ZodNull:re,ZodAny:oe,ZodUnknown:le,ZodNever:ce,ZodVoid:de,ZodArray:ue,ZodObject:me,ZodUnion:pe,ZodDiscriminatedUnion:fe,ZodIntersection:ye,ZodTuple:Te,ZodRecord:be,ZodMap:Me,ZodSet:xe,ZodFunction:Ge,ZodLazy:we,ZodLiteral:ke,ZodEnum:_e,ZodNativeEnum:Ne,ZodPromise:Se,ZodEffects:Ee,ZodTransformer:Ee,ZodOptional:Ce,ZodNullable:Ae,ZodDefault:Ze,ZodCatch:Pe,ZodNaN:ze,BRAND:je,ZodBranded:De,ZodPipeline:Le,ZodReadonly:Ue,custom:Be,Schema:O,ZodSchema:O,late:$e,get ZodFirstPartyTypeKind(){return Ke},coerce:Fe,any:oe.create,array:ue.create,bigint:te.create,boolean:qe,date:ie.create,discriminatedUnion:fe.create,effect:Ve,enum:_e.create,function:Ge.create,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Be((t=>t instanceof e),t),intersection:ye.create,lazy:we.create,literal:ke.create,map:Me.create,nan:ze.create,nativeEnum:Ne.create,never:ce.create,null:re.create,nullable:Ae.create,number:Re,object:me.create,oboolean:()=>qe().optional(),onumber:()=>Re().optional(),optional:Ce.create,ostring:()=>Oe().optional(),pipeline:Le.create,preprocess:Ee.createWithPreprocess,promise:Se.create,record:be.create,set:xe.create,strictObject:me.strictCreate,string:Oe,symbol:ne.create,transformer:Ve,tuple:Te.create,undefined:ae.create,union:pe.create,unknown:le.create,void:de.create,NEVER:A,ZodIssueCode:w,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:k});const We=[["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"]].map((e=>({value:e[2],label:e[2]}))),Je=He.object({business_name:He.string().trim().max(30).optional(),contact_email:He.string().trim().email("Invalid email").optional().or(He.literal("")),phone:He.preprocess((e=>p(String(e).trim())),He.string().optional()),timezone:He.string().trim().optional(),url:He.string().trim().optional()}),Ye=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.organizationUpdated=t(this,"organizationUpdated",7),this.endpoint=n.getDefault(),this.valid=!1,this.dirty=!1,this.submitting=!1,this.name="",this.business_name="",this.contact_email="",this.phone="",this.address="",this.address2="",this.timezone="",this.url=""}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){const e=await(t=this.endpoint,s=this.endpoint.session.organization_id,t.api.get("/organizations/".concat(s)).then((function(e){return e.data})));var t,s;console.log("[SETTINGS] Loaded organization",e),this.resetForm(e)}resetForm(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=!1,this.valid=!0}handleSubmit(e){var t,s,i;e.preventDefault(),e.stopPropagation(),(t=n.getDefault(),s=this.endpoint.session.organization_id,i={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},t.api.patch("/organizations/".concat(s),i).then((function(e){return e.data}))).then((e=>{var t;console.log("[SETTINGS] Update result",e),null===(t=this.organizationUpdated)||void 0===t||t.emit({endpoint:this.endpoint,organization:e}),this.resetForm(e)})).catch((e=>l(`Error updating organization: ${e.message}`,{style:"error"})))}processFields(){const e=Je.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=!0}render(){return this.endpoint.session?s(i,null,s("h1",null,"Organization Profile"),s("form",{onSubmit:e=>this.handleSubmit(e)},s("div",{class:"columns"},s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-organization-name",value:this.name,autocomplete:"off",label:"Name",required:!1,disabled:!1,placeholder:"Enter your organization's name...",onInput:e=>this.name=e.target.value,onFocusout:e=>{this.name=e.target.value.trim(),this.processFields()}}),s("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:e=>this.business_name=e.target.value,onFocusout:e=>{this.business_name=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-organization-url",value:this.url,autocomplete:"off",label:"Web URL",placeholder:"Enter your Web URL...",onInput:e=>this.url=e.target.value,onFocusout:e=>{this.url=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-organization-phone",value:this.phone,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:e=>this.phone=e.target.value,onFocusout:e=>{this.phone=e.target.value.trim(),this.processFields()}})),s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-organization-email",value:this.contact_email,clearable:!0,autocomplete:"off",label:"Contact Email",placeholder:"Enter your contact email address...",onInput:e=>this.contact_email=e.target.value,onFocusout:e=>{this.contact_email=e.target.value.trim(),this.processFields()}}),s("verdocs-select-input",{options:We,value:this.timezone,label:"Time Zone"}))),s("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty}))):(console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated"))}};Ye.style='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}}';const Qe=He.object({first_name:He.string().trim().min(1,"First name is required").max(30),last_name:He.string().trim().min(1,"Last name is required").max(30),email:He.string().trim().email("Invalid email").min(1,"Email is required"),phone:He.preprocess((e=>p(String(e).trim())),He.string())}),Xe=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.profileUpdated=t(this,"profileUpdated",7),this.endpoint=n.getDefault(),this.valid=!1,this.dirty=!1,this.submitting=!1,this.first_name="",this.last_name="",this.email="",this.phone=""}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){const e=await u(this.endpoint);console.log("[SETTINGS] Loaded profile",e),this.resetForm(e)}resetForm(e){this.first_name=e.first_name,this.last_name=e.last_name,this.email=e.email,this.phone=e.phone,this.dirty=!1,this.valid=!0}handleSubmit(e){e.preventDefault(),e.stopPropagation(),h(n.getDefault(),this.endpoint.session.profile_id,{first_name:this.first_name,last_name:this.last_name,phone:this.phone}).then((e=>{var t;console.log("[SETTINGS] Update result",e),null===(t=this.profileUpdated)||void 0===t||t.emit({endpoint:this.endpoint,profile:e}),this.resetForm(e)})).catch((e=>l(`Error updating profile: ${e.message}`,{style:"error"})))}processFields(){const e=Qe.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=!0}render(){return this.endpoint.session?s(i,null,s("h1",null,"My Profile"),s("form",{onSubmit:e=>this.handleSubmit(e)},s("div",{class:"columns"},s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-profile-first-name",value:this.first_name,autocomplete:"off",label:"First Name",required:!0,placeholder:"Enter your first name...",onInput:e=>this.first_name=e.target.value,onFocusout:e=>{this.first_name=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-profile-last-name",value:this.last_name,autocomplete:"off",label:"Last Name",required:!0,placeholder:"Enter your last name...",onInput:e=>this.last_name=e.target.value,onFocusout:e=>{this.last_name=e.target.value.trim(),this.processFields()}})),s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-profile-email",value:this.email,autocomplete:"off",label:"Email Address",required:!0,disabled:!0,placeholder:"Enter your email address...",onInput:e=>this.email=e.target.value,onFocusout:e=>{this.email=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-profile-phone",value:this.phone,clearable:!0,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:e=>this.phone=e.target.value,onFocusout:e=>{this.phone=e.target.value.trim(),this.processFields()}}))),s("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty}))):(console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated"))}};Xe.style='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}}';export{f as verdocs_settings_api_keys,T as verdocs_settings_members,Ye as verdocs_settings_organization,Xe as verdocs_settings_profile}
|
1
|
+
import{r as e,c as t,h as s,H as i}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as n}from"./p-d77962af.js";import{a,c as r,b as o}from"./p-5e808a0b.js";import{V as l}from"./p-ed416acf.js";import{S as c}from"./p-7a1b2643.js";import{g as d,a as u,u as h}from"./p-3e607686.js";import{f as m}from"./p-c220af42.js";import{c as p}from"./p-b72328af.js";import"./p-eab67c09.js";import"./p-dc2ad047.js";import"./p-1b4e7078.js";var v=function(e,t){return e.api.get("/organizations/".concat(t,"/profiles")).then((function(e){return e.data}))};const f=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.memberInvited=t(this,"memberInvited",7),this.memberUpdated=t(this,"memberUpdated",7),this.memberRemoved=t(this,"memberRemoved",7),this.endpoint=n.getDefault(),this.keys=[],this.creatingKey=!1,this.createdKey=null,this.deletingKey=null,this.rotatingKey=null,this.newApiKeyName="",this.newApiKeyProfileId="",this.members=[]}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){this.newApiKeyProfileId=this.endpoint.session.profile_id,v(this.endpoint,this.endpoint.session.organization_id).then((e=>{this.members=e})).catch((e=>{var t,s,i;console.log("[SETTINGS] Error loading organization members",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to load API keys. Please try again later",{style:"error"})})),this.loadKeys()}loadKeys(){var e,t;(e=this.endpoint,t=this.endpoint.session.organization_id,e.api.get("/organizations/".concat(t,"/api_key")).then((function(e){return e.data}))).then((e=>{this.keys=e})).catch((e=>{var t,s,i;console.log("[SETTINGS] Unable to load API keys",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to load API keys. Please try again later",{style:"error"})}))}async handleDeleteKey(){var e,t,s;(e=this.endpoint,t=this.deletingKey.organization_id,s=this.deletingKey.client_id,e.api.delete("/organizations/".concat(t,"/api_key/").concat(s)).then((function(e){return e.data}))).then((()=>{this.deletingKey=null,l("API key deleted",{style:"success"}),this.loadKeys()})).catch((e=>{var t,s,i;this.deletingKey=null,console.log("[SETTINGS] Unable to delete API key",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to delete API key. Please try again later",{style:"error"})}))}async handleRotateKey(){var e,t,s;(e=this.endpoint,t=this.rotatingKey.organization_id,s=this.rotatingKey.client_id,e.api.put("/organizations/".concat(t,"/api_key/").concat(s,"/rotate")).then((function(e){return e.data}))).then((e=>{this.rotatingKey=null,l("API key rotated",{style:"success"}),this.loadKeys(),this.createdKey=e})).catch((e=>{var t,s,i;this.rotatingKey=null,console.log("[SETTINGS] Unable to rotate API key",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to rotate API key. Please try again later",{style:"error"})}))}async handleCreateKey(){var e,t,s;(e=this.endpoint,t=this.endpoint.session.organization_id,s={name:this.newApiKeyName,profile_id:this.newApiKeyProfileId},e.api.post("/organizations/".concat(t,"/api_key"),s).then((function(e){return e.data}))).then((e=>{this.creatingKey=!1,this.createdKey=e,l("API key created",{style:"success"}),this.loadKeys()})).catch((e=>{var t,s,i;this.creatingKey=!1,console.log("[SETTINGS] Unable to create API key",e),null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to create API key. Please try again later",{style:"error"})}))}render(){var e,t,n,r;const o=this.members.map((e=>({label:a(e),value:e.id})));return this.endpoint.session?s(i,null,s("verdocs-table",{data:this.keys,columns:[{id:"name",header:"Name",renderCell:(e,t)=>s("div",null,s("div",null,t.name))},{id:"client_id",header:"Client ID",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:'<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>'}),s("div",null,t.client_id))},{id:"profile_id",header:"Acts as",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:'<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>'}),s("div",null,a(t.profile)))},{id:"actions",header:"Actions",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:'<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>',onClick:()=>this.deletingKey=t}),s("div",{innerHTML:'<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>',onClick:()=>this.rotatingKey=t}))}]}),s("verdocs-button",{label:"Add API Key",size:"normal",onClick:()=>this.creatingKey=!0}),this.deletingKey&&s("verdocs-dialog",{onExit:()=>this.deletingKey=null},s("div",{slot:"title",class:"heading"},'Delete API key "',this.deletingKey.name,'"?'),s("div",{class:"content"},s("p",null,"Are you sure you want to delete this key? This action cannot be undone."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:()=>this.deletingKey=null}),s("verdocs-button",{size:"small",label:"OK",onClick:()=>this.handleDeleteKey()})))),this.rotatingKey&&s("verdocs-dialog",{onExit:()=>this.rotatingKey=null},s("div",{slot:"title",class:"heading"},'Rotate API key "',this.rotatingKey.name,'"?'),s("div",{class:"content"},s("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."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:()=>this.rotatingKey=null}),s("verdocs-button",{size:"small",label:"OK",onClick:()=>this.handleRotateKey()})))),this.creatingKey&&s("verdocs-dialog",{onExit:()=>this.creatingKey=!1},s("div",{slot:"title",class:"heading"},"Create API Key"),s("div",{class:"content"},s("verdocs-text-input",{label:"Name",placeholder:"API key name...",id:"verdocs-api-key-name",value:this.newApiKeyName,autocomplete:"off",required:!0,onInput:e=>this.newApiKeyName=e.target.value,onFocusout:e=>{this.newApiKeyName=e.target.value.trim()}}),s("p",null,'API keys must be associated with a profile. Actions performed via API calls using this key will "act as" this profile.'),s("verdocs-select-input",{options:o,label:"Act as Profile",onInput:e=>{this.newApiKeyProfileId=e.target.value}}),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",onClick:()=>this.creatingKey=!1}),s("verdocs-button",{size:"small",label:"OK",onClick:()=>this.handleCreateKey()})))),this.createdKey&&s("verdocs-dialog",{onExit:()=>this.createdKey=null},s("div",{slot:"title",class:"heading"},"API Key Details"),s("div",{class:"content"},s("verdocs-text-input",{label:"Name",disabled:!0,value:null===(e=this.createdKey)||void 0===e?void 0:e.name}),s("verdocs-text-input",{label:"Profile",disabled:!0,value:a(null===(t=this.createdKey)||void 0===t?void 0:t.profile)}),s("p",null,"Please save the Client ID and Secret below. Be sure to never expose your secret key in insecure (Web or mobile environments)!"),s("verdocs-text-input",{label:"Client ID",disabled:!0,value:null===(n=this.createdKey)||void 0===n?void 0:n.client_id,copyable:!0}),s("verdocs-text-input",{label:"Secret Key",disabled:!0,value:null===(r=this.createdKey)||void 0===r?void 0:r.client_secret,copyable:!0}),s("div",{class:"buttons"},s("verdocs-button",{size:"small",label:"Done",onClick:()=>this.createdKey=null}))))):(console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated"))}};f.style='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}}';const g='<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>',y=e=>void 0!==e.find((e=>"owner"===e.name))?"Owner":void 0!==e.find((e=>"admin"===e.name))?"Admin":void 0!==e.find((e=>"member"===e.name))?"Member":void 0!==e.find((e=>"basic_user"===e.name))?"Basic User":void 0!==e.find((e=>"contact"===e.name))?"Contact":void 0,T=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.memberInvited=t(this,"memberInvited",7),this.memberUpdated=t(this,"memberUpdated",7),this.memberRemoved=t(this,"memberRemoved",7),this.endpoint=n.getDefault(),this.members=[],this.invited=[],this.roles=[],this.selectedTab=0,this.invitingMember=!1,this.newEmailAddress="",this.newRoleId="",this.submitting=!1,this.deletingInvitation=null,this.resendingInvitation=null,this.deletingMember=null}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){this.loadMembers().catch((e=>console.log("Unknown Error",e)))}async loadMembers(){var e,t,s,i,n,a;try{const[t,s,i]=await Promise.all([d(this.endpoint),v(this.endpoint,this.endpoint.session.organization_id),(n=this.endpoint,a=this.endpoint.session.organization_id,n.api.get("/organizations/".concat(a,"/invitation")).then((function(e){return e.data})))]);this.roles=t,this.members=s,this.invited=i,this.newRoleId=(null===(e=t.find((e=>"member"===e.name)))||void 0===e?void 0:e.id)||""}catch(e){null===(t=this.sdkError)||void 0===t||t.emit(new c(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(i=e.response)||void 0===i?void 0:i.data)),l("Unable to load members. Please try again later")}}async handleInviteMember(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.endpoint.session.organization_id,s={email:this.newEmailAddress,role_id:this.newRoleId,organization_id:this.endpoint.session.organization_id},e.api.post("/organizations/".concat(t,"/invitation"),s).then((function(e){return e.data}))).then((e=>{console.log("[SETTINGS] Invited member",e),this.invitingMember=!1,this.submitting=!1,this.newRoleId="",this.newEmailAddress="",l("Invitation sent!",{style:"success"}),this.loadMembers()})).catch((e=>{console.log("[SETTINGS] Unable to invite member",e),this.invitingMember=!1,this.submitting=!1,this.newRoleId="",this.newEmailAddress="",l("Unable to invite member. Please try again later",{style:"error"})}))}async handleDeleteMember(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.deletingMember.organization_id,s=this.deletingMember.email,e.api.delete("/organizations/".concat(t,"/profiles/").concat(s)).then((function(e){return e.data}))).then((()=>{this.submitting=!1,this.deletingMember=null,l("The member has been deleted.",{style:"success"}),this.loadMembers()})).catch((e=>{this.submitting=!1,this.deletingMember=null,console.log("Delete error",e),l("Unable to cancel invitation. Please try again later",{style:"error"})}))}async handleDeleteInvitation(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.deletingInvitation.organization_id,s=this.deletingInvitation.email,e.api.delete("/organizations/".concat(t,"/invitation/").concat(s)).then((function(e){return e.data}))).then((()=>{this.submitting=!1,this.deletingInvitation=null,l("The invitation has been cancelled.",{style:"success"}),this.loadMembers()})).catch((e=>{this.submitting=!1,this.deletingInvitation=null,console.log("Delete error",e),l("Unable to cancel invitation. Please try again later",{style:"error"})}))}async handleResendInvitation(){var e,t,s;this.submitting=!0,(e=n.getDefault(),t=this.resendingInvitation.organization_id,s=this.resendingInvitation.email,e.api.post("/organizations/".concat(t,"/invitation/").concat(s,"/resend")).then((function(e){return e.data}))).then((()=>{this.submitting=!1,this.resendingInvitation=null,l("The invitation has been resent.",{style:"success"}),this.loadMembers()})).catch((e=>{this.submitting=!1,this.resendingInvitation=null,console.log("REsend error",e),l("Unable to resend invitation. Please try again later",{style:"error"})}))}render(){if(!this.endpoint.session)return console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated");const e=this.roles.map((e=>({label:y([{name:e.name}]),value:e.id})));return s(i,null,s("verdocs-tabs",{tabs:[{label:`Members (${this.members.length})`},{label:`Pending Invitations (${this.invited.length})`}],onSelectTab:e=>this.selectedTab=e.detail.index}),0===this.selectedTab&&s("verdocs-table",{data:this.members,columns:[{id:"name",renderHeader:()=>"Member",renderCell:(e,t)=>{return s("div",{style:{display:"flex",flexDirection:"row",gap:"10px",alignItems:"center"}},s("div",{class:"role",style:{backgroundColor:(i=t.roles,void 0!==i.find((e=>"owner"===e.name))?"#9333ea":void 0!==i.find((e=>"admin"===e.name))?"#2563eb":void 0!==i.find((e=>"member"===e.name))?"#16a34a":void 0!==i.find((e=>"basic_user"===e.name))?"#ea580c":void 0!==i.find((e=>"contact"===e.name))?"#52525B":void 0)}},o(t)),s("span",null,a(t)));var i}},{id:"email",header:"E-mail Address"},{id:"phone",header:"Phone Number"},{id:"roles",header:"Role",renderCell:(e,t)=>`${y(t.roles)}`},{id:"actions",header:"Actions",renderCell:(e,t)=>s("div",null,t.id!==this.endpoint.session.profile_id&&s("div",{innerHTML:g,onClick:()=>this.deletingMember=t}))}]}),1===this.selectedTab&&s("verdocs-table",{data:this.invited,columns:[{id:"email",header:"E-mail Address"},{id:"generated_at",header:"Invited",renderCell:(e,t)=>s("div",null,m(new Date(t.generated_at),"MMM d, Y"))},{id:"role_id",header:"Role",renderCell:(e,t)=>{var i;return s("div",null,y([{name:null===(i=this.roles.find((e=>e.id===t.role_id)))||void 0===i?void 0:i.name}]))}},{id:"status",header:"Status",renderCell:(e,t)=>s("div",null,r(t.status))},{id:"actions",header:"Actions",renderCell:(e,t)=>s("div",null,s("div",{innerHTML:g,onClick:()=>this.deletingInvitation=t}),s("div",{innerHTML:'<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>',onClick:()=>this.resendingInvitation=t}))}]}),s("verdocs-button",{label:"Invite New Member",size:"normal",disabled:this.submitting,onClick:()=>this.invitingMember=!0}),this.invitingMember&&s("verdocs-dialog",{onExit:()=>this.invitingMember=!1},s("div",{slot:"title",class:"heading"},"Invite New Member"),s("div",{class:"content"},s("verdocs-text-input",{label:"E-mail Address",placeholder:"Enter the user's email address...",id:"verdocs-invite-email",value:this.newEmailAddress,autocomplete:"off",required:!0,onInput:e=>this.newEmailAddress=e.target.value,onFocusout:e=>{this.newEmailAddress=e.target.value.trim()}}),s("div",{style:{marginBottom:"20px"}}),s("verdocs-select-input",{options:e,label:"Role",onInput:e=>{this.newRoleId=e.target.value}}),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",label:"Cancel",disabled:this.submitting,onClick:()=>this.invitingMember=!1}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting||!this.newEmailAddress||!this.newRoleId,onClick:()=>this.handleInviteMember()})))),this.deletingMember&&s("verdocs-dialog",{onExit:()=>this.deletingMember=null},s("div",{slot:"title",class:"heading"},"Delete Member?"),s("div",{class:"content"},s("p",null,"Are you sure you want to delete this member? This action cannot be undone."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:()=>this.deletingMember=null}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:()=>this.handleDeleteMember()})))),this.deletingInvitation&&s("verdocs-dialog",{onExit:()=>this.deletingInvitation=null},s("div",{slot:"title",class:"heading"},"Cancel Invitation?"),s("div",{class:"content"},s("p",null,"Are you sure you want to cancel this invitation? This action cannot be undone."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:()=>this.deletingInvitation=null}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:()=>this.handleDeleteInvitation()})))),this.resendingInvitation&&s("verdocs-dialog",{onExit:()=>this.resendingInvitation=null},s("div",{slot:"title",class:"heading"},"Resend Invitation?"),s("div",{class:"content"},s("p",null,"The user will receive an email reminder to join your organization."),s("div",{class:"buttons"},s("verdocs-button",{variant:"outline",size:"small",disabled:this.submitting,label:"Cancel",onClick:()=>this.resendingInvitation=null}),s("verdocs-button",{size:"small",label:"OK",disabled:this.submitting,onClick:()=>this.handleResendInvitation()})))))}};var b,M;T.style='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}}',function(e){e.assertEqual=e=>e,e.assertIs=function(){},e.assertNever=function(){throw new Error},e.arrayToEnum=e=>{const t={};for(const s of e)t[s]=s;return t},e.getValidEnumValues=t=>{const s=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(const e of s)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(s);return t},e.find=(e,t)=>{for(const s of e)if(t(s))return s},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(b||(b={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(M||(M={}));const x=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),G=e=>{switch(typeof e){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(e)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(e)?x.array:null===e?x.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?x.promise:"undefined"!=typeof Map&&e instanceof Map?x.map:"undefined"!=typeof Set&&e instanceof Set?x.set:"undefined"!=typeof Date&&e instanceof Date?x.date:x.object;default:return x.unknown}},w=b.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"]);class k extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},s={_errors:[]},i=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(i);else if("invalid_return_type"===n.code)i(n.returnTypeError);else if("invalid_arguments"===n.code)i(n.argumentsError);else if(0===n.path.length)s._errors.push(t(n));else{let e=s,i=0;for(;i<n.path.length;){const s=n.path[i];i===n.path.length-1?(e[s]=e[s]||{_errors:[]},e[s]._errors.push(t(n))):e[s]=e[s]||{_errors:[]},e=e[s],i++}}};return i(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,b.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},s=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):s.push(e(i));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}k.create=e=>new k(e);const I=(e,t)=>{let s;switch(e.code){case w.invalid_type:s=e.received===x.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,b.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:s=`Unrecognized key(s) in object: ${b.joinValues(e.keys,", ")}`;break;case w.invalid_union:s="Invalid input";break;case w.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${b.joinValues(e.options)}`;break;case w.invalid_enum_value:s=`Invalid enum value. Expected ${b.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:s="Invalid function arguments";break;case w.invalid_return_type:s="Invalid function return type";break;case w.invalid_date:s="Invalid date";break;case w.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:b.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case w.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case w.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case w.custom:s="Invalid input";break;case w.invalid_intersection_types:s="Intersection results could not be merged";break;case w.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:s="Number must be finite";break;default:s=t.defaultError,b.assertNever(e)}return{message:s}};let _=I;function N(){return _}const S=e=>{const{data:t,path:s,errorMaps:i,issueData:n}=e,a=[...s,...n.path||[]],r={...n,path:a};let o="";const l=i.filter((e=>!!e)).slice().reverse();for(const e of l)o=e(r,{data:t,defaultError:o}).message;return{...n,path:a,message:n.message||o}};function E(e,t){const s=S({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,N(),I].filter((e=>!!e))});e.common.issues.push(s)}class C{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const i of t){if("aborted"===i.status)return A;"dirty"===i.status&&e.dirty(),s.push(i.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const e of t)s.push({key:await e.key,value:await e.value});return C.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const i of t){const{key:t,value:n}=i;if("aborted"===t.status)return A;if("aborted"===n.status)return A;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"===t.value||void 0===n.value&&!i.alwaysSet||(s[t.value]=n.value)}return{status:e.value,value:s}}}const A=Object.freeze({status:"aborted"}),Z=e=>({status:"dirty",value:e}),P=e=>({status:"valid",value:e}),z=e=>"aborted"===e.status,j=e=>"dirty"===e.status,D=e=>"valid"===e.status,L=e=>"undefined"!=typeof Promise&&e instanceof Promise;var U;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(U||(U={}));class B{constructor(e,t,s,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $=(e,t)=>{if(D(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new k(e.common.issues);return this._error=t,this._error}}};function K(e){if(!e)return{};const{errorMap:t,invalid_type_error:s,required_error:i,description:n}=e;if(t&&(s||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:n}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=i?i:t.defaultError}:{message:null!=s?s:t.defaultError},description:n}}class O{constructor(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)}get description(){return this._def.description}_getType(e){return G(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:G(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:G(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(L(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const i={common:{issues:[],async:null!==(s=null==t?void 0:t.async)&&void 0!==s&&s,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:G(e)},n=this._parseSync({data:e,path:i.path,parent:i});return $(i,n)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:G(e)},i=this._parse({data:e,path:s.path,parent:s}),n=await(L(i)?i:Promise.resolve(i));return $(s,n)}refine(e,t){const s=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{const n=e(t),a=()=>i.addIssue({code:w.custom,...s(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(a(),!1))):!!n||(a(),!1)}))}refinement(e,t){return this._refinement(((s,i)=>!!e(s)||(i.addIssue("function"==typeof t?t(s,i):t),!1)))}_refinement(e){return new Ee({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ce.create(this,this._def)}nullable(){return Ae.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this,this._def)}promise(){return Se.create(this,this._def)}or(e){return pe.create([this,e],this._def)}and(e){return ye.create(this,e,this._def)}transform(e){return new Ee({...K(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ze({...K(this._def),innerType:this,defaultValue:t,typeName:Ke.ZodDefault})}brand(){return new De({typeName:Ke.ZodBranded,type:this,...K(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Pe({...K(this._def),innerType:this,catchValue:t,typeName:Ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Le.create(this,e)}readonly(){return Ue.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R=/^c[^\s-]{8,}$/i,q=/^[a-z][a-z0-9]*$/,V=/^[0-9A-HJKMNP-TV-Z]{26}$/,F=/^[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,H=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let W;const J=/^(((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}))$/,Y=/^(([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})))$/;class Q extends O{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==x.string){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.string,received:t.parsedType}),A}const t=new C;let s;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const i=e.data.length>r.value,n=e.data.length<r.value;(i||n)&&(s=this._getOrReturnCtx(e,s),i?E(s,{code:w.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):n&&E(s,{code:w.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)H.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"email",code:w.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)W||(W=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),W.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"emoji",code:w.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)F.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"uuid",code:w.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)R.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"cuid",code:w.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)q.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"cuid2",code:w.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)V.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"ulid",code:w.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch(i){s=this._getOrReturnCtx(e,s),E(s,{validation:"url",code:w.invalid_string,message:r.message}),t.dirty()}else"regex"===r.kind?(r.regex.lastIndex=0,r.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{validation:"regex",code:w.invalid_string,message:r.message}),t.dirty())):"trim"===r.kind?e.data=e.data.trim():"includes"===r.kind?e.data.includes(r.value,r.position)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):"toLowerCase"===r.kind?e.data=e.data.toLowerCase():"toUpperCase"===r.kind?e.data=e.data.toUpperCase():"startsWith"===r.kind?e.data.startsWith(r.value)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):"endsWith"===r.kind?e.data.endsWith(r.value)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):"datetime"===r.kind?((a=r).precision?a.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}Z$`):0===a.precision?a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(s=this._getOrReturnCtx(e,s),E(s,{code:w.invalid_string,validation:"datetime",message:r.message}),t.dirty()):"ip"===r.kind?(i=e.data,("v4"!==(n=r.version)&&n||!J.test(i))&&("v6"!==n&&n||!Y.test(i))&&(s=this._getOrReturnCtx(e,s),E(s,{validation:"ip",code:w.invalid_string,message:r.message}),t.dirty())):b.assertNever(r);var i,n,a;return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement((t=>e.test(t)),{validation:t,code:w.invalid_string,...U.errToObj(s)})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...U.errToObj(e)})}url(e){return this._addCheck({kind:"url",...U.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...U.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...U.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...U.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...U.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...U.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...U.errToObj(e)})}datetime(e){var t;return this._addCheck("string"==typeof e?{kind:"datetime",precision:null,offset:!1,message:e}:{kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...U.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...U.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...U.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...U.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...U.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...U.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...U.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...U.errToObj(t)})}nonempty(e){return this.min(1,U.errToObj(e))}trim(){return new Q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function X(e,t){const s=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=s>i?s:i;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}Q.create=e=>{var t;return new Q({checks:[],typeName:Ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class ee extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==x.number){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.number,received:t.parsedType}),A}let t;const s=new C;for(const i of this._def.checks)"int"===i.kind?b.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):"multipleOf"===i.kind?0!==X(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_finite,message:i.message}),s.dirty()):b.assertNever(i);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,s,i){return new ee({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:U.toString(i)}]})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:U.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:U.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&b.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ee.create=e=>new ee({checks:[],typeName:Ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class te extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==x.bigint){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.bigint,received:t.parsedType}),A}let t;const s=new C;for(const i of this._def.checks)"min"===i.kind?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):"max"===i.kind?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),E(t,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):b.assertNever(i);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,s,i){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:U.toString(i)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}te.create=e=>{var t;return new te({checks:[],typeName:Ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...K(e)})};class se extends O{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==x.boolean){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.boolean,received:t.parsedType}),A}return P(e.data)}}se.create=e=>new se({typeName:Ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...K(e)});class ie extends O{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==x.date){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.date,received:t.parsedType}),A}if(isNaN(e.data.getTime()))return E(this._getOrReturnCtx(e),{code:w.invalid_date}),A;const t=new C;let s;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),E(s,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):b.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:U.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:U.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ie.create=e=>new ie({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...K(e)});class ne extends O{_parse(e){if(this._getType(e)!==x.symbol){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.symbol,received:t.parsedType}),A}return P(e.data)}}ne.create=e=>new ne({typeName:Ke.ZodSymbol,...K(e)});class ae extends O{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.undefined,received:t.parsedType}),A}return P(e.data)}}ae.create=e=>new ae({typeName:Ke.ZodUndefined,...K(e)});class re extends O{_parse(e){if(this._getType(e)!==x.null){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.null,received:t.parsedType}),A}return P(e.data)}}re.create=e=>new re({typeName:Ke.ZodNull,...K(e)});class oe extends O{constructor(){super(...arguments),this._any=!0}_parse(e){return P(e.data)}}oe.create=e=>new oe({typeName:Ke.ZodAny,...K(e)});class le extends O{constructor(){super(...arguments),this._unknown=!0}_parse(e){return P(e.data)}}le.create=e=>new le({typeName:Ke.ZodUnknown,...K(e)});class ce extends O{_parse(e){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.never,received:t.parsedType}),A}}ce.create=e=>new ce({typeName:Ke.ZodNever,...K(e)});class de extends O{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.void,received:t.parsedType}),A}return P(e.data)}}de.create=e=>new de({typeName:Ke.ZodVoid,...K(e)});class ue extends O{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),i=this._def;if(t.parsedType!==x.array)return E(t,{code:w.invalid_type,expected:x.array,received:t.parsedType}),A;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,n=t.data.length<i.exactLength.value;(e||n)&&(E(t,{code:e?w.too_big:w.too_small,minimum:n?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),s.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(E(t,{code:w.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),s.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(E(t,{code:w.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map(((e,s)=>i.type._parseAsync(new B(t,e,t.path,s))))).then((e=>C.mergeArray(s,e)));const n=[...t.data].map(((e,s)=>i.type._parseSync(new B(t,e,t.path,s))));return C.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new ue({...this._def,minLength:{value:e,message:U.toString(t)}})}max(e,t){return new ue({...this._def,maxLength:{value:e,message:U.toString(t)}})}length(e,t){return new ue({...this._def,exactLength:{value:e,message:U.toString(t)}})}nonempty(e){return this.min(1,e)}}function he(e){if(e instanceof me){const t={};for(const s in e.shape)t[s]=Ce.create(he(e.shape[s]));return new me({...e._def,shape:()=>t})}return e instanceof ue?new ue({...e._def,type:he(e.element)}):e instanceof Ce?Ce.create(he(e.unwrap())):e instanceof Ae?Ae.create(he(e.unwrap())):e instanceof Te?Te.create(e.items.map((e=>he(e)))):e}ue.create=(e,t)=>new ue({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...K(t)});class me extends O{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=b.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.object,received:t.parsedType}),A}const{status:t,ctx:s}=this._processInputParams(e),{shape:i,keys:n}=this._getCached(),a=[];if(!(this._def.catchall instanceof ce&&"strip"===this._def.unknownKeys))for(const e in s.data)n.includes(e)||a.push(e);const r=[];for(const e of n)r.push({key:{status:"valid",value:e},value:i[e]._parse(new B(s,s.data[e],s.path,e)),alwaysSet:e in s.data});if(this._def.catchall instanceof ce){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)r.push({key:{status:"valid",value:e},value:{status:"valid",value:s.data[e]}});else if("strict"===e)a.length>0&&(E(s,{code:w.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a)r.push({key:{status:"valid",value:t},value:e._parse(new B(s,s.data[t],s.path,t)),alwaysSet:t in s.data})}return s.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of r){const s=await t.key;e.push({key:s,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>C.mergeObjectSync(t,e))):C.mergeObjectSync(t,r)}get shape(){return this._def.shape()}strict(e){return new me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,s)=>{var i,n,a,r;const o=null!==(a=null===(n=(i=this._def).errorMap)||void 0===n?void 0:n.call(i,t,s).message)&&void 0!==a?a:s.defaultError;return"unrecognized_keys"===t.code?{message:null!==(r=U.errToObj(e).message)&&void 0!==r?r:o}:{message:o}}}:{}})}strip(){return new me({...this._def,unknownKeys:"strip"})}passthrough(){return new me({...this._def,unknownKeys:"passthrough"})}extend(e){return new me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new me({...this._def,catchall:e})}pick(e){const t={};return b.objectKeys(e).forEach((s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])})),new me({...this._def,shape:()=>t})}omit(e){const t={};return b.objectKeys(this.shape).forEach((s=>{e[s]||(t[s]=this.shape[s])})),new me({...this._def,shape:()=>t})}deepPartial(){return he(this)}partial(e){const t={};return b.objectKeys(this.shape).forEach((s=>{const i=this.shape[s];t[s]=e&&!e[s]?i:i.optional()})),new me({...this._def,shape:()=>t})}required(e){const t={};return b.objectKeys(this.shape).forEach((s=>{if(e&&!e[s])t[s]=this.shape[s];else{let e=this.shape[s];for(;e instanceof Ce;)e=e._def.innerType;t[s]=e}})),new me({...this._def,shape:()=>t})}keyof(){return Ie(b.objectKeys(this.shape))}}me.create=(e,t)=>new me({shape:()=>e,unknownKeys:"strip",catchall:ce.create(),typeName:Ke.ZodObject,...K(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:"strict",catchall:ce.create(),typeName:Ke.ZodObject,...K(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:"strip",catchall:ce.create(),typeName:Ke.ZodObject,...K(t)});class pe extends O{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;if(t.common.async)return Promise.all(s.map((async e=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const s of e)if("dirty"===s.result.status)return t.common.issues.push(...s.ctx.common.issues),s.result;const s=e.map((e=>new k(e.ctx.common.issues)));return E(t,{code:w.invalid_union,unionErrors:s}),A}));{let e;const i=[];for(const n of s){const s={...t,common:{...t.common,issues:[]},parent:null},a=n._parseSync({data:t.data,path:t.path,parent:s});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:s}),s.common.issues.length&&i.push(s.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=i.map((e=>new k(e)));return E(t,{code:w.invalid_union,unionErrors:n}),A}}get options(){return this._def.options}}pe.create=(e,t)=>new pe({options:e,typeName:Ke.ZodUnion,...K(t)});const ve=e=>e instanceof we?ve(e.schema):e instanceof Ee?ve(e.innerType()):e instanceof ke?[e.value]:e instanceof _e?e.options:e instanceof Ne?Object.keys(e.enum):e instanceof Ze?ve(e._def.innerType):e instanceof ae?[void 0]:e instanceof re?[null]:null;class fe extends O{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.object)return E(t,{code:w.invalid_type,expected:x.object,received:t.parsedType}),A;const s=this.discriminator,i=this.optionsMap.get(t.data[s]);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(E(t,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const i=new Map;for(const s of t){const t=ve(s.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(i.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,s)}}return new fe({typeName:Ke.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...K(s)})}}function ge(e,t){const s=G(e),i=G(t);if(e===t)return{valid:!0,data:e};if(s===x.object&&i===x.object){const s=b.objectKeys(t),i=b.objectKeys(e).filter((e=>-1!==s.indexOf(e))),n={...e,...t};for(const s of i){const i=ge(e[s],t[s]);if(!i.valid)return{valid:!1};n[s]=i.data}return{valid:!0,data:n}}if(s===x.array&&i===x.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const n=ge(e[i],t[i]);if(!n.valid)return{valid:!1};s.push(n.data)}return{valid:!0,data:s}}return s===x.date&&i===x.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ye extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),i=(e,i)=>{if(z(e)||z(i))return A;const n=ge(e.value,i.value);return n.valid?((j(e)||j(i))&&t.dirty(),{status:t.value,value:n.data}):(E(s,{code:w.invalid_intersection_types}),A)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ye.create=(e,t,s)=>new ye({left:e,right:t,typeName:Ke.ZodIntersection,...K(s)});class Te extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.array)return E(s,{code:w.invalid_type,expected:x.array,received:s.parsedType}),A;if(s.data.length<this._def.items.length)return E(s,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&s.data.length>this._def.items.length&&(E(s,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...s.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new B(s,e,s.path,t)):null})).filter((e=>!!e));return s.common.async?Promise.all(i).then((e=>C.mergeArray(t,e))):C.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Te({...this._def,rest:e})}}Te.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Te({items:e,typeName:Ke.ZodTuple,rest:null,...K(t)})};class be extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.object)return E(s,{code:w.invalid_type,expected:x.object,received:s.parsedType}),A;const i=[],n=this._def.keyType,a=this._def.valueType;for(const e in s.data)i.push({key:n._parse(new B(s,e,s.path,e)),value:a._parse(new B(s,s.data[e],s.path,e))});return s.common.async?C.mergeObjectAsync(t,i):C.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,s){return new be(t instanceof O?{keyType:e,valueType:t,typeName:Ke.ZodRecord,...K(s)}:{keyType:Q.create(),valueType:e,typeName:Ke.ZodRecord,...K(t)})}}class Me extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.map)return E(s,{code:w.invalid_type,expected:x.map,received:s.parsedType}),A;const i=this._def.keyType,n=this._def.valueType,a=[...s.data.entries()].map((([e,t],a)=>({key:i._parse(new B(s,e,s.path,[a,"key"])),value:n._parse(new B(s,t,s.path,[a,"value"]))})));if(s.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const s of a){const i=await s.key,n=await s.value;if("aborted"===i.status||"aborted"===n.status)return A;"dirty"!==i.status&&"dirty"!==n.status||t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const s of a){const i=s.key,n=s.value;if("aborted"===i.status||"aborted"===n.status)return A;"dirty"!==i.status&&"dirty"!==n.status||t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}}}Me.create=(e,t,s)=>new Me({valueType:t,keyType:e,typeName:Ke.ZodMap,...K(s)});class xe extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==x.set)return E(s,{code:w.invalid_type,expected:x.set,received:s.parsedType}),A;const i=this._def;null!==i.minSize&&s.data.size<i.minSize.value&&(E(s,{code:w.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&s.data.size>i.maxSize.value&&(E(s,{code:w.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const n=this._def.valueType;function a(e){const s=new Set;for(const i of e){if("aborted"===i.status)return A;"dirty"===i.status&&t.dirty(),s.add(i.value)}return{status:t.value,value:s}}const r=[...s.data.values()].map(((e,t)=>n._parse(new B(s,e,s.path,t))));return s.common.async?Promise.all(r).then((e=>a(e))):a(r)}min(e,t){return new xe({...this._def,minSize:{value:e,message:U.toString(t)}})}max(e,t){return new xe({...this._def,maxSize:{value:e,message:U.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}xe.create=(e,t)=>new xe({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...K(t)});class Ge extends O{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.function)return E(t,{code:w.invalid_type,expected:x.function,received:t.parsedType}),A;function s(e,s){return S({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,N(),I].filter((e=>!!e)),issueData:{code:w.invalid_arguments,argumentsError:s}})}function i(e,s){return S({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,N(),I].filter((e=>!!e)),issueData:{code:w.invalid_return_type,returnTypeError:s}})}const n={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Se){const e=this;return P((async function(...t){const r=new k([]),o=await e._def.args.parseAsync(t,n).catch((e=>{throw r.addIssue(s(t,e)),r})),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,n).catch((e=>{throw r.addIssue(i(l,e)),r}))}))}{const e=this;return P((function(...t){const r=e._def.args.safeParse(t,n);if(!r.success)throw new k([s(t,r.error)]);const o=Reflect.apply(a,this,r.data),l=e._def.returns.safeParse(o,n);if(!l.success)throw new k([i(o,l.error)]);return l.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ge({...this._def,args:Te.create(e).rest(le.create())})}returns(e){return new Ge({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new Ge({args:e||Te.create([]).rest(le.create()),returns:t||le.create(),typeName:Ke.ZodFunction,...K(s)})}}class we extends O{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}we.create=(e,t)=>new we({getter:e,typeName:Ke.ZodLazy,...K(t)});class ke extends O{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:w.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ie(e,t){return new _e({values:e,typeName:Ke.ZodEnum,...K(t)})}ke.create=(e,t)=>new ke({value:e,typeName:Ke.ZodLiteral,...K(t)});class _e extends O{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e);return E(t,{expected:b.joinValues(this._def.values),received:t.parsedType,code:w.invalid_type}),A}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:w.invalid_enum_value,options:this._def.values}),A}return P(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return _e.create(e)}exclude(e){return _e.create(this.options.filter((t=>!e.includes(t))))}}_e.create=Ie;class Ne extends O{_parse(e){const t=b.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==x.string&&s.parsedType!==x.number){const e=b.objectValues(t);return E(s,{expected:b.joinValues(e),received:s.parsedType,code:w.invalid_type}),A}if(-1===t.indexOf(e.data)){const e=b.objectValues(t);return E(s,{received:s.data,code:w.invalid_enum_value,options:e}),A}return P(e.data)}get enum(){return this._def.values}}Ne.create=(e,t)=>new Ne({values:e,typeName:Ke.ZodNativeEnum,...K(t)});class Se extends O{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.promise&&!1===t.common.async)return E(t,{code:w.invalid_type,expected:x.promise,received:t.parsedType}),A;const s=t.parsedType===x.promise?t.data:Promise.resolve(t.data);return P(s.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Se.create=(e,t)=>new Se({type:e,typeName:Ke.ZodPromise,...K(t)});class Ee extends O{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),i=this._def.effect||null,n={addIssue:e=>{E(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===i.type){const e=i.transform(s.data,n);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,n);if(s.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(!1===s.common.async){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===i.status?A:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((s=>"aborted"===s.status?A:("dirty"===s.status&&t.dirty(),e(s.value).then((()=>({status:t.value,value:s.value}))))))}if("transform"===i.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!D(e))return e;const a=i.transform(e.value,n);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>D(e)?Promise.resolve(i.transform(e.value,n)).then((e=>({status:t.value,value:e}))):e))}b.assertNever(i)}}Ee.create=(e,t,s)=>new Ee({schema:e,typeName:Ke.ZodEffects,effect:t,...K(s)}),Ee.createWithPreprocess=(e,t,s)=>new Ee({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...K(s)});class Ce extends O{_parse(e){return this._getType(e)===x.undefined?P(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ce.create=(e,t)=>new Ce({innerType:e,typeName:Ke.ZodOptional,...K(t)});class Ae extends O{_parse(e){return this._getType(e)===x.null?P(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:Ke.ZodNullable,...K(t)});class Ze extends O{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===x.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ze.create=(e,t)=>new Ze({innerType:e,typeName:Ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...K(t)});class Pe extends O{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return L(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new k(s.common.issues)},input:s.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new k(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:Ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...K(t)});class ze extends O{_parse(e){if(this._getType(e)!==x.nan){const t=this._getOrReturnCtx(e);return E(t,{code:w.invalid_type,expected:x.nan,received:t.parsedType}),A}return{status:"valid",value:e.data}}}ze.create=e=>new ze({typeName:Ke.ZodNaN,...K(e)});const je=Symbol("zod_brand");class De extends O{_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.type._parse({data:t.data,path:t.path,parent:t})}unwrap(){return this._def.type}}class Le extends O{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),Z(e.value)):this._def.out._parseAsync({data:e.value,path:s.path,parent:s})})();{const e=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:s.path,parent:s})}}static create(e,t){return new Le({in:e,out:t,typeName:Ke.ZodPipeline})}}class Ue extends O{_parse(e){const t=this._def.innerType._parse(e);return D(t)&&(t.value=Object.freeze(t.value)),t}}Ue.create=(e,t)=>new Ue({innerType:e,typeName:Ke.ZodReadonly,...K(t)});const Be=(e,t={},s)=>e?oe.create().superRefine(((i,n)=>{var a,r;if(!e(i)){const e="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,o=null===(r=null!==(a=e.fatal)&&void 0!==a?a:s)||void 0===r||r;n.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:o})}})):oe.create(),$e={object:me.lazycreate};var Ke;!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"}(Ke||(Ke={}));const Oe=Q.create,Re=ee.create,qe=se.create,Ve=Ee.create,Fe={string:e=>Q.create({...e,coerce:!0}),number:e=>ee.create({...e,coerce:!0}),boolean:e=>se.create({...e,coerce:!0}),bigint:e=>te.create({...e,coerce:!0}),date:e=>ie.create({...e,coerce:!0})};var He=Object.freeze({__proto__:null,defaultErrorMap:I,setErrorMap:function(e){_=e},getErrorMap:N,makeIssue:S,EMPTY_PATH:[],addIssueToContext:E,ParseStatus:C,INVALID:A,DIRTY:Z,OK:P,isAborted:z,isDirty:j,isValid:D,isAsync:L,get util(){return b},get objectUtil(){return M},ZodParsedType:x,getParsedType:G,ZodType:O,ZodString:Q,ZodNumber:ee,ZodBigInt:te,ZodBoolean:se,ZodDate:ie,ZodSymbol:ne,ZodUndefined:ae,ZodNull:re,ZodAny:oe,ZodUnknown:le,ZodNever:ce,ZodVoid:de,ZodArray:ue,ZodObject:me,ZodUnion:pe,ZodDiscriminatedUnion:fe,ZodIntersection:ye,ZodTuple:Te,ZodRecord:be,ZodMap:Me,ZodSet:xe,ZodFunction:Ge,ZodLazy:we,ZodLiteral:ke,ZodEnum:_e,ZodNativeEnum:Ne,ZodPromise:Se,ZodEffects:Ee,ZodTransformer:Ee,ZodOptional:Ce,ZodNullable:Ae,ZodDefault:Ze,ZodCatch:Pe,ZodNaN:ze,BRAND:je,ZodBranded:De,ZodPipeline:Le,ZodReadonly:Ue,custom:Be,Schema:O,ZodSchema:O,late:$e,get ZodFirstPartyTypeKind(){return Ke},coerce:Fe,any:oe.create,array:ue.create,bigint:te.create,boolean:qe,date:ie.create,discriminatedUnion:fe.create,effect:Ve,enum:_e.create,function:Ge.create,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Be((t=>t instanceof e),t),intersection:ye.create,lazy:we.create,literal:ke.create,map:Me.create,nan:ze.create,nativeEnum:Ne.create,never:ce.create,null:re.create,nullable:Ae.create,number:Re,object:me.create,oboolean:()=>qe().optional(),onumber:()=>Re().optional(),optional:Ce.create,ostring:()=>Oe().optional(),pipeline:Le.create,preprocess:Ee.createWithPreprocess,promise:Se.create,record:be.create,set:xe.create,strictObject:me.strictCreate,string:Oe,symbol:ne.create,transformer:Ve,tuple:Te.create,undefined:ae.create,union:pe.create,unknown:le.create,void:de.create,NEVER:A,ZodIssueCode:w,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:k});const We=[["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"]].map((e=>({value:e[2],label:e[2]}))),Je=He.object({business_name:He.string().trim().max(30).optional(),contact_email:He.string().trim().email("Invalid email").optional().or(He.literal("")),phone:He.preprocess((e=>p(String(e).trim())),He.string().optional()),timezone:He.string().trim().optional(),url:He.string().trim().optional()}),Ye=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.organizationUpdated=t(this,"organizationUpdated",7),this.endpoint=n.getDefault(),this.valid=!1,this.dirty=!1,this.submitting=!1,this.name="",this.business_name="",this.contact_email="",this.phone="",this.address="",this.address2="",this.timezone="",this.url=""}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){const e=await(t=this.endpoint,s=this.endpoint.session.organization_id,t.api.get("/organizations/".concat(s)).then((function(e){return e.data})));var t,s;console.log("[SETTINGS] Loaded organization",e),this.resetForm(e)}resetForm(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=!1,this.valid=!0}handleSubmit(e){var t,s,i;e.preventDefault(),e.stopPropagation(),(t=n.getDefault(),s=this.endpoint.session.organization_id,i={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},t.api.patch("/organizations/".concat(s),i).then((function(e){return e.data}))).then((e=>{var t;console.log("[SETTINGS] Update result",e),null===(t=this.organizationUpdated)||void 0===t||t.emit({endpoint:this.endpoint,organization:e}),this.resetForm(e)})).catch((e=>l(`Error updating organization: ${e.message}`,{style:"error"})))}processFields(){const e=Je.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=!0}render(){return this.endpoint.session?s(i,null,s("h1",null,"Organization Profile"),s("form",{onSubmit:e=>this.handleSubmit(e)},s("div",{class:"columns"},s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-organization-name",value:this.name,autocomplete:"off",label:"Name",required:!1,disabled:!1,placeholder:"Enter your organization's name...",onInput:e=>this.name=e.target.value,onFocusout:e=>{this.name=e.target.value.trim(),this.processFields()}}),s("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:e=>this.business_name=e.target.value,onFocusout:e=>{this.business_name=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-organization-url",value:this.url,autocomplete:"off",label:"Web URL",placeholder:"Enter your Web URL...",onInput:e=>this.url=e.target.value,onFocusout:e=>{this.url=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-organization-phone",value:this.phone,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:e=>this.phone=e.target.value,onFocusout:e=>{this.phone=e.target.value.trim(),this.processFields()}})),s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-organization-email",value:this.contact_email,clearable:!0,autocomplete:"off",label:"Contact Email",placeholder:"Enter your contact email address...",onInput:e=>this.contact_email=e.target.value,onFocusout:e=>{this.contact_email=e.target.value.trim(),this.processFields()}}),s("verdocs-select-input",{options:We,value:this.timezone,label:"Time Zone"}))),s("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty}))):(console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated"))}};Ye.style='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}}';const Qe=He.object({first_name:He.string().trim().min(1,"First name is required").max(30),last_name:He.string().trim().min(1,"Last name is required").max(30),email:He.string().trim().email("Invalid email").min(1,"Email is required"),phone:He.preprocess((e=>p(String(e).trim())),He.string())}),Xe=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.profileUpdated=t(this,"profileUpdated",7),this.endpoint=n.getDefault(),this.valid=!1,this.dirty=!1,this.submitting=!1,this.first_name="",this.last_name="",this.email="",this.phone=""}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[SETTINGS] Must be authenticated")}async componentDidLoad(){const e=await u(this.endpoint);console.log("[SETTINGS] Loaded profile",e),this.resetForm(e)}resetForm(e){this.first_name=e.first_name,this.last_name=e.last_name,this.email=e.email,this.phone=e.phone,this.dirty=!1,this.valid=!0}handleSubmit(e){e.preventDefault(),e.stopPropagation(),h(n.getDefault(),this.endpoint.session.profile_id,{first_name:this.first_name,last_name:this.last_name,phone:this.phone}).then((e=>{var t;console.log("[SETTINGS] Update result",e),null===(t=this.profileUpdated)||void 0===t||t.emit({endpoint:this.endpoint,profile:e}),this.resetForm(e)})).catch((e=>l(`Error updating profile: ${e.message}`,{style:"error"})))}processFields(){const e=Qe.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=!0}render(){return this.endpoint.session?s(i,null,s("h1",null,"My Profile"),s("form",{onSubmit:e=>this.handleSubmit(e)},s("div",{class:"columns"},s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-profile-first-name",value:this.first_name,autocomplete:"off",label:"First Name",required:!0,placeholder:"Enter your first name...",onInput:e=>this.first_name=e.target.value,onFocusout:e=>{this.first_name=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-profile-last-name",value:this.last_name,autocomplete:"off",label:"Last Name",required:!0,placeholder:"Enter your last name...",onInput:e=>this.last_name=e.target.value,onFocusout:e=>{this.last_name=e.target.value.trim(),this.processFields()}})),s("div",{class:"column"},s("verdocs-text-input",{id:"verdocs-profile-email",value:this.email,autocomplete:"off",label:"Email Address",required:!0,disabled:!0,placeholder:"Enter your email address...",onInput:e=>this.email=e.target.value,onFocusout:e=>{this.email=e.target.value.trim(),this.processFields()}}),s("verdocs-text-input",{id:"verdocs-profile-phone",value:this.phone,clearable:!0,autocomplete:"off",label:"Phone Number",placeholder:"Enter your phone number...",onInput:e=>this.phone=e.target.value,onFocusout:e=>{this.phone=e.target.value.trim(),this.processFields()}}))),s("verdocs-button",{type:"submit",label:"Save",size:"normal",disabled:this.submitting||!this.dirty}))):(console.log("[SETTINGS] Must be authenticated"),s(i,{class:"authentication-required"},"Must be authenticated"))}};Xe.style='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}}';export{f as verdocs_settings_api_keys,T as verdocs_settings_members,Ye as verdocs_settings_organization,Xe as verdocs_settings_profile}
|