twenty-sdk 2.31.0 → 2.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/billing/index.cjs +1 -1
  3. package/dist/billing/index.cjs.map +1 -1
  4. package/dist/billing/index.mjs +2 -2
  5. package/dist/billing/index.mjs.map +1 -1
  6. package/dist/{catalog-sync-Ch6nB5uf.mjs → catalog-sync-C0Td21sN.mjs} +1 -1
  7. package/dist/{catalog-sync-yH3B_al1.js → catalog-sync-Cn-gDxAz.js} +1 -1
  8. package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +4 -2
  9. package/dist/cli/utilities/build/manifest/utils/manifest-validation-helpers.d.ts +10 -0
  10. package/dist/cli/utilities/build/manifest/utils/validate-timeline-activity-types.d.ts +2 -0
  11. package/dist/cli/utilities/dev/orchestrator/dev-mode-orchestrator.d.ts +2 -0
  12. package/dist/cli/utilities/entity/entity-timeline-activity-type-template.d.ts +3 -0
  13. package/dist/cli/utilities/translations/collect-translatable-strings.d.ts +2 -1
  14. package/dist/cli/utilities/translations/compile-application-translations.d.ts +1 -1
  15. package/dist/cli/utilities/translations/compile-catalog-to-message-ids.d.ts +8 -0
  16. package/dist/cli/utilities/translations/locale-catalog-format.d.ts +7 -0
  17. package/dist/cli.cjs +48 -41
  18. package/dist/cli.mjs +3160 -3136
  19. package/dist/define/index.cjs +14 -14
  20. package/dist/define/index.cjs.map +1 -1
  21. package/dist/define/index.d.ts +65 -5
  22. package/dist/define/index.mjs +2769 -2734
  23. package/dist/define/index.mjs.map +1 -1
  24. package/dist/front-component/index.cjs +22 -3
  25. package/dist/front-component/index.cjs.map +1 -1
  26. package/dist/front-component/index.d.ts +53 -5
  27. package/dist/front-component/index.mjs +2026 -655
  28. package/dist/front-component/index.mjs.map +1 -1
  29. package/dist/front-component-renderer/build.cjs +1 -1
  30. package/dist/front-component-renderer/build.mjs +1 -1
  31. package/dist/{get-front-component-build-plugins-DA62IZes.mjs → get-front-component-build-plugins-BZ1HBS5Y.mjs} +70 -68
  32. package/dist/{get-front-component-build-plugins-C-Webbfn.js → get-front-component-build-plugins-CcV3Cown.js} +8 -8
  33. package/dist/{get-function-input-schema-GNk3NRLJ-C5HXalke.mjs → get-function-input-schema-GNk3NRLJ-BimwLfRN.mjs} +1 -1
  34. package/dist/{get-function-input-schema-GNk3NRLJ-DwfXUGPz.js → get-function-input-schema-GNk3NRLJ-Byssjp8I.js} +1 -1
  35. package/dist/logic-function/index.cjs +9 -9
  36. package/dist/logic-function/index.cjs.map +1 -1
  37. package/dist/logic-function/index.d.ts +67 -4
  38. package/dist/logic-function/index.mjs +595 -551
  39. package/dist/logic-function/index.mjs.map +1 -1
  40. package/dist/{login-BzHQgxeV.js → login-Cl-mw1L0.js} +68 -49
  41. package/dist/{login-BHgUJK94.mjs → login-CuJiHYwZ.mjs} +5963 -4476
  42. package/dist/operations.cjs +1 -1
  43. package/dist/operations.mjs +3 -3
  44. package/dist/utils/index.cjs +1 -1
  45. package/dist/utils/index.cjs.map +1 -1
  46. package/dist/utils/index.mjs +2 -2
  47. package/dist/utils/index.mjs.map +1 -1
  48. package/package.json +2 -2
  49. package/dist/cli/utilities/client/twenty-client-template.d.ts +0 -42
  50. package/dist/cli/utilities/translations/generate-message-id.d.ts +0 -1
@@ -1,6 +1,25 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("@sniptt/guards"),n=require("uuid");var r=`__twentySdkExecutionContext__`,i=`__twentySdkContextListeners__`,a=()=>(globalThis.__twentySdkContextListeners__||(globalThis[i]=new Set),globalThis[i]),o=()=>globalThis[r],s=e=>{a().add(e)},c=e=>{a().delete(e)},l=t=>{let[n,r]=(0,e.useState)(()=>t(o())),i=(0,e.useRef)(n);return(0,e.useEffect)(()=>{let e=()=>{let e=t(o());e!==i.current&&(i.current=e,r(e))};return s(e),e(),()=>c(e)},[t]),n},u=e=>e.locale??`en`,d=()=>l(u),f=(e,t)=>t!==void 0&&t.length>0?`${t}${e}`:e,p=(e,t)=>t===void 0?e:e.replace(/\{(\w+)\}/g,(e,n)=>Object.prototype.hasOwnProperty.call(t,n)?String(t[n]):e),ee=e=>typeof e==`string`?{message:e}:e,te=e=>e.replace(/\s+/g,` `).trim(),ne=()=>globalThis.__twentySdkFrontComponentTranslations__??{},m=(e,t,n)=>{let{message:r,context:i}=ee(e),a=ne()[n]?.[f(r,i)];return p(a??r,t)},re=(e,t)=>{if(e!==void 0)return e;if(typeof t==`string`)return te(t)},ie=({children:e,message:t,context:n,values:r})=>{let i=d(),a=re(t,e);return a===void 0?e:m({message:a,context:n},r,i)},h=e=>!(0,t.isUndefined)(e)&&!(0,t.isNull)(e);Object.freeze({status:`aborted`});function g(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var _=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ae=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},v={};function y(e){return e&&Object.assign(v,e),v}function oe(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function se(e,t){return typeof t==`bigint`?t.toString():t}function ce(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function le(e){return e==null}function ue(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var de=Symbol(`evaluating`);function b(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==de)return r===void 0&&(r=de,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function x(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function S(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function fe(e){return JSON.stringify(e)}var pe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function C(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var me=ce(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function w(e){if(C(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(C(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function he(e){return w(e)?{...e}:Array.isArray(e)?[...e]:e}var ge=new Set([`string`,`number`,`symbol`]);function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function E(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function _e(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function ve(e,t){let n=e._zod.def;return E(e,S(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return x(this,`shape`,e),e},checks:[]}))}function ye(e,t){let n=e._zod.def;return E(e,S(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return x(this,`shape`,r),r},checks:[]}))}function be(e,t){if(!w(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");return E(e,S(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return x(this,`shape`,n),n},checks:[]}))}function xe(e,t){if(!w(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return E(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return x(this,`shape`,n),n},checks:e._zod.def.checks})}function Se(e,t){return E(e,S(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return x(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Ce(e,t,n){return E(t,S(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return x(this,`shape`,i),i},checks:[]}))}function we(e,t,n){return E(t,S(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return x(this,`shape`,i),i},checks:[]}))}function O(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Te(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function k(e){return typeof e==`string`?e:e?.message}function A(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=k(e.inst?._zod.def?.error?.(e))??k(t?.error?.(e))??k(n.customError?.(e))??k(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ee(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function j(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var De=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,se,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Oe=g(`$ZodError`,De),ke=g(`$ZodError`,De,{Parent:Error});function Ae(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function je(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}var Me=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new _;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,y())));throw pe(t,i?.callee),t}return o.value},M=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,y())));throw pe(t,i?.callee),t}return o.value},N=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new _;return a.issues.length?{success:!1,error:new(e??Oe)(a.issues.map(e=>A(e,i,y())))}:{success:!0,data:a.value}},Ne=N(ke),P=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>A(e,i,y())))}:{success:!0,data:a.value}},Pe=P(ke),Fe=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Me(e)(t,n,i)},Ie=e=>(t,n,r)=>Me(e)(t,n,r),Le=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return M(e)(t,n,i)},Re=e=>async(t,n,r)=>M(e)(t,n,r),ze=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return N(e)(t,n,i)},Be=e=>(t,n,r)=>N(e)(t,n,r),Ve=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return P(e)(t,n,i)},He=e=>async(t,n,r)=>P(e)(t,n,r),Ue=/^[cC][^\s-]{8,}$/,We=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ke=/^[0-9a-vA-V]{20}$/,qe=/^[A-Za-z0-9]{27}$/,Je=/^[a-zA-Z0-9_-]{21}$/,Ye=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ze=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Qe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$e=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function et(){return new RegExp($e,`u`)}var tt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,rt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,it=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,at=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ot=/^[A-Za-z0-9_-]*$/,st=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ct=/^\+(?:[0-9]){6,14}[0-9]$/,lt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,ut=RegExp(`^${lt}$`);function dt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ft(e){return RegExp(`^${dt(e)}$`)}function pt(e){let t=dt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${lt}T(?:${r})$`)}var mt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ht=/^[^A-Z]*$/,gt=/^[^a-z]*$/,F=g(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),_t=g(`$ZodCheckMaxLength`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!le(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Ee(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vt=g(`$ZodCheckMinLength`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!le(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Ee(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yt=g(`$ZodCheckLengthEquals`,(e,t)=>{var n;F.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!le(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Ee(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),I=g(`$ZodCheckStringFormat`,(e,t)=>{var n,r;F.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),bt=g(`$ZodCheckRegex`,(e,t)=>{I.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),xt=g(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ht,I.init(e,t)}),St=g(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=gt,I.init(e,t)}),Ct=g(`$ZodCheckIncludes`,(e,t)=>{F.init(e,t);let n=T(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),wt=g(`$ZodCheckStartsWith`,(e,t)=>{F.init(e,t);let n=RegExp(`^${T(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Tt=g(`$ZodCheckEndsWith`,(e,t)=>{F.init(e,t);let n=RegExp(`.*${T(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Et=g(`$ZodCheckOverwrite`,(e,t)=>{F.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Dt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("@sniptt/guards"),n=require("uuid");var r=`__twentySdkExecutionContext__`,i=`__twentySdkContextListeners__`,a=()=>(globalThis.__twentySdkContextListeners__||(globalThis[i]=new Set),globalThis[i]),o=()=>globalThis[r],s=e=>{a().add(e)},c=e=>{a().delete(e)},l=t=>{let[n,r]=(0,e.useState)(()=>t(o())),i=(0,e.useRef)(n);return(0,e.useEffect)(()=>{let e=()=>{let e=t(o());e!==i.current&&(i.current=e,r(e))};return s(e),e(),()=>c(e)},[t]),n},u=e=>e.locale??`en`,d=()=>l(u),f=e=>typeof e==`string`?{message:e}:e,p=e=>e.replace(/\s+/g,` `).trim(),m=e=>!(0,t.isUndefined)(e)&&!(0,t.isNull)(e),h=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),g=h(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.moo=n()})(e,function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=typeof RegExp().sticky==`boolean`;function r(e){return e&&t.call(e)===`[object RegExp]`}function i(e){return e&&typeof e==`object`&&!r(e)&&!Array.isArray(e)}function a(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function o(e){return RegExp(`|`+e).exec(``).length-1}function s(e){return`(`+e+`)`}function c(e){return e.length?`(?:`+e.map(function(e){return`(?:`+e+`)`}).join(`|`)+`)`:`(?!)`}function l(e){if(typeof e==`string`)return`(?:`+a(e)+`)`;if(r(e)){if(e.ignoreCase)throw Error(`RegExp /i flag not allowed`);if(e.global)throw Error(`RegExp /g flag is implied`);if(e.sticky)throw Error(`RegExp /y flag is implied`);if(e.multiline)throw Error(`RegExp /m flag is implied`);return e.source}else throw Error(`Not a pattern: `+e)}function u(e,t){return e.length>t?e:Array(t-e.length+1).join(` `)+e}function d(e,t){for(var n=e.length,r=0;;){var i=e.lastIndexOf(`
2
+ `,n-1);if(i===-1||(r++,n=i,r===t)||n===0)break}var a=r<t?0:n+1;return e.substring(a).split(`
3
+ `)}function f(e){for(var t=Object.getOwnPropertyNames(e),n=[],r=0;r<t.length;r++){var a=t[r],o=e[a],s=[].concat(o);if(a===`include`){for(var c=0;c<s.length;c++)n.push({include:s[c]});continue}var l=[];s.forEach(function(e){i(e)?(l.length&&n.push(m(a,l)),n.push(m(a,e)),l=[]):l.push(e)}),l.length&&n.push(m(a,l))}return n}function p(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(r.include){for(var i=[].concat(r.include),a=0;a<i.length;a++)t.push({include:i[a]});continue}if(!r.type)throw Error(`Rule has no type: `+JSON.stringify(r));t.push(m(r.type,r))}return t}function m(t,n){if(i(n)||(n={match:n}),n.include)throw Error(`Matching rules cannot also include states`);var a={defaultType:t,lineBreaks:!!n.error||!!n.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var o in n)e.call(n,o)&&(a[o]=n[o]);if(typeof a.type==`string`&&t!==a.type)throw Error(`Type transform cannot be a string (type '`+a.type+`' for token '`+t+`')`);var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort(function(e,t){return r(e)&&r(t)?0:r(t)?-1:r(e)?1:t.length-e.length}),a}function h(e){return Array.isArray(e)?p(e):f(e)}var g=m(`error`,{lineBreaks:!0,shouldThrow:!0});function _(e,t){for(var i=null,a=Object.create(null),u=!0,d=null,f=[],p=[],m=0;m<e.length;m++)e[m].fallback&&(u=!1);for(var m=0;m<e.length;m++){var h=e[m];if(h.include)throw Error(`Inheritance is not allowed in stateless lexers`);if(h.error||h.fallback){if(i)throw!h.fallback==!i.fallback?Error(`Multiple `+(h.fallback?`fallback`:`error`)+` rules not allowed (for token '`+h.defaultType+`')`):Error(`fallback and error are mutually exclusive (for token '`+h.defaultType+`')`);i=h}var _=h.match.slice();if(u)for(;_.length&&typeof _[0]==`string`&&_[0].length===1;){var v=_.shift();a[v.charCodeAt(0)]=h}if(h.pop||h.push||h.next){if(!t)throw Error(`State-switching options are not allowed in stateless lexers (for token '`+h.defaultType+`')`);if(h.fallback)throw Error(`State-switching options are not allowed on fallback tokens (for token '`+h.defaultType+`')`)}if(_.length!==0){u=!1,f.push(h);for(var y=0;y<_.length;y++){var b=_[y];if(r(b)){if(d===null)d=b.unicode;else if(d!==b.unicode&&h.fallback===!1)throw Error(`If one rule is /u then all must be`)}}var x=c(_.map(l)),S=new RegExp(x);if(S.test(``))throw Error(`RegExp matches empty string: `+S);if(o(x)>0)throw Error(`RegExp has capture groups: `+S+`
4
+ Use (?: … ) instead`);if(!h.lineBreaks&&S.test(`
5
+ `))throw Error(`Rule should declare lineBreaks: `+S);p.push(s(x))}}var C=i&&i.fallback,ee=n&&!C?`ym`:`gm`,w=n||C?``:`|`;return d===!0&&(ee+=`u`),{regexp:new RegExp(c(p)+w,ee),groups:f,fast:a,error:i||g}}function v(e){return new S({start:_(h(e))},`start`)}function y(e,t,n){var r=e&&(e.push||e.next);if(r&&!n[r])throw Error(`Missing state '`+r+`' (in token '`+e.defaultType+`' of state '`+t+`')`);if(e&&e.pop&&+e.pop!=1)throw Error(`pop must be 1 (in token '`+e.defaultType+`' of state '`+t+`')`)}function b(e,t){var n=e.$all?h(e.$all):[];delete e.$all;var r=Object.getOwnPropertyNames(e);t||=r[0];for(var i=Object.create(null),a=0;a<r.length;a++){var o=r[a];i[o]=h(e[o]).concat(n)}for(var a=0;a<r.length;a++)for(var o=r[a],s=i[o],c=Object.create(null),l=0;l<s.length;l++){var u=s[l];if(u.include){var d=[l,1];if(u.include!==o&&!c[u.include]){c[u.include]=!0;var f=i[u.include];if(!f)throw Error(`Cannot include nonexistent state '`+u.include+`' (in state '`+o+`')`);for(var p=0;p<f.length;p++){var m=f[p];s.indexOf(m)===-1&&d.push(m)}}s.splice.apply(s,d),l--}}for(var g=Object.create(null),a=0;a<r.length;a++){var o=r[a];g[o]=_(i[o],!0)}for(var a=0;a<r.length;a++){for(var v=r[a],b=g[v],x=b.groups,l=0;l<x.length;l++)y(x[l],v,g);for(var C=Object.getOwnPropertyNames(b.fast),l=0;l<C.length;l++)y(b.fast[C[l]],v,g)}return new S(g,t)}function x(e){for(var t=typeof Map<`u`,n=t?new Map:Object.create(null),r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var a=r[i],o=e[a];(Array.isArray(o)?o:[o]).forEach(function(e){if(typeof e!=`string`)throw Error(`keyword must be string (in keyword '`+a+`')`);t?n.set(e,a):n[e]=a})}return function(e){return t?n.get(e):n[e]}}var S=function(e,t){this.startState=t,this.states=e,this.buffer=``,this.stack=[],this.reset()};S.prototype.reset=function(e,t){return this.buffer=e||``,this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedText=t?t.queuedText:``,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},S.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},S.prototype.setState=function(e){if(!(!e||this.state===e)){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},S.prototype.popState=function(){this.setState(this.stack.pop())},S.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var C=n?function(e,t){return e.exec(t)}:function(e,t){var n=e.exec(t);return n[0].length===0?null:n};S.prototype._getGroup=function(e){for(var t=this.groups.length,n=0;n<t;n++)if(e[n+1]!==void 0)return this.groups[n];throw Error(`Cannot find token type for matched text`)};function ee(){return this.value}if(S.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText=``,t}var n=this.buffer;if(e!==n.length){var r=this.fast[n.charCodeAt(e)];if(r)return this._token(r,n.charAt(e),e);var i=this.re;i.lastIndex=e;var a=C(i,n),o=this.error;if(a==null)return this._token(o,n.slice(e,n.length),e);var r=this._getGroup(a),s=a[0];return o.fallback&&a.index!==e?(this.queuedGroup=r,this.queuedText=s,this._token(o,n.slice(e,a.index),e)):this._token(r,s,e)}},S.prototype._token=function(e,t,n){var r=0;if(e.lineBreaks){var i=/\n/g,a=1;if(t===`
6
+ `)r=1;else for(;i.exec(t);)r++,a=i.lastIndex}var o={type:typeof e.type==`function`&&e.type(t)||e.defaultType,value:typeof e.value==`function`?e.value(t):t,text:t,toString:ee,offset:n,lineBreaks:r,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=r,r===0?this.col+=s:this.col=s-a+1,e.shouldThrow)throw Error(this.formatError(o,`invalid syntax`));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),o},typeof Symbol<`u`&&Symbol.iterator){var w=function(e){this.lexer=e};w.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},w.prototype[Symbol.iterator]=function(){return this},S.prototype[Symbol.iterator]=function(){return new w(this)}}return S.prototype.formatError=function(e,t){if(e==null)var n=this.buffer.slice(this.index),e={text:n,offset:this.index,lineBreaks:n.indexOf(`
7
+ `)===-1?0:1,line:this.line,col:this.col};var r=2,i=Math.max(e.line-r,1),a=e.line+r,o=String(a).length,s=d(this.buffer,this.line-e.line+r+1).slice(0,5),c=[];c.push(t+` at line `+e.line+` col `+e.col+`:`),c.push(``);for(var l=0;l<s.length;l++){var f=s[l],p=i+l;c.push(u(String(p),o)+` `+f),p===e.line&&c.push(u(``,o+e.col+1)+`^`)}return c.join(`
8
+ `)},S.prototype.clone=function(){return new S(this.states,this.state)},S.prototype.has=function(e){return!0},{compile:v,states:b,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:x}})})),_=h((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.lexer=e.states=void 0;var n=t(g());e.states={body:{doubleapos:{match:`''`,value:()=>`'`},quoted:{lineBreaks:!0,match:/'[{}#](?:[^']|'')*'(?!')/u,value:e=>e.slice(1,-1).replace(/''/g,`'`)},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:`arg`,value:e=>e.substring(1).trim()},octothorpe:`#`,end:{match:`}`,pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:`select`,value:e=>e.split(`,`)[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:`body`,value:e=>e.split(`,`)[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:e=>e.substring(1).trim()},end:{match:`}`,pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:e=>e.split(`:`)[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:`body`,value:e=>e.substring(0,e.indexOf(`{`)).trim()},end:{match:/\s*\}/u,pop:1}}},e.lexer=n.default.states(e.states)})),v=h((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ParseError=void 0,e.parse=l;var t=_(),n=e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),r=e=>e===`plural`||e===`select`||e===`selectordinal`;function i(e,t){let n=``,r=``;for(let i of t){let t=i.ctx.text;switch(r+=t,i.type){case`content`:n+=i.value;break;case`argument`:case`function`:case`octothorpe`:n+=t;break;default:throw new s(e,`Unsupported part in strict mode function arg style: ${t}`)}}return[{type:`content`,value:n.trim(),ctx:Object.assign({},t[0].ctx,{text:r})}]}var a=[`number`,`date`,`time`,`spellout`,`ordinal`,`duration`],o=[`zero`,`one`,`two`,`few`,`many`,`other`],s=class extends Error{constructor(e,n){super(t.lexer.formatError(e,n))}};e.ParseError=s;var c=class{constructor(e,n){this.lexer=t.lexer.reset(e),this.cardinalKeys=n?.cardinal??o,this.ordinalKeys=n?.ordinal??o,this.strict=n?.strict??!1,this.strictPluralKeys=n?.strictPluralKeys??!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(e,t,n){if(n[0]===`=`){if(t===`select`)throw new s(e,`The case ${n} is not valid with select`)}else if(t!==`select`){let r=t===`plural`?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&r.length>0&&!r.includes(n))throw new s(e,`The ${t} case ${n} is not valid in this locale`)}}parseSelect({value:e},t,r,i){let a={type:i,arg:e,cases:[],ctx:r};i===`plural`||i===`selectordinal`?t=!0:this.strict&&(t=!1);for(let e of this.lexer)switch(e.type){case`offset`:if(i===`select`)throw new s(e,`Unexpected plural offset for select`);if(a.cases.length>0)throw new s(e,`Plural offset must be set before cases`);a.pluralOffset=Number(e.value),r.text+=e.text,r.lineBreaks+=e.lineBreaks;break;case`case`:this.checkSelectKey(e,i,e.value),a.cases.push({key:e.value,tokens:this.parseBody(t),ctx:n(e)});break;case`end`:return a;default:throw new s(e,`Unexpected lexer token: ${e.type}`)}throw new s(null,`Unexpected message end`)}parseArgToken(e,t){let o=n(e),c=this.lexer.next();if(!c)throw new s(null,`Unexpected message end`);if(o.text+=c.text,o.lineBreaks+=c.lineBreaks,this.strict&&(c.type===`func-simple`||c.type===`func-args`)&&!a.includes(c.value))throw new s(e,`Invalid strict mode function arg type: ${c.value}`);switch(c.type){case`end`:return{type:`argument`,arg:e.value,ctx:o};case`func-simple`:{let t=this.lexer.next();if(!t)throw new s(null,`Unexpected message end`);if(t.type!==`end`)throw new s(t,`Unexpected lexer token: ${t.type}`);if(o.text+=t.text,r(c.value.toLowerCase()))throw new s(c,`Invalid type identifier: ${c.value}`);return{type:`function`,arg:e.value,key:c.value,ctx:o}}case`func-args`:{if(r(c.value.toLowerCase()))throw new s(c,`Invalid type identifier: ${c.value}`);let n=this.parseBody(this.strict?!1:t);return this.strict&&n.length>0&&(n=i(e,n)),{type:`function`,arg:e.value,key:c.value,param:n,ctx:o}}case`select`:if(r(c.value))return this.parseSelect(e,t,o,c.value);throw new s(c,`Unexpected select type ${c.value}`);default:throw new s(c,`Unexpected lexer token: ${c.type}`)}}parseBody(e,t){let r=[],i=null;for(let a of this.lexer)if(a.type===`argument`)i&&=null,r.push(this.parseArgToken(a,e));else if(a.type===`octothorpe`&&e)i&&=null,r.push({type:`octothorpe`,ctx:n(a)});else if(a.type===`end`&&!t)return r;else{let t=a.value;if(!e&&a.type===`quoted`&&t[0]===`#`){if(t.includes(`{`))throw new s(a,`Unsupported escape pattern: ${t}`);t=a.text}i?(i.value+=t,i.ctx.text+=a.text,i.ctx.lineBreaks+=a.lineBreaks):(i={type:`content`,value:t,ctx:n(a)},r.push(i))}if(t)return r;throw new s(null,`Unexpected message end`)}};function l(e,t={}){return new c(e,t).parse()}}))(),y=class extends Error{constructor(e,t,n){super(e),this.token=t,this.type=n||`error`}},b=e=>e<4?`short`:e===4?`long`:`narrow`,x=e=>e%2==0?`2-digit`:`numeric`;function S(e,t){switch(e.char){case`y`:return{year:x(e.width)};case`r`:return{calendar:`gregory`,year:`numeric`};default:return t(`${e.desc} is not supported; falling back to year:numeric`,y.WARNING),{year:`numeric`}}}function C(e,t){switch(e.width){case 1:return`numeric`;case 2:return`2-digit`;case 3:return`short`;case 4:return`long`;case 5:return`narrow`;default:t(`${e.desc} is not supported with width ${e.width}`);return}}function ee(e,t){let{char:n,desc:r,width:i}=e;if(n===`d`)return x(i);t(`${r} is not supported`)}function w(e,t){let{char:n,desc:r,width:i}=e;return(n===`c`||n===`e`)&&i<3&&t(`Numeric value is not supported for ${r}; falling back to weekday:short`,y.WARNING),b(i)}function te(e){let t=x(e.width),n;switch(e.char){case`h`:n=`h12`;break;case`H`:n=`h23`;break;case`k`:n=`h24`;break;case`K`:n=`h11`;break}return n?{hour:t,hourCycle:n}:{hour:t}}function ne(e,t){let{char:n,desc:r,width:i}=e;switch(n){case`v`:case`z`:return i===4?`long`:`short`;case`V`:if(i===4)return`long`;t(`${r} is not supported with width ${i}`);return;case`X`:t(`${r} is not supported`);return}return`short`}function re(e,t){switch(e.field){case`era`:return{era:b(e.width)};case`year`:return S(e,t);case`month`:return{month:C(e,t)};case`day`:return{day:ee(e,t)};case`weekday`:return{weekday:w(e,t)};case`period`:return;case`hour`:return te(e);case`min`:return{minute:x(e.width)};case`sec`:return{second:x(e.width)};case`tz`:return{timeZoneName:ne(e,t)};case`quarter`:case`week`:case`sec-frac`:case`ms`:t(`${e.desc} is not supported`)}}function ie(e,t,n=e=>{throw e}){let r={timeZone:t},i=[];for(let t of e){let{error:e,field:a,str:o}=t;if(e){let r=new y(e.message,t);r.stack=e.stack,n(r)}o&&n(new y(`Ignoring string part: ${o}`,t,y.WARNING)),a&&(i.indexOf(a)===-1?i.push(a):n(new y(`Duplicate ${a} token`,t)));let s=re(t,(e,r)=>n(new y(e,t,r)));s&&Object.assign(r,s)}return r}var ae={G:{field:`era`,desc:`Era`},y:{field:`year`,desc:`Year`},Y:{field:`year`,desc:`Year of "Week of Year"`},u:{field:`year`,desc:`Extended year`},U:{field:`year`,desc:`Cyclic year name`},r:{field:`year`,desc:`Related Gregorian year`},Q:{field:`quarter`,desc:`Quarter`},q:{field:`quarter`,desc:`Stand-alone quarter`},M:{field:`month`,desc:`Month in year`},L:{field:`month`,desc:`Stand-alone month in year`},w:{field:`week`,desc:`Week of year`},W:{field:`week`,desc:`Week of month`},d:{field:`day`,desc:`Day in month`},D:{field:`day`,desc:`Day of year`},F:{field:`day`,desc:`Day of week in month`},g:{field:`day`,desc:`Modified julian day`},E:{field:`weekday`,desc:`Day of week`},e:{field:`weekday`,desc:`Local day of week`},c:{field:`weekday`,desc:`Stand-alone local day of week`},a:{field:`period`,desc:`AM/PM marker`},b:{field:`period`,desc:`AM/PM/noon/midnight marker`},B:{field:`period`,desc:`Flexible day period`},h:{field:`hour`,desc:`Hour in AM/PM (1~12)`},H:{field:`hour`,desc:`Hour in day (0~23)`},k:{field:`hour`,desc:`Hour in day (1~24)`},K:{field:`hour`,desc:`Hour in AM/PM (0~11)`},j:{field:`hour`,desc:`Hour in preferred cycle`},J:{field:`hour`,desc:`Hour in preferred cycle without marker`},C:{field:`hour`,desc:`Hour in preferred cycle with flexible marker`},m:{field:`min`,desc:`Minute in hour`},s:{field:`sec`,desc:`Second in minute`},S:{field:`sec-frac`,desc:`Fractional second`},A:{field:`ms`,desc:`Milliseconds in day`},z:{field:`tz`,desc:`Time Zone: specific non-location`},Z:{field:`tz`,desc:`Time Zone`},O:{field:`tz`,desc:`Time Zone: localized`},v:{field:`tz`,desc:`Time Zone: generic non-location`},V:{field:`tz`,desc:`Time Zone: ID`},X:{field:`tz`,desc:`Time Zone: ISO8601 with Z`},x:{field:`tz`,desc:`Time Zone: ISO8601`}},oe=e=>e>=`A`&&e<=`Z`||e>=`a`&&e<=`z`;function se(e,t){let n=e[t],r=1;for(;e[++t]===n;)++r;let i=ae[n];if(!i){let e=`The letter ${n} is not a valid field identifier`;return{char:n,error:Error(e),width:r}}return{char:n,field:i.field,desc:i.desc,width:r}}function ce(e,t){let n=e[++t],r=2;if(n===`'`)return{char:`'`,str:n,width:r};for(;;){let i=e[++t];if(++r,i===void 0){let t=`Unterminated quoted literal in pattern: ${n||e}`;return{char:`'`,error:Error(t),str:n,width:r}}else if(i===`'`){if(e[++t]!==`'`)return{char:`'`,str:n,width:r};++r}n+=i}}function le(e,t){let n=e[t];if(!n)return null;if(oe(n))return se(e,t);if(n===`'`)return ce(e,t);let r=n,i=1;for(;;){let a=e[++t];if(!a||oe(a)||a===`'`)return{char:n,str:r,width:i};r+=a,i+=1}}function ue(e){let t=[],n=0;for(;;){let r=le(e,n);if(!r)return t;t.push(r),n+=r.width}}function de(e,t){return e.filter(e=>e.type!==`content`).length?e.map(e=>{if(e.type===`content`)return t(e.value);if(e.type===`octothorpe`)return`#`;if(e.type===`argument`)return[e.arg];if(e.type===`function`){let t=e?.param?.[0];if(e.key===`date`&&t){let n=fe(t.value.trim(),e=>{throw Error(`Unable to compile date expression: ${e.message}`)});return[e.arg,e.key,n]}return t?[e.arg,e.key,t.value.trim()]:[e.arg,e.key]}let n=e.pluralOffset,r={};return e.cases.forEach(({key:e,tokens:n})=>{let i=e[0]===`=`?e.slice(1):e;r[i]=de(n,t)}),[e.arg,e.type,{offset:n,...r}]}):e.map(e=>t(e.value))}function fe(e,t){return/^::/.test(e)?ie(ue(e.substring(2)),void 0,t):e}function pe(e,t=e=>e){return de((0,v.parse)(e),t)}function me(e,t=e=>e){try{return pe(e,t)}catch(t){return console.error(`${t.message}
9
+
10
+ Message: ${e}`),[e]}}var T=e=>typeof e==`string`,he=e=>typeof e==`function`,ge=new Map,_e=`en`;function ve(e){return[...Array.isArray(e)?e:[e],_e]}function ye(e,t,n){let r=ve(e);n||=`default`;let i;if(typeof n==`string`)switch(i={day:`numeric`,month:`short`,year:`numeric`},n){case`full`:i.weekday=`long`;case`long`:i.month=`long`;break;case`short`:i.month=`numeric`;break}else i=n;return Ce(()=>we(`date`,r,n),()=>new Intl.DateTimeFormat(r,i)).format(T(t)?new Date(t):t)}function be(e,t,n){let r;if(n||=`default`,typeof n==`string`)switch(r={second:`numeric`,minute:`numeric`,hour:`numeric`},n){case`full`:case`long`:r.timeZoneName=`short`;break;case`short`:delete r.second}else r=n;return ye(e,t,r)}function xe(e,t,n){let r=ve(e);return Ce(()=>we(`number`,r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function Se(e,t,n,{offset:r=0,...i}){let a=ve(e),o=t?Ce(()=>we(`plural-ordinal`,a),()=>new Intl.PluralRules(a,{type:`ordinal`})):Ce(()=>we(`plural-cardinal`,a),()=>new Intl.PluralRules(a,{type:`cardinal`}));return i[n]??i[o.select(n-r)]??i.other}function Ce(e,t){let n=e(),r=ge.get(n);return r||(r=t(),ge.set(n,r)),r}function we(e,t,n){return`${e}-${t.join(`-`)}-${JSON.stringify(n)}`}var Te=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Ee=e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(e,t,n)=>{if(t){let e=parseInt(t,16);return String.fromCharCode(e)}else{let e=parseInt(n,16);return String.fromCharCode(e)}}),De=`%__lingui_octothorpe__%`,Oe=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e],a=(e,t)=>{let a=xe(r,e,Object.keys(n).length?i(`number`):void 0);return t.replace(new RegExp(De,`g`),a)};return{plural:(e,t)=>{let{offset:n=0}=t,i=Se(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=Se(r,!0,e,t);return a(e-n,i)},select:ke,number:(e,t)=>xe(r,e,i(t)||{style:t}),date:(e,t)=>ye(r,e,i(t)||t),time:(e,t)=>be(r,e,i(t)||t)}},ke=(e,t)=>t[e]??t.other;function Ae(e,t,n){return(r={},i)=>{let a=Oe(t,n,i),o=(e,t=!1)=>Array.isArray(e)?e.reduce((e,n)=>{if(n===`#`&&t)return e+De;if(T(n))return e+n;let[i,s,c]=n,l={};s===`plural`||s===`selectordinal`||s===`select`?Object.entries(c).forEach(([e,t])=>{l[e]=o(t,s===`plural`||s===`selectordinal`)}):l=c;let u;if(s){let e=a[s];u=e(r[i],l)}else u=r[i];return u==null?e:e+u},``):e,s=o(e);return T(s)&&Te.test(s)?Ee(s):T(s)?s:s?String(s):``}}var je=Object.defineProperty,Me=(e,t,n)=>t in e?je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ne=(e,t,n)=>(Me(e,typeof t==`symbol`?t:t+``,n),n),Pe=class{constructor(){Ne(this,`_events`,{})}on(e,t){var n;return(n=this._events)[e]??(n[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._getListeners(e);if(!n)return;let r=n.indexOf(t);~r&&n.splice(r,1)}emit(e,...t){let n=this._getListeners(e);n&&n.map(e=>e.apply(this,t))}_getListeners(e){let t=this._events[e];return Array.isArray(t)?t:!1}},Fe=Object.defineProperty,Ie=(e,t,n)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t,n)=>(Ie(e,typeof t==`symbol`?t:t+``,n),n),Le=class extends Pe{constructor(e){super(),E(this,`_locale`,``),E(this,`_locales`),E(this,`_localeData`,{}),E(this,`_messages`,{}),E(this,`_missing`),E(this,`_messageCompiler`),E(this,`t`,this._.bind(this)),process.env.NODE_ENV!==`production`&&this.setMessagesCompiler(me),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale==`string`||e.locales)&&this.activate(e.locale??_e,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){let n=this._localeData[e];n?Object.assign(n,t):this._localeData[e]=t}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,t){typeof e==`string`?this._loadLocaleData(e,t):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit(`change`)}_load(e,t){let n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){typeof e==`string`&&typeof t==`object`?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit(`change`)}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit(`change`)}activate(e,t){process.env.NODE_ENV!==`production`&&(this._messages[e]||console.warn(`Messages for locale "${e}" not loaded.`)),this._locale=e,this._locales=t,this.emit(`change`)}_(e,t,n){if(!this.locale)throw Error(`Lingui: Attempted to call a translation function without setting a locale.
11
+ Make sure to call \`i18n.activate(locale)\` before using Lingui functions.
12
+ This issue may also occur due to a race condition in your initialization logic.`);let r=n?.message;e||=``,T(e)||(t=e.values||t,r=e.message,e=e.id);let i=this.messages[e],a=i===void 0,o=this._missing;if(o&&a)return he(o)?o(this._locale,e):o;a&&this.emit(`missing`,{id:e,locale:this._locale});let s=i||r||e;return T(s)&&(this._messageCompiler?s=this._messageCompiler(s):console.warn(`Uncompiled message detected! Message:
13
+
14
+ > ${s}
15
+
16
+ That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
17
+ ICU features such as interpolation and plurals will not work properly for that message.
18
+
19
+ Please compile your catalog first.
20
+ `)),T(s)&&Te.test(s)?Ee(s):T(s)?s:Ae(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return ye(this._locales||this._locale,e,t)}number(e,t){return xe(this._locales||this._locale,e,t)}};function Re(e={}){return new Le(e)}Re();function ze(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function Be(e,...t){if(!ze(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function Ve(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function He(e,t){Be(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function Ue(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function We(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function D(e,t){return e<<32-t|e>>>t}function Ge(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function Ke(e){return typeof e==`string`&&(e=Ge(e)),Be(e),e}var qe=class{};function Je(e){let t=t=>e().update(Ke(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Ye(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function Xe(e,t,n){return e&t^~e&n}function Ze(e,t,n){return e&t^e&n^t&n}var Qe=class extends qe{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=We(this.buffer)}update(e){Ve(this),e=Ke(e),Be(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=We(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ve(this),He(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,Ue(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;Ye(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=We(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},O=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$e=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),k=new Uint32Array(64),et=class extends Qe{constructor(e=32){super(64,e,8,!1),this.A=O[0]|0,this.B=O[1]|0,this.C=O[2]|0,this.D=O[3]|0,this.E=O[4]|0,this.F=O[5]|0,this.G=O[6]|0,this.H=O[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)k[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=k[e-15],n=k[e-2],r=D(t,7)^D(t,18)^t>>>3;k[e]=(D(n,17)^D(n,19)^n>>>10)+k[e-7]+r+k[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=D(o,6)^D(o,11)^D(o,25),u=l+t+Xe(o,s,c)+$e[e]+k[e]|0,d=(D(n,2)^D(n,13)^D(n,22))+Ze(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){Ue(k)}destroy(){this.set(0,0,0,0,0,0,0,0),Ue(this.buffer)}},tt=Je(()=>new et),nt=``,rt=5e4,it=new Map,at=e=>typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(String.fromCharCode(...e)),ot=(e,t=``)=>{let n=e+nt+(t||``),r=it.get(n);if(m(r))return r;let i=at(tt(Ge(n))).slice(0,6);return it.size>=rt&&it.clear(),it.set(n,i),i},st=/\{(\w+)\}/g,ct=(e,t)=>m(t)?e.replace(st,(e,n)=>{let r=t[n];return m(r)?String(r):e}):e,lt=[`objectLabel`,`objectLabelSingular`,`objectLabelPlural`,`objectIcon`],ut=e=>`{${e}}`;Object.fromEntries(lt.map(e=>[e,ut(e)]));var dt=()=>globalThis.__twentySdkFrontComponentTranslations__??{},ft=(e,t,n)=>{let{message:r,context:i}=f(e),a=dt()[n]?.[ot(r,i)];return ct(a??r,t)},pt=(e,t)=>{if(e!==void 0)return e;if(typeof t==`string`)return p(t)},mt=({children:e,message:t,context:n,values:r})=>{let i=d(),a=pt(t,e);return a===void 0?e:ft({message:a,context:n},r,i)};Object.freeze({status:`aborted`});function A(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var j=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ht=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},gt={};function M(e){return e&&Object.assign(gt,e),gt}function _t(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function vt(e,t){return typeof t==`bigint`?t.toString():t}function yt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function bt(e){return e==null}function xt(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var St=Symbol(`evaluating`);function N(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==St)return r===void 0&&(r=St,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function P(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function F(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Ct(e){return JSON.stringify(e)}var wt=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Tt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Et=yt(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function I(e){if(Tt(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(Tt(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Dt(e){return I(e)?{...e}:Array.isArray(e)?[...e]:e}var Ot=new Set([`string`,`number`,`symbol`]);function L(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function R(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function z(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function kt(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function At(e,t){let n=e._zod.def;return R(e,F(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return P(this,`shape`,e),e},checks:[]}))}function jt(e,t){let n=e._zod.def;return R(e,F(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return P(this,`shape`,r),r},checks:[]}))}function Mt(e,t){if(!I(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");return R(e,F(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return P(this,`shape`,n),n},checks:[]}))}function Nt(e,t){if(!I(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return R(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return P(this,`shape`,n),n},checks:e._zod.def.checks})}function Pt(e,t){return R(e,F(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return P(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Ft(e,t,n){return R(t,F(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return P(this,`shape`,i),i},checks:[]}))}function It(e,t,n){return R(t,F(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return P(this,`shape`,i),i},checks:[]}))}function B(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Lt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Rt(e){return typeof e==`string`?e:e?.message}function V(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Rt(e.inst?._zod.def?.error?.(e))??Rt(t?.error?.(e))??Rt(n.customError?.(e))??Rt(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function zt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function H(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Bt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,vt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Vt=A(`$ZodError`,Bt),Ht=A(`$ZodError`,Bt,{Parent:Error});function Ut(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Wt(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}var Gt=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new j;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>V(e,a,M())));throw wt(t,i?.callee),t}return o.value},Kt=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>V(e,a,M())));throw wt(t,i?.callee),t}return o.value},qt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new j;return a.issues.length?{success:!1,error:new(e??Vt)(a.issues.map(e=>V(e,i,M())))}:{success:!0,data:a.value}},Jt=qt(Ht),Yt=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>V(e,i,M())))}:{success:!0,data:a.value}},Xt=Yt(Ht),Zt=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Gt(e)(t,n,i)},Qt=e=>(t,n,r)=>Gt(e)(t,n,r),$t=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Kt(e)(t,n,i)},en=e=>async(t,n,r)=>Kt(e)(t,n,r),tn=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return qt(e)(t,n,i)},nn=e=>(t,n,r)=>qt(e)(t,n,r),rn=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Yt(e)(t,n,i)},an=e=>async(t,n,r)=>Yt(e)(t,n,r),on=/^[cC][^\s-]{8,}$/,sn=/^[0-9a-z]+$/,cn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ln=/^[0-9a-vA-V]{20}$/,un=/^[A-Za-z0-9]{27}$/,dn=/^[a-zA-Z0-9_-]{21}$/,fn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,pn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,mn=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,hn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,gn=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function _n(){return new RegExp(gn,`u`)}var vn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,bn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,xn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Sn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Cn=/^[A-Za-z0-9_-]*$/,wn=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Tn=/^\+(?:[0-9]){6,14}[0-9]$/,En=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Dn=RegExp(`^${En}$`);function On(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function kn(e){return RegExp(`^${On(e)}$`)}function An(e){let t=On({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${En}T(?:${r})$`)}var jn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Mn=/^[^A-Z]*$/,Nn=/^[^a-z]*$/,U=A(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Pn=A(`$ZodCheckMaxLength`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=zt(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Fn=A(`$ZodCheckMinLength`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=zt(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),In=A(`$ZodCheckLengthEquals`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=zt(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ln=A(`$ZodCheckStringFormat`,(e,t)=>{var n,r;U.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Rn=A(`$ZodCheckRegex`,(e,t)=>{Ln.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),zn=A(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Mn,Ln.init(e,t)}),Bn=A(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Nn,Ln.init(e,t)}),Vn=A(`$ZodCheckIncludes`,(e,t)=>{U.init(e,t);let n=L(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Hn=A(`$ZodCheckStartsWith`,(e,t)=>{U.init(e,t);let n=RegExp(`^${L(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Un=A(`$ZodCheckEndsWith`,(e,t)=>{U.init(e,t);let n=RegExp(`.*${L(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Wn=A(`$ZodCheckOverwrite`,(e,t)=>{U.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Gn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2
21
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
3
- `))}},Ot={major:4,minor:1,patch:11},L=g(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ot;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=O(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new _;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=O(e,t))});else{if(e.issues.length===t)continue;r||=O(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(O(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new _;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new _;return o.then(e=>t(e,r,a))}return t(o,r,a)}}e[`~standard`]={validate:t=>{try{let n=Ne(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Pe(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),R=g(`$ZodString`,(e,t)=>{L.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??mt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),z=g(`$ZodStringFormat`,(e,t)=>{I.init(e,t),R.init(e,t)}),kt=g(`$ZodGUID`,(e,t)=>{t.pattern??=Xe,z.init(e,t)}),At=g(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ze(e)}else t.pattern??=Ze();z.init(e,t)}),jt=g(`$ZodEmail`,(e,t)=>{t.pattern??=Qe,z.init(e,t)}),Mt=g(`$ZodURL`,(e,t)=>{z.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:st.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Nt=g(`$ZodEmoji`,(e,t)=>{t.pattern??=et(),z.init(e,t)}),Pt=g(`$ZodNanoID`,(e,t)=>{t.pattern??=Je,z.init(e,t)}),Ft=g(`$ZodCUID`,(e,t)=>{t.pattern??=Ue,z.init(e,t)}),It=g(`$ZodCUID2`,(e,t)=>{t.pattern??=We,z.init(e,t)}),Lt=g(`$ZodULID`,(e,t)=>{t.pattern??=Ge,z.init(e,t)}),Rt=g(`$ZodXID`,(e,t)=>{t.pattern??=Ke,z.init(e,t)}),zt=g(`$ZodKSUID`,(e,t)=>{t.pattern??=qe,z.init(e,t)}),Bt=g(`$ZodISODateTime`,(e,t)=>{t.pattern??=pt(t),z.init(e,t)}),Vt=g(`$ZodISODate`,(e,t)=>{t.pattern??=ut,z.init(e,t)}),Ht=g(`$ZodISOTime`,(e,t)=>{t.pattern??=ft(t),z.init(e,t)}),Ut=g(`$ZodISODuration`,(e,t)=>{t.pattern??=Ye,z.init(e,t)}),Wt=g(`$ZodIPv4`,(e,t)=>{t.pattern??=tt,z.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),Gt=g(`$ZodIPv6`,(e,t)=>{t.pattern??=nt,z.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Kt=g(`$ZodCIDRv4`,(e,t)=>{t.pattern??=rt,z.init(e,t)}),qt=g(`$ZodCIDRv6`,(e,t)=>{t.pattern??=it,z.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Jt(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Yt=g(`$ZodBase64`,(e,t)=>{t.pattern??=at,z.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{Jt(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Xt(e){if(!ot.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Jt(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Zt=g(`$ZodBase64URL`,(e,t)=>{t.pattern??=ot,z.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{Xt(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Qt=g(`$ZodE164`,(e,t)=>{t.pattern??=ct,z.init(e,t)});function $t(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var en=g(`$ZodJWT`,(e,t)=>{z.init(e,t),e._zod.check=n=>{$t(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),tn=g(`$ZodUnknown`,(e,t)=>{L.init(e,t),e._zod.parse=e=>e}),nn=g(`$ZodNever`,(e,t)=>{L.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function rn(e,t,n){e.issues.length&&t.issues.push(...Te(n,e.issues)),t.value[n]=e.value}var an=g(`$ZodArray`,(e,t)=>{L.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>rn(t,n,e))):rn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function B(e,t,n,r){e.issues.length&&t.issues.push(...Te(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function on(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=_e(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function sn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type;for(let i of Object.keys(t)){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>B(e,n,i,t))):B(a,n,i,t)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var cn=g(`$ZodObject`,(e,t)=>{if(L.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=ce(()=>on(t));b(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=C,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e]._zod.run({value:s[e],issues:[]},o);n instanceof Promise?c.push(n.then(n=>B(n,t,e,s))):B(n,t,e,s)}return i?sn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),ln=g(`$ZodObjectJIT`,(e,t)=>{cn.init(e,t);let n=e._zod.parse,r=ce(()=>on(t)),i=e=>{let t=new Dt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=fe(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let e of n.keys){let n=a[e],r=fe(e);t.write(`const ${n} = ${i(e)};`),t.write(`
22
+ `))}},Kn={major:4,minor:1,patch:11},W=A(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Kn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=B(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new j;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=B(e,t))});else{if(e.issues.length===t)continue;r||=B(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(B(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new j;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new j;return o.then(e=>t(e,r,a))}return t(o,r,a)}}e[`~standard`]={validate:t=>{try{let n=Jt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Xt(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),qn=A(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??jn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),G=A(`$ZodStringFormat`,(e,t)=>{Ln.init(e,t),qn.init(e,t)}),Jn=A(`$ZodGUID`,(e,t)=>{t.pattern??=pn,G.init(e,t)}),Yn=A(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=mn(e)}else t.pattern??=mn();G.init(e,t)}),Xn=A(`$ZodEmail`,(e,t)=>{t.pattern??=hn,G.init(e,t)}),Zn=A(`$ZodURL`,(e,t)=>{G.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:wn.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Qn=A(`$ZodEmoji`,(e,t)=>{t.pattern??=_n(),G.init(e,t)}),$n=A(`$ZodNanoID`,(e,t)=>{t.pattern??=dn,G.init(e,t)}),er=A(`$ZodCUID`,(e,t)=>{t.pattern??=on,G.init(e,t)}),tr=A(`$ZodCUID2`,(e,t)=>{t.pattern??=sn,G.init(e,t)}),nr=A(`$ZodULID`,(e,t)=>{t.pattern??=cn,G.init(e,t)}),rr=A(`$ZodXID`,(e,t)=>{t.pattern??=ln,G.init(e,t)}),ir=A(`$ZodKSUID`,(e,t)=>{t.pattern??=un,G.init(e,t)}),ar=A(`$ZodISODateTime`,(e,t)=>{t.pattern??=An(t),G.init(e,t)}),or=A(`$ZodISODate`,(e,t)=>{t.pattern??=Dn,G.init(e,t)}),sr=A(`$ZodISOTime`,(e,t)=>{t.pattern??=kn(t),G.init(e,t)}),cr=A(`$ZodISODuration`,(e,t)=>{t.pattern??=fn,G.init(e,t)}),lr=A(`$ZodIPv4`,(e,t)=>{t.pattern??=vn,G.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),ur=A(`$ZodIPv6`,(e,t)=>{t.pattern??=yn,G.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),dr=A(`$ZodCIDRv4`,(e,t)=>{t.pattern??=bn,G.init(e,t)}),fr=A(`$ZodCIDRv6`,(e,t)=>{t.pattern??=xn,G.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function pr(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var mr=A(`$ZodBase64`,(e,t)=>{t.pattern??=Sn,G.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{pr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function hr(e){if(!Cn.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return pr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var gr=A(`$ZodBase64URL`,(e,t)=>{t.pattern??=Cn,G.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{hr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),_r=A(`$ZodE164`,(e,t)=>{t.pattern??=Tn,G.init(e,t)});function vr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var yr=A(`$ZodJWT`,(e,t)=>{G.init(e,t),e._zod.check=n=>{vr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),br=A(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),xr=A(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Sr(e,t,n){e.issues.length&&t.issues.push(...Lt(n,e.issues)),t.value[n]=e.value}var Cr=A(`$ZodArray`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Sr(t,n,e))):Sr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function wr(e,t,n,r){e.issues.length&&t.issues.push(...Lt(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Tr(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=kt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Er(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type;for(let i of Object.keys(t)){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>wr(e,n,i,t))):wr(a,n,i,t)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Dr=A(`$ZodObject`,(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=yt(()=>Tr(t));N(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Tt,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e]._zod.run({value:s[e],issues:[]},o);n instanceof Promise?c.push(n.then(n=>wr(n,t,e,s))):wr(n,t,e,s)}return i?Er(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Or=A(`$ZodObjectJIT`,(e,t)=>{Dr.init(e,t);let n=e._zod.parse,r=yt(()=>Tr(t)),i=e=>{let t=new Gn([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Ct(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let e of n.keys){let n=a[e],r=Ct(e);t.write(`const ${n} = ${i(e)};`),t.write(`
4
23
  if (${n}.issues.length) {
5
24
  payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
6
25
  ...iss,
@@ -17,5 +36,5 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require
17
36
  newResult[${r}] = ${n}.value;
18
37
  }
19
38
 
20
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=C,s=!v.jitless,c=s&&me.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?sn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function un(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!O(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>A(e,r,y())))}),t)}var dn=g(`$ZodUnion`,(e,t)=>{L.init(e,t),b(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),b(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),b(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),b(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ue(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>un(t,i,e,a)):un(s,i,e,a)}}),fn=g(`$ZodIntersection`,(e,t)=>{L.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>mn(e,t,n)):mn(e,i,a)}});function pn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(w(e)&&w(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=pn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=pn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function mn(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),O(e))return e;let r=pn(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var hn=g(`$ZodEnum`,(e,t)=>{L.init(e,t);let n=oe(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ge.has(typeof e)).map(e=>typeof e==`string`?T(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),gn=g(`$ZodTransform`,(e,t)=>{L.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ae(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new _;return n.value=i,n}});function _n(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var vn=g(`$ZodOptional`,(e,t)=>{L.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,b(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),b(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ue(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>_n(t,e.value)):_n(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),yn=g(`$ZodNullable`,(e,t)=>{L.init(e,t),b(e._zod,`optin`,()=>t.innerType._zod.optin),b(e._zod,`optout`,()=>t.innerType._zod.optout),b(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ue(e.source)}|null)$`):void 0}),b(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),bn=g(`$ZodDefault`,(e,t)=>{L.init(e,t),e._zod.optin=`optional`,b(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>xn(e,t)):xn(r,t)}});function xn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Sn=g(`$ZodPrefault`,(e,t)=>{L.init(e,t),e._zod.optin=`optional`,b(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Cn=g(`$ZodNonOptional`,(e,t)=>{L.init(e,t),b(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>wn(t,e)):wn(i,e)}});function wn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Tn=g(`$ZodCatch`,(e,t)=>{L.init(e,t),b(e._zod,`optin`,()=>t.innerType._zod.optin),b(e._zod,`optout`,()=>t.innerType._zod.optout),b(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>A(e,n,y()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>A(e,n,y()))},input:e.value}),e.issues=[]),e)}}),En=g(`$ZodPipe`,(e,t)=>{L.init(e,t),b(e._zod,`values`,()=>t.in._zod.values),b(e._zod,`optin`,()=>t.in._zod.optin),b(e._zod,`optout`,()=>t.out._zod.optout),b(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>V(e,t.in,n)):V(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>V(e,t.out,n)):V(r,t.out,n)}});function V(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Dn=g(`$ZodReadonly`,(e,t)=>{L.init(e,t),b(e._zod,`propValues`,()=>t.innerType._zod.propValues),b(e._zod,`values`,()=>t.innerType._zod.values),b(e._zod,`optin`,()=>t.innerType._zod.optin),b(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(On):On(r)}});function On(e){return e.value=Object.freeze(e.value),e}var kn=g(`$ZodCustom`,(e,t)=>{F.init(e,t),L.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>An(t,n,r,e));An(i,n,r,e)}});function An(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(j(e))}}var jn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Mn(){return new jn}var H=Mn();function Nn(e,t){return new e({type:`string`,...D(t)})}function Pn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...D(t)})}function Fn(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...D(t)})}function In(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...D(t)})}function Ln(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...D(t)})}function Rn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...D(t)})}function zn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...D(t)})}function Bn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...D(t)})}function Vn(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...D(t)})}function Hn(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...D(t)})}function Un(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...D(t)})}function Wn(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...D(t)})}function Gn(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...D(t)})}function Kn(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...D(t)})}function qn(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...D(t)})}function Jn(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...D(t)})}function Yn(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...D(t)})}function Xn(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...D(t)})}function Zn(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...D(t)})}function Qn(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...D(t)})}function $n(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...D(t)})}function er(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...D(t)})}function tr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...D(t)})}function nr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...D(t)})}function rr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...D(t)})}function ir(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...D(t)})}function ar(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...D(t)})}function or(e){return new e({type:`unknown`})}function sr(e,t){return new e({type:`never`,...D(t)})}function cr(e,t){return new _t({check:`max_length`,...D(t),maximum:e})}function U(e,t){return new vt({check:`min_length`,...D(t),minimum:e})}function lr(e,t){return new yt({check:`length_equals`,...D(t),length:e})}function ur(e,t){return new bt({check:`string_format`,format:`regex`,...D(t),pattern:e})}function dr(e){return new xt({check:`string_format`,format:`lowercase`,...D(e)})}function fr(e){return new St({check:`string_format`,format:`uppercase`,...D(e)})}function pr(e,t){return new Ct({check:`string_format`,format:`includes`,...D(t),includes:e})}function mr(e,t){return new wt({check:`string_format`,format:`starts_with`,...D(t),prefix:e})}function hr(e,t){return new Tt({check:`string_format`,format:`ends_with`,...D(t),suffix:e})}function W(e){return new Et({check:`overwrite`,tx:e})}function gr(e){return W(t=>t.normalize(e))}function _r(){return W(e=>e.trim())}function vr(){return W(e=>e.toLowerCase())}function yr(){return W(e=>e.toUpperCase())}function br(e,t,n){return new e({type:`array`,element:t,...D(n)})}function xr(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...D(n)})}function Sr(e){let t=Cr(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(j(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(j(r))}},e(n.value,n)));return t}function Cr(e,t){let n=new F({check:`custom`,...D(t)});return n._zod.check=e,n}var wr=g(`ZodISODateTime`,(e,t)=>{Bt.init(e,t),q.init(e,t)});function Tr(e){return nr(wr,e)}var Er=g(`ZodISODate`,(e,t)=>{Vt.init(e,t),q.init(e,t)});function Dr(e){return rr(Er,e)}var Or=g(`ZodISOTime`,(e,t)=>{Ht.init(e,t),q.init(e,t)});function kr(e){return ir(Or,e)}var Ar=g(`ZodISODuration`,(e,t)=>{Ut.init(e,t),q.init(e,t)});function jr(e){return ar(Ar,e)}var Mr=(e,t)=>{Oe.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>je(e,t)},flatten:{value:t=>Ae(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,se,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,se,2)}},isEmpty:{get(){return e.issues.length===0}}})};g(`ZodError`,Mr);var G=g(`ZodError`,Mr,{Parent:Error}),Nr=Me(G),Pr=M(G),Fr=N(G),Ir=P(G),Lr=Fe(G),Rr=Ie(G),zr=Le(G),Br=Re(G),Vr=ze(G),Hr=Be(G),Ur=Ve(G),Wr=He(G),K=g(`ZodType`,(e,t)=>(L.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(S(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>E(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Nr(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Fr(e,t,n),e.parseAsync=async(t,n)=>Pr(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Ir(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Lr(e,t,n),e.decode=(t,n)=>Rr(e,t,n),e.encodeAsync=async(t,n)=>zr(e,t,n),e.decodeAsync=async(t,n)=>Br(e,t,n),e.safeEncode=(t,n)=>Vr(e,t,n),e.safeDecode=(t,n)=>Hr(e,t,n),e.safeEncodeAsync=async(t,n)=>Ur(e,t,n),e.safeDecodeAsync=async(t,n)=>Wr(e,t,n),e.refine=(t,n)=>e.check(Gi(t,n)),e.superRefine=t=>e.check(Ki(t)),e.overwrite=t=>e.check(W(t)),e.optional=()=>ki(e),e.nullable=()=>ji(e),e.nullish=()=>ki(ji(e)),e.nonoptional=t=>Li(e,t),e.array=()=>_i(e),e.or=t=>xi([e,t]),e.and=t=>Ci(e,t),e.transform=t=>Vi(e,Di(t)),e.default=t=>Ni(e,t),e.prefault=t=>Fi(e,t),e.catch=t=>zi(e,t),e.pipe=t=>Vi(e,t),e.readonly=()=>Ui(e),e.describe=t=>{let n=e.clone();return H.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return H.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return H.get(e);let n=e.clone();return H.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Gr=g(`_ZodString`,(e,t)=>{R.init(e,t),K.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ur(...t)),e.includes=(...t)=>e.check(pr(...t)),e.startsWith=(...t)=>e.check(mr(...t)),e.endsWith=(...t)=>e.check(hr(...t)),e.min=(...t)=>e.check(U(...t)),e.max=(...t)=>e.check(cr(...t)),e.length=(...t)=>e.check(lr(...t)),e.nonempty=(...t)=>e.check(U(1,...t)),e.lowercase=t=>e.check(dr(t)),e.uppercase=t=>e.check(fr(t)),e.trim=()=>e.check(_r()),e.normalize=(...t)=>e.check(gr(...t)),e.toLowerCase=()=>e.check(vr()),e.toUpperCase=()=>e.check(yr())}),Kr=g(`ZodString`,(e,t)=>{R.init(e,t),Gr.init(e,t),e.email=t=>e.check(Pn(Jr,t)),e.url=t=>e.check(Bn(Xr,t)),e.jwt=t=>e.check(tr(di,t)),e.emoji=t=>e.check(Vn(Zr,t)),e.guid=t=>e.check(Fn(Yr,t)),e.uuid=t=>e.check(In(J,t)),e.uuidv4=t=>e.check(Ln(J,t)),e.uuidv6=t=>e.check(Rn(J,t)),e.uuidv7=t=>e.check(zn(J,t)),e.nanoid=t=>e.check(Hn(Qr,t)),e.guid=t=>e.check(Fn(Yr,t)),e.cuid=t=>e.check(Un($r,t)),e.cuid2=t=>e.check(Wn(ei,t)),e.ulid=t=>e.check(Gn(ti,t)),e.base64=t=>e.check(Qn(ci,t)),e.base64url=t=>e.check($n(li,t)),e.xid=t=>e.check(Kn(ni,t)),e.ksuid=t=>e.check(qn(ri,t)),e.ipv4=t=>e.check(Jn(ii,t)),e.ipv6=t=>e.check(Yn(ai,t)),e.cidrv4=t=>e.check(Xn(oi,t)),e.cidrv6=t=>e.check(Zn(si,t)),e.e164=t=>e.check(er(ui,t)),e.datetime=t=>e.check(Tr(t)),e.date=t=>e.check(Dr(t)),e.time=t=>e.check(kr(t)),e.duration=t=>e.check(jr(t))});function qr(e){return Nn(Kr,e)}var q=g(`ZodStringFormat`,(e,t)=>{z.init(e,t),Gr.init(e,t)}),Jr=g(`ZodEmail`,(e,t)=>{jt.init(e,t),q.init(e,t)}),Yr=g(`ZodGUID`,(e,t)=>{kt.init(e,t),q.init(e,t)}),J=g(`ZodUUID`,(e,t)=>{At.init(e,t),q.init(e,t)}),Xr=g(`ZodURL`,(e,t)=>{Mt.init(e,t),q.init(e,t)}),Zr=g(`ZodEmoji`,(e,t)=>{Nt.init(e,t),q.init(e,t)}),Qr=g(`ZodNanoID`,(e,t)=>{Pt.init(e,t),q.init(e,t)}),$r=g(`ZodCUID`,(e,t)=>{Ft.init(e,t),q.init(e,t)}),ei=g(`ZodCUID2`,(e,t)=>{It.init(e,t),q.init(e,t)}),ti=g(`ZodULID`,(e,t)=>{Lt.init(e,t),q.init(e,t)}),ni=g(`ZodXID`,(e,t)=>{Rt.init(e,t),q.init(e,t)}),ri=g(`ZodKSUID`,(e,t)=>{zt.init(e,t),q.init(e,t)}),ii=g(`ZodIPv4`,(e,t)=>{Wt.init(e,t),q.init(e,t)}),ai=g(`ZodIPv6`,(e,t)=>{Gt.init(e,t),q.init(e,t)}),oi=g(`ZodCIDRv4`,(e,t)=>{Kt.init(e,t),q.init(e,t)}),si=g(`ZodCIDRv6`,(e,t)=>{qt.init(e,t),q.init(e,t)}),ci=g(`ZodBase64`,(e,t)=>{Yt.init(e,t),q.init(e,t)}),li=g(`ZodBase64URL`,(e,t)=>{Zt.init(e,t),q.init(e,t)}),ui=g(`ZodE164`,(e,t)=>{Qt.init(e,t),q.init(e,t)}),di=g(`ZodJWT`,(e,t)=>{en.init(e,t),q.init(e,t)}),fi=g(`ZodUnknown`,(e,t)=>{tn.init(e,t),K.init(e,t)});function pi(){return or(fi)}var mi=g(`ZodNever`,(e,t)=>{nn.init(e,t),K.init(e,t)});function hi(e){return sr(mi,e)}var gi=g(`ZodArray`,(e,t)=>{an.init(e,t),K.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(U(t,n)),e.nonempty=t=>e.check(U(1,t)),e.max=(t,n)=>e.check(cr(t,n)),e.length=(t,n)=>e.check(lr(t,n)),e.unwrap=()=>e.element});function _i(e,t){return br(gi,e,t)}var vi=g(`ZodObject`,(e,t)=>{ln.init(e,t),K.init(e,t),b(e,`shape`,()=>t.shape),e.keyof=()=>Ti(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pi()}),e.loose=()=>e.clone({...e._zod.def,catchall:pi()}),e.strict=()=>e.clone({...e._zod.def,catchall:hi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>be(e,t),e.safeExtend=t=>xe(e,t),e.merge=t=>Se(e,t),e.pick=t=>ve(e,t),e.omit=t=>ye(e,t),e.partial=(...t)=>Ce(Oi,e,t[0]),e.required=(...t)=>we(Ii,e,t[0])});function yi(e,t){return new vi({type:`object`,shape:e??{},...D(t)})}var bi=g(`ZodUnion`,(e,t)=>{dn.init(e,t),K.init(e,t),e.options=t.options});function xi(e,t){return new bi({type:`union`,options:e,...D(t)})}var Si=g(`ZodIntersection`,(e,t)=>{fn.init(e,t),K.init(e,t)});function Ci(e,t){return new Si({type:`intersection`,left:e,right:t})}var wi=g(`ZodEnum`,(e,t)=>{hn.init(e,t),K.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new wi({...t,checks:[],...D(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new wi({...t,checks:[],...D(r),entries:i})}});function Ti(e,t){return new wi({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...D(t)})}var Ei=g(`ZodTransform`,(e,t)=>{gn.init(e,t),K.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ae(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(j(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(j(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Di(e){return new Ei({type:`transform`,transform:e})}var Oi=g(`ZodOptional`,(e,t)=>{vn.init(e,t),K.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ki(e){return new Oi({type:`optional`,innerType:e})}var Ai=g(`ZodNullable`,(e,t)=>{yn.init(e,t),K.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ji(e){return new Ai({type:`nullable`,innerType:e})}var Mi=g(`ZodDefault`,(e,t)=>{bn.init(e,t),K.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ni(e,t){return new Mi({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():he(t)}})}var Pi=g(`ZodPrefault`,(e,t)=>{Sn.init(e,t),K.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Fi(e,t){return new Pi({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():he(t)}})}var Ii=g(`ZodNonOptional`,(e,t)=>{Cn.init(e,t),K.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Li(e,t){return new Ii({type:`nonoptional`,innerType:e,...D(t)})}var Ri=g(`ZodCatch`,(e,t)=>{Tn.init(e,t),K.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zi(e,t){return new Ri({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Bi=g(`ZodPipe`,(e,t)=>{En.init(e,t),K.init(e,t),e.in=t.in,e.out=t.out});function Vi(e,t){return new Bi({type:`pipe`,in:e,out:t})}var Hi=g(`ZodReadonly`,(e,t)=>{Dn.init(e,t),K.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ui(e){return new Hi({type:`readonly`,innerType:e})}var Wi=g(`ZodCustom`,(e,t)=>{kn.init(e,t),K.init(e,t)});function Gi(e,t={}){return xr(Wi,e,t)}function Ki(e){return Sr(e)}var qi=function(){function e(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=e?.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)}return e}(),Ji=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach(function(n){e.properties[n].forEach(function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new qi(a))})}),t},e}(),Yi=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},Xi=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Zi=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};(function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;new Ji().transform(e).forEach(function(e){return t.addValidationMetadata(e)})},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach(function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)}),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,o,s=function(e){return e.always===void 0?e.groups&&e.groups.length?!1:n:e.always},c=function(e){return!!(r&&(!i||!i.length)&&e.groups&&e.groups.length)},l=(this.validationMetadatas.get(e)||[]).filter(function(n){return n.target!==e&&n.target!==t?!1:s(n)?!0:c(n)?!1:i&&i.length>0?n.groups&&!!n.groups.find(function(e){return i.indexOf(e)!==-1}):!0}),u=[];try{for(var d=Yi(this.validationMetadatas.entries()),f=d.next();!f.done;f=d.next()){var p=Xi(f.value,2),ee=p[0],te=p[1];e.prototype instanceof ee&&u.push.apply(u,Zi([],Xi(te),!1))}}catch(e){a={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}var ne=u.filter(function(t){return typeof t.target==`string`||t.target===e||t.target instanceof Function&&!(e.prototype instanceof t.target)?!1:s(t)?!0:c(t)?!1:i&&i.length>0?t.groups&&!!t.groups.find(function(e){return i.indexOf(e)!==-1}):!0}).filter(function(e){return!l.find(function(t){return t.propertyName===e.propertyName&&t.type===e.type})});return l.concat(ne)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e})(),function(){function e(){}return e.isValid=function(e){var t=this;return e!==`isValid`&&e!==`getMessage`&&Object.keys(this).map(function(e){return t[e]}).indexOf(e)!==-1},e.CUSTOM_VALIDATION=`customValidation`,e.NESTED_VALIDATION=`nestedValidation`,e.PROMISE_VALIDATION=`promiseValidation`,e.CONDITIONAL_VALIDATION=`conditionalValidation`,e.WHITELIST=`whitelistValidation`,e.IS_DEFINED=`isDefined`,e}();var Qi=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}()),$i,Y;function ea(e){if($i)try{var t=$i.get(e);if(t||!Y||!Y.fallback)return t}catch(e){if(!Y||!Y.fallbackOnErrors)throw e}return Qi.get(e)}(function(){function e(e,t,n){n===void 0&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return ea(this.target)},enumerable:!1,configurable:!0}),e})();var X=function(e){return e.ACTOR=`ACTOR`,e.ADDRESS=`ADDRESS`,e.ARRAY=`ARRAY`,e.BOOLEAN=`BOOLEAN`,e.CURRENCY=`CURRENCY`,e.DATE=`DATE`,e.DATE_TIME=`DATE_TIME`,e.EMAILS=`EMAILS`,e.FILES=`FILES`,e.FULL_NAME=`FULL_NAME`,e.LINKS=`LINKS`,e.MORPH_RELATION=`MORPH_RELATION`,e.MULTI_SELECT=`MULTI_SELECT`,e.NUMBER=`NUMBER`,e.NUMERIC=`NUMERIC`,e.PHONES=`PHONES`,e.POSITION=`POSITION`,e.RATING=`RATING`,e.RAW_JSON=`RAW_JSON`,e.RELATION=`RELATION`,e.RICH_TEXT=`RICH_TEXT`,e.SELECT=`SELECT`,e.TEXT=`TEXT`,e.TS_VECTOR=`TS_VECTOR`,e.UUID=`UUID`,e}({}),ta=function(e){return e.Verify=`/verify`,e.VerifyEmail=`/verify-email`,e.SignInUp=`/welcome`,e.Invite=`/invite/:workspaceInviteHash`,e.ResetPassword=`/reset-password/:passwordResetToken`,e.WorkspaceActivation=`/workspace-activation`,e.CreateProfile=`/create/profile`,e.SyncEmails=`/sync/emails`,e.InstallApps=`/install-apps`,e.InviteTeam=`/invite-team`,e.PlanRequired=`/plan-required`,e.PlanRequiredSuccess=`/plan-required/payment-success`,e.BookCall=`/book-call`,e.AiChat=`/chat/:threadId?`,e.Index=`/`,e.TasksPage=`/objects/tasks`,e.OpportunitiesPage=`/objects/opportunities`,e.RecordIndexPage=`/objects/:objectNamePlural`,e.RecordShowPage=`/object/:objectNameSingular/:objectRecordId`,e.PageLayoutPage=`/page/:pageLayoutId`,e.Settings=`settings`,e.SettingsCatchAll=`/settings/*`,e.Developers=`developers`,e.DevelopersCatchAll=`/developers/*`,e.Authorize=`/authorize`,e.Dpa=`/dpa`,e.NotFoundWildcard=`*`,e.NotFound=`/not-found`,e}({}),na=function(e){return e.EMAIL=`EMAIL`,e.CALENDAR=`CALENDAR`,e.WORKFLOW=`WORKFLOW`,e.AGENT=`AGENT`,e.API=`API`,e.IMPORT=`IMPORT`,e.MANUAL=`MANUAL`,e.SYSTEM=`SYSTEM`,e.WEBHOOK=`WEBHOOK`,e.APPLICATION=`APPLICATION`,e}({}),ra={type:X.ACTOR,properties:[{name:`source`,type:X.SELECT,hidden:!1,isRequired:!0,options:Object.keys(na).map((e,t)=>({id:(0,n.v4)(),label:`${na[e].toLowerCase()}`,value:e,position:t}))},{name:`workspaceMemberId`,type:X.UUID,hidden:`input`,isRequired:!1},{name:`name`,type:X.TEXT,hidden:`input`,isRequired:!0},{name:`context`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},ia={type:X.ADDRESS,properties:[{name:`addressStreet1`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressStreet2`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressCity`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressPostcode`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressState`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressCountry`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressLat`,type:X.NUMERIC,hidden:!1,isRequired:!1},{name:`addressLng`,type:X.NUMERIC,hidden:!1,isRequired:!1}]},aa={type:X.CURRENCY,properties:[{name:`amountMicros`,type:X.NUMERIC,hidden:!1,isRequired:!1},{name:`currencyCode`,type:X.TEXT,hidden:!1,isRequired:!1}]},oa={type:X.EMAILS,properties:[{name:`primaryEmail`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalEmails`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},sa={type:X.FULL_NAME,properties:[{name:`firstName`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1},{name:`lastName`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1}]},ca={type:X.LINKS,properties:[{name:`primaryLinkLabel`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`primaryLinkUrl`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`secondaryLinks`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},la={type:X.PHONES,properties:[{name:`primaryPhoneNumber`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCountryCode`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCallingCode`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalPhones`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},ua={type:X.RICH_TEXT,properties:[{name:`blocknote`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`markdown`,type:X.TEXT,hidden:!1,isRequired:!1}]};yi({blocknote:qr().nullable().optional(),markdown:qr().nullable()}),new Map([[X.LINKS,ca],[X.CURRENCY,aa],[X.FULL_NAME,sa],[X.ADDRESS,ia],[X.ACTOR,ra],[X.EMAILS,oa],[X.PHONES,la],[X.RICH_TEXT,ua]]),X.RELATION,X.MORPH_RELATION,X.FILES,X.TS_VECTOR;var da=function(e){return e.CommandMenuDisplay=`command-menu-display`,e.ViewRecord=`view-record`,e.ViewRecords=`view-records`,e.MergeRecords=`merge-records`,e.UpdateRecords=`update-records`,e.EditRichText=`edit-rich-text`,e.Copilot=`copilot`,e.WorkflowTriggerSelectType=`workflow-trigger-select-type`,e.WorkflowStepCreate=`workflow-step-create`,e.WorkflowStepEditType=`workflow-step-edit-type`,e.WorkflowStepView=`workflow-step-view`,e.WorkflowStepEdit=`workflow-step-edit`,e.WorkflowRunStepView=`workflow-run-step-view`,e.SearchRecords=`search-records`,e.AskAI=`ask-ai`,e.PageLayoutDashboardWidgetTypeSelect=`page-layout-dashboard-widget-type-select`,e.PageLayoutTabSettings=`page-layout-tab-settings`,e.DashboardChartSettings=`dashboard-chart-settings`,e.DashboardIframeSettings=`dashboard-iframe-settings`,e.DashboardRecordTableSettings=`dashboard-record-table-settings`,e.RecordPageFieldsSettings=`record-page-fields-settings`,e.RecordPageFieldSettings=`record-page-field-settings`,e.ViewFrontComponent=`view-front-component`,e.NavigationMenuItemEdit=`navigation-menu-item-edit`,e.NavigationMenuAddItem=`navigation-menu-add-item`,e.CommandMenuEdit=`command-menu-edit`,e.PageLayoutRecordPageWidgetTypeSelect=`page-layout-record-page-widget-type-select`,e.ComposeEmail=`compose-email`,e.SendCampaignTest=`send-campaign-test`,e.EmailBlockSettings=`email-block-settings`,e}({}),fa=`frontComponentHostCommunicationApi`;globalThis[fa]??={};var Z=globalThis.frontComponentHostCommunicationApi,pa=()=>{let e=Z.closeSidePanel;if(!h(e))throw Error(`closeSidePanelFunction is not set`);return e()},ma=e=>{let t=Z.copyToClipboard;if(!h(t))throw Error(`copyToClipboardFunction is not set`);return t(e)},ha=e=>{let t=process.env.applicationVariables;if(t)return JSON.parse(t)[e]},ga=e=>{let t=Z.enqueueSnackbar;if(!h(t))throw Error(`enqueueSnackbarFunction is not set`);return t(e)},_a=(e,t,n,r)=>{let i=Z.navigate;if(!h(i))throw Error(`navigateFunction is not set`);return i(e,t,n,r)},va=e=>{let t=Z.openCommandConfirmationModal;if(!h(t))throw Error(`openCommandConfirmationModalFunction is not set`);return t(e)},ya=e=>{let t=Z.openSidePanelPage;if(!h(t))throw Error(`openSidePanelPageFunction is not set`);return t(e)},Q=()=>{let e=Z.unmountFrontComponent;if(!h(e))throw Error(`unmountFrontComponentFunction is not set`);return e()},ba=e=>{let t=Z.updateProgress;if(!h(t))throw Error(`updateProgressFunction is not set`);return t(e)},xa=e=>e.colorScheme,Sa=()=>l(xa),Ca=e=>e.frontComponentId,$=()=>l(Ca),wa=()=>{let t=d();return{locale:t,t:(0,e.useCallback)((e,n)=>m(e,n,t),[t])}},Ta=e=>e.selectedRecordIds.length===1?e.selectedRecordIds[0]:null,Ea=()=>l(Ta),Da=e=>e.selectedRecordIds,Oa=()=>l(Da),ka=e=>e.userId,Aa=()=>l(ka),ja=e=>ee(e),Ma=()=>o()?.locale??`en`,Na=(e,t)=>m(e,t,Ma()),Pa=e=>`${e}-command-error`,Fa=({execute:t})=>{let[n,r]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{n||(r(!0),(async()=>{await t(),await Q()})())},[t,n,$()]),null},Ia=({to:t,params:n,queryParams:r,options:i})=>{let[a,o]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{a||(o(!0),(async()=>{await _a(t,n,r,i),await Q()})())},[t,n,r,i,a,$()]),null},La=t=>{let[n,r]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{n||(r(!0),(async()=>{await ya(t),await Q()})())},[t,n,$()]),null},Ra=({title:t,subtitle:n,execute:r,confirmButtonText:i,confirmButtonAccent:a})=>{let[o,s]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{o||(s(!0),(async()=>{await va({title:t,subtitle:n,confirmButtonText:i,confirmButtonAccent:a})===`confirm`&&await r(),await Q()})())},[t,n,r,i,a,o,$()]),null};exports.AppPath=ta,exports.Command=Fa,exports.CommandLink=Ia,exports.CommandModal=Ra,exports.CommandOpenSidePanelPage=La,exports.SidePanelPages=da,exports.Trans=ie,exports.closeSidePanel=pa,exports.copyToClipboard=ma,exports.enqueueSnackbar=ga,exports.getApplicationVariable=ha,exports.getFrontComponentCommandErrorDedupeKey=Pa,exports.msg=ja,exports.navigate=_a,exports.openCommandConfirmationModal=va,exports.openSidePanelPage=ya,exports.t=Na,exports.unmountFrontComponent=Q,exports.updateProgress=ba,exports.useColorScheme=Sa,exports.useFrontComponentExecutionContext=l,exports.useFrontComponentId=$,exports.useLocale=d,exports.useRecordId=Ea,exports.useSelectedRecordIds=Oa,exports.useTranslate=wa,exports.useUserId=Aa;
39
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Tt,s=!gt.jitless,c=s&&Et.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Er([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function kr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!B(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>V(e,r,M())))}),t)}var Ar=A(`$ZodUnion`,(e,t)=>{W.init(e,t),N(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),N(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),N(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),N(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>xt(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>kr(t,i,e,a)):kr(s,i,e,a)}}),jr=A(`$ZodIntersection`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Nr(e,t,n)):Nr(e,i,a)}});function Mr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(I(e)&&I(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Mr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Mr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Nr(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),B(e))return e;let r=Mr(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var Pr=A(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=_t(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Ot.has(typeof e)).map(e=>typeof e==`string`?L(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Fr=A(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ht(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new j;return n.value=i,n}});function Ir(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Lr=A(`$ZodOptional`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,N(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),N(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${xt(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Ir(t,e.value)):Ir(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Rr=A(`$ZodNullable`,(e,t)=>{W.init(e,t),N(e._zod,`optin`,()=>t.innerType._zod.optin),N(e._zod,`optout`,()=>t.innerType._zod.optout),N(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${xt(e.source)}|null)$`):void 0}),N(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),zr=A(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,N(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Br(e,t)):Br(r,t)}});function Br(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Vr=A(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,N(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Hr=A(`$ZodNonOptional`,(e,t)=>{W.init(e,t),N(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ur(t,e)):Ur(i,e)}});function Ur(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Wr=A(`$ZodCatch`,(e,t)=>{W.init(e,t),N(e._zod,`optin`,()=>t.innerType._zod.optin),N(e._zod,`optout`,()=>t.innerType._zod.optout),N(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>V(e,n,M()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>V(e,n,M()))},input:e.value}),e.issues=[]),e)}}),Gr=A(`$ZodPipe`,(e,t)=>{W.init(e,t),N(e._zod,`values`,()=>t.in._zod.values),N(e._zod,`optin`,()=>t.in._zod.optin),N(e._zod,`optout`,()=>t.out._zod.optout),N(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Kr(e,t.in,n)):Kr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Kr(e,t.out,n)):Kr(r,t.out,n)}});function Kr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var qr=A(`$ZodReadonly`,(e,t)=>{W.init(e,t),N(e._zod,`propValues`,()=>t.innerType._zod.propValues),N(e._zod,`values`,()=>t.innerType._zod.values),N(e._zod,`optin`,()=>t.innerType._zod.optin),N(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Jr):Jr(r)}});function Jr(e){return e.value=Object.freeze(e.value),e}var Yr=A(`$ZodCustom`,(e,t)=>{U.init(e,t),W.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Xr(t,n,r,e));Xr(i,n,r,e)}});function Xr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(H(e))}}var Zr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Qr(){return new Zr}var $r=Qr();function ei(e,t){return new e({type:`string`,...z(t)})}function ti(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...z(t)})}function ni(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...z(t)})}function ri(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...z(t)})}function ii(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...z(t)})}function ai(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...z(t)})}function oi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...z(t)})}function si(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...z(t)})}function ci(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...z(t)})}function li(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...z(t)})}function ui(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...z(t)})}function di(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...z(t)})}function fi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...z(t)})}function pi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...z(t)})}function mi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...z(t)})}function hi(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...z(t)})}function gi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...z(t)})}function _i(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...z(t)})}function vi(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...z(t)})}function yi(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...z(t)})}function bi(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...z(t)})}function xi(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...z(t)})}function Si(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...z(t)})}function Ci(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...z(t)})}function wi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...z(t)})}function Ti(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...z(t)})}function Ei(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...z(t)})}function Di(e){return new e({type:`unknown`})}function Oi(e,t){return new e({type:`never`,...z(t)})}function ki(e,t){return new Pn({check:`max_length`,...z(t),maximum:e})}function Ai(e,t){return new Fn({check:`min_length`,...z(t),minimum:e})}function ji(e,t){return new In({check:`length_equals`,...z(t),length:e})}function Mi(e,t){return new Rn({check:`string_format`,format:`regex`,...z(t),pattern:e})}function Ni(e){return new zn({check:`string_format`,format:`lowercase`,...z(e)})}function Pi(e){return new Bn({check:`string_format`,format:`uppercase`,...z(e)})}function Fi(e,t){return new Vn({check:`string_format`,format:`includes`,...z(t),includes:e})}function Ii(e,t){return new Hn({check:`string_format`,format:`starts_with`,...z(t),prefix:e})}function Li(e,t){return new Un({check:`string_format`,format:`ends_with`,...z(t),suffix:e})}function K(e){return new Wn({check:`overwrite`,tx:e})}function Ri(e){return K(t=>t.normalize(e))}function zi(){return K(e=>e.trim())}function Bi(){return K(e=>e.toLowerCase())}function Vi(){return K(e=>e.toUpperCase())}function Hi(e,t,n){return new e({type:`array`,element:t,...z(n)})}function Ui(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...z(n)})}function Wi(e){let t=Gi(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(H(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(H(r))}},e(n.value,n)));return t}function Gi(e,t){let n=new U({check:`custom`,...z(t)});return n._zod.check=e,n}var Ki=A(`ZodISODateTime`,(e,t)=>{ar.init(e,t),Y.init(e,t)});function qi(e){return Ci(Ki,e)}var Ji=A(`ZodISODate`,(e,t)=>{or.init(e,t),Y.init(e,t)});function Yi(e){return wi(Ji,e)}var Xi=A(`ZodISOTime`,(e,t)=>{sr.init(e,t),Y.init(e,t)});function Zi(e){return Ti(Xi,e)}var Qi=A(`ZodISODuration`,(e,t)=>{cr.init(e,t),Y.init(e,t)});function $i(e){return Ei(Qi,e)}var ea=(e,t)=>{Vt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Wt(e,t)},flatten:{value:t=>Ut(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,vt,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,vt,2)}},isEmpty:{get(){return e.issues.length===0}}})};A(`ZodError`,ea);var q=A(`ZodError`,ea,{Parent:Error}),ta=Gt(q),na=Kt(q),ra=qt(q),ia=Yt(q),aa=Zt(q),oa=Qt(q),sa=$t(q),ca=en(q),la=tn(q),ua=nn(q),da=rn(q),fa=an(q),J=A(`ZodType`,(e,t)=>(W.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(F(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>R(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>ta(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ra(e,t,n),e.parseAsync=async(t,n)=>na(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ia(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>aa(e,t,n),e.decode=(t,n)=>oa(e,t,n),e.encodeAsync=async(t,n)=>sa(e,t,n),e.decodeAsync=async(t,n)=>ca(e,t,n),e.safeEncode=(t,n)=>la(e,t,n),e.safeDecode=(t,n)=>ua(e,t,n),e.safeEncodeAsync=async(t,n)=>da(e,t,n),e.safeDecodeAsync=async(t,n)=>fa(e,t,n),e.refine=(t,n)=>e.check(ho(t,n)),e.superRefine=t=>e.check(go(t)),e.overwrite=t=>e.check(K(t)),e.optional=()=>Qa(e),e.nullable=()=>eo(e),e.nullish=()=>Qa(eo(e)),e.nonoptional=t=>oo(e,t),e.array=()=>Ba(e),e.or=t=>Wa([e,t]),e.and=t=>Ka(e,t),e.transform=t=>uo(e,Xa(t)),e.default=t=>no(e,t),e.prefault=t=>io(e,t),e.catch=t=>co(e,t),e.pipe=t=>uo(e,t),e.readonly=()=>po(e),e.describe=t=>{let n=e.clone();return $r.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return $r.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return $r.get(e);let n=e.clone();return $r.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),pa=A(`_ZodString`,(e,t)=>{qn.init(e,t),J.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Mi(...t)),e.includes=(...t)=>e.check(Fi(...t)),e.startsWith=(...t)=>e.check(Ii(...t)),e.endsWith=(...t)=>e.check(Li(...t)),e.min=(...t)=>e.check(Ai(...t)),e.max=(...t)=>e.check(ki(...t)),e.length=(...t)=>e.check(ji(...t)),e.nonempty=(...t)=>e.check(Ai(1,...t)),e.lowercase=t=>e.check(Ni(t)),e.uppercase=t=>e.check(Pi(t)),e.trim=()=>e.check(zi()),e.normalize=(...t)=>e.check(Ri(...t)),e.toLowerCase=()=>e.check(Bi()),e.toUpperCase=()=>e.check(Vi())}),ma=A(`ZodString`,(e,t)=>{qn.init(e,t),pa.init(e,t),e.email=t=>e.check(ti(ga,t)),e.url=t=>e.check(si(ya,t)),e.jwt=t=>e.check(Si(Pa,t)),e.emoji=t=>e.check(ci(ba,t)),e.guid=t=>e.check(ni(_a,t)),e.uuid=t=>e.check(ri(va,t)),e.uuidv4=t=>e.check(ii(va,t)),e.uuidv6=t=>e.check(ai(va,t)),e.uuidv7=t=>e.check(oi(va,t)),e.nanoid=t=>e.check(li(xa,t)),e.guid=t=>e.check(ni(_a,t)),e.cuid=t=>e.check(ui(Sa,t)),e.cuid2=t=>e.check(di(Ca,t)),e.ulid=t=>e.check(fi(wa,t)),e.base64=t=>e.check(yi(ja,t)),e.base64url=t=>e.check(bi(Ma,t)),e.xid=t=>e.check(pi(Ta,t)),e.ksuid=t=>e.check(mi(Ea,t)),e.ipv4=t=>e.check(hi(Da,t)),e.ipv6=t=>e.check(gi(Oa,t)),e.cidrv4=t=>e.check(_i(ka,t)),e.cidrv6=t=>e.check(vi(Aa,t)),e.e164=t=>e.check(xi(Na,t)),e.datetime=t=>e.check(qi(t)),e.date=t=>e.check(Yi(t)),e.time=t=>e.check(Zi(t)),e.duration=t=>e.check($i(t))});function ha(e){return ei(ma,e)}var Y=A(`ZodStringFormat`,(e,t)=>{G.init(e,t),pa.init(e,t)}),ga=A(`ZodEmail`,(e,t)=>{Xn.init(e,t),Y.init(e,t)}),_a=A(`ZodGUID`,(e,t)=>{Jn.init(e,t),Y.init(e,t)}),va=A(`ZodUUID`,(e,t)=>{Yn.init(e,t),Y.init(e,t)}),ya=A(`ZodURL`,(e,t)=>{Zn.init(e,t),Y.init(e,t)}),ba=A(`ZodEmoji`,(e,t)=>{Qn.init(e,t),Y.init(e,t)}),xa=A(`ZodNanoID`,(e,t)=>{$n.init(e,t),Y.init(e,t)}),Sa=A(`ZodCUID`,(e,t)=>{er.init(e,t),Y.init(e,t)}),Ca=A(`ZodCUID2`,(e,t)=>{tr.init(e,t),Y.init(e,t)}),wa=A(`ZodULID`,(e,t)=>{nr.init(e,t),Y.init(e,t)}),Ta=A(`ZodXID`,(e,t)=>{rr.init(e,t),Y.init(e,t)}),Ea=A(`ZodKSUID`,(e,t)=>{ir.init(e,t),Y.init(e,t)}),Da=A(`ZodIPv4`,(e,t)=>{lr.init(e,t),Y.init(e,t)}),Oa=A(`ZodIPv6`,(e,t)=>{ur.init(e,t),Y.init(e,t)}),ka=A(`ZodCIDRv4`,(e,t)=>{dr.init(e,t),Y.init(e,t)}),Aa=A(`ZodCIDRv6`,(e,t)=>{fr.init(e,t),Y.init(e,t)}),ja=A(`ZodBase64`,(e,t)=>{mr.init(e,t),Y.init(e,t)}),Ma=A(`ZodBase64URL`,(e,t)=>{gr.init(e,t),Y.init(e,t)}),Na=A(`ZodE164`,(e,t)=>{_r.init(e,t),Y.init(e,t)}),Pa=A(`ZodJWT`,(e,t)=>{yr.init(e,t),Y.init(e,t)}),Fa=A(`ZodUnknown`,(e,t)=>{br.init(e,t),J.init(e,t)});function Ia(){return Di(Fa)}var La=A(`ZodNever`,(e,t)=>{xr.init(e,t),J.init(e,t)});function Ra(e){return Oi(La,e)}var za=A(`ZodArray`,(e,t)=>{Cr.init(e,t),J.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Ai(t,n)),e.nonempty=t=>e.check(Ai(1,t)),e.max=(t,n)=>e.check(ki(t,n)),e.length=(t,n)=>e.check(ji(t,n)),e.unwrap=()=>e.element});function Ba(e,t){return Hi(za,e,t)}var Va=A(`ZodObject`,(e,t)=>{Or.init(e,t),J.init(e,t),N(e,`shape`,()=>t.shape),e.keyof=()=>Ja(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ia()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ia()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ra()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Mt(e,t),e.safeExtend=t=>Nt(e,t),e.merge=t=>Pt(e,t),e.pick=t=>At(e,t),e.omit=t=>jt(e,t),e.partial=(...t)=>Ft(Za,e,t[0]),e.required=(...t)=>It(ao,e,t[0])});function Ha(e,t){return new Va({type:`object`,shape:e??{},...z(t)})}var Ua=A(`ZodUnion`,(e,t)=>{Ar.init(e,t),J.init(e,t),e.options=t.options});function Wa(e,t){return new Ua({type:`union`,options:e,...z(t)})}var Ga=A(`ZodIntersection`,(e,t)=>{jr.init(e,t),J.init(e,t)});function Ka(e,t){return new Ga({type:`intersection`,left:e,right:t})}var qa=A(`ZodEnum`,(e,t)=>{Pr.init(e,t),J.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new qa({...t,checks:[],...z(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new qa({...t,checks:[],...z(r),entries:i})}});function Ja(e,t){return new qa({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...z(t)})}var Ya=A(`ZodTransform`,(e,t)=>{Fr.init(e,t),J.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ht(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(H(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(H(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Xa(e){return new Ya({type:`transform`,transform:e})}var Za=A(`ZodOptional`,(e,t)=>{Lr.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Qa(e){return new Za({type:`optional`,innerType:e})}var $a=A(`ZodNullable`,(e,t)=>{Rr.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function eo(e){return new $a({type:`nullable`,innerType:e})}var to=A(`ZodDefault`,(e,t)=>{zr.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function no(e,t){return new to({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Dt(t)}})}var ro=A(`ZodPrefault`,(e,t)=>{Vr.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function io(e,t){return new ro({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Dt(t)}})}var ao=A(`ZodNonOptional`,(e,t)=>{Hr.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function oo(e,t){return new ao({type:`nonoptional`,innerType:e,...z(t)})}var so=A(`ZodCatch`,(e,t)=>{Wr.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function co(e,t){return new so({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var lo=A(`ZodPipe`,(e,t)=>{Gr.init(e,t),J.init(e,t),e.in=t.in,e.out=t.out});function uo(e,t){return new lo({type:`pipe`,in:e,out:t})}var fo=A(`ZodReadonly`,(e,t)=>{qr.init(e,t),J.init(e,t),e.unwrap=()=>e._zod.def.innerType});function po(e){return new fo({type:`readonly`,innerType:e})}var mo=A(`ZodCustom`,(e,t)=>{Yr.init(e,t),J.init(e,t)});function ho(e,t={}){return Ui(mo,e,t)}function go(e){return Wi(e)}var _o=function(){function e(e){this.groups=[],this.each=!1,this.context=void 0,this.type=e.type,this.name=e.name,this.target=e.target,this.propertyName=e.propertyName,this.constraints=e?.constraints,this.constraintCls=e.constraintCls,this.validationTypeOptions=e.validationTypeOptions,e.validationOptions&&(this.message=e.validationOptions.message,this.groups=e.validationOptions.groups,this.always=e.validationOptions.always,this.each=e.validationOptions.each,this.context=e.validationOptions.context)}return e}(),vo=function(){function e(){}return e.prototype.transform=function(e){var t=[];return Object.keys(e.properties).forEach(function(n){e.properties[n].forEach(function(r){var i={message:r.message,groups:r.groups,always:r.always,each:r.each},a={type:r.type,name:r.name,target:e.name,propertyName:n,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};t.push(new _o(a))})}),t},e}(),yo=function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},bo=function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},xo=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};(function(){function e(){this.validationMetadatas=new Map,this.constraintMetadatas=new Map}return Object.defineProperty(e.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.size},enumerable:!1,configurable:!0}),e.prototype.addValidationSchema=function(e){var t=this;new vo().transform(e).forEach(function(e){return t.addValidationMetadata(e)})},e.prototype.addValidationMetadata=function(e){var t=this.validationMetadatas.get(e.target);t?t.push(e):this.validationMetadatas.set(e.target,[e])},e.prototype.addConstraintMetadata=function(e){var t=this.constraintMetadatas.get(e.target);t?t.push(e):this.constraintMetadatas.set(e.target,[e])},e.prototype.groupByPropertyName=function(e){var t={};return e.forEach(function(e){t[e.propertyName]||(t[e.propertyName]=[]),t[e.propertyName].push(e)}),t},e.prototype.getTargetValidationMetadatas=function(e,t,n,r,i){var a,o,s=function(e){return e.always===void 0?e.groups&&e.groups.length?!1:n:e.always},c=function(e){return!!(r&&(!i||!i.length)&&e.groups&&e.groups.length)},l=(this.validationMetadatas.get(e)||[]).filter(function(n){return n.target!==e&&n.target!==t?!1:s(n)?!0:c(n)?!1:i&&i.length>0?n.groups&&!!n.groups.find(function(e){return i.indexOf(e)!==-1}):!0}),u=[];try{for(var d=yo(this.validationMetadatas.entries()),f=d.next();!f.done;f=d.next()){var p=bo(f.value,2),m=p[0],h=p[1];e.prototype instanceof m&&u.push.apply(u,xo([],bo(h),!1))}}catch(e){a={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}var g=u.filter(function(t){return typeof t.target==`string`||t.target===e||t.target instanceof Function&&!(e.prototype instanceof t.target)?!1:s(t)?!0:c(t)?!1:i&&i.length>0?t.groups&&!!t.groups.find(function(e){return i.indexOf(e)!==-1}):!0}).filter(function(e){return!l.find(function(t){return t.propertyName===e.propertyName&&t.type===e.type})});return l.concat(g)},e.prototype.getTargetValidatorConstraints=function(e){return this.constraintMetadatas.get(e)||[]},e})(),function(){function e(){}return e.isValid=function(e){var t=this;return e!==`isValid`&&e!==`getMessage`&&Object.keys(this).map(function(e){return t[e]}).indexOf(e)!==-1},e.CUSTOM_VALIDATION=`customValidation`,e.NESTED_VALIDATION=`nestedValidation`,e.PROMISE_VALIDATION=`promiseValidation`,e.CONDITIONAL_VALIDATION=`conditionalValidation`,e.WHITELIST=`whitelistValidation`,e.IS_DEFINED=`isDefined`,e}();var So=new(function(){function e(){this.instances=[]}return e.prototype.get=function(e){var t=this.instances.find(function(t){return t.type===e});return t||(t={type:e,object:new e},this.instances.push(t)),t.object},e}()),Co,wo;function To(e){if(Co)try{var t=Co.get(e);if(t||!wo||!wo.fallback)return t}catch(e){if(!wo||!wo.fallbackOnErrors)throw e}return So.get(e)}(function(){function e(e,t,n){n===void 0&&(n=!1),this.target=e,this.name=t,this.async=n}return Object.defineProperty(e.prototype,"instance",{get:function(){return To(this.target)},enumerable:!1,configurable:!0}),e})();var X=function(e){return e.ACTOR=`ACTOR`,e.ADDRESS=`ADDRESS`,e.ARRAY=`ARRAY`,e.BOOLEAN=`BOOLEAN`,e.CURRENCY=`CURRENCY`,e.DATE=`DATE`,e.DATE_TIME=`DATE_TIME`,e.EMAILS=`EMAILS`,e.FILES=`FILES`,e.FULL_NAME=`FULL_NAME`,e.LINKS=`LINKS`,e.MORPH_RELATION=`MORPH_RELATION`,e.MULTI_SELECT=`MULTI_SELECT`,e.NUMBER=`NUMBER`,e.NUMERIC=`NUMERIC`,e.PHONES=`PHONES`,e.POSITION=`POSITION`,e.RATING=`RATING`,e.RAW_JSON=`RAW_JSON`,e.RELATION=`RELATION`,e.RICH_TEXT=`RICH_TEXT`,e.SELECT=`SELECT`,e.TEXT=`TEXT`,e.TS_VECTOR=`TS_VECTOR`,e.UUID=`UUID`,e}({}),Eo=function(e){return e.Verify=`/verify`,e.VerifyEmail=`/verify-email`,e.SignInUp=`/welcome`,e.Invite=`/invite/:workspaceInviteHash`,e.ResetPassword=`/reset-password/:passwordResetToken`,e.WorkspaceActivation=`/workspace-activation`,e.CreateProfile=`/create/profile`,e.SyncEmails=`/sync/emails`,e.InstallApps=`/install-apps`,e.InviteTeam=`/invite-team`,e.PlanRequired=`/plan-required`,e.PlanRequiredSuccess=`/plan-required/payment-success`,e.BookCall=`/book-call`,e.AiChat=`/chat/:threadId?`,e.Index=`/`,e.Home=`/home`,e.TasksPage=`/objects/tasks`,e.OpportunitiesPage=`/objects/opportunities`,e.RecordIndexPage=`/objects/:objectNamePlural`,e.RecordShowPage=`/object/:objectNameSingular/:objectRecordId`,e.PageLayoutPage=`/page/:pageLayoutId`,e.WorkflowCoreIndexPage=`/workflow-core`,e.Settings=`settings`,e.SettingsCatchAll=`/settings/*`,e.Developers=`developers`,e.DevelopersCatchAll=`/developers/*`,e.Authorize=`/authorize`,e.Dpa=`/dpa`,e.NotFoundWildcard=`*`,e.NotFound=`/not-found`,e}({}),Do=function(e){return e.EMAIL=`EMAIL`,e.CALENDAR=`CALENDAR`,e.WORKFLOW=`WORKFLOW`,e.AGENT=`AGENT`,e.API=`API`,e.IMPORT=`IMPORT`,e.MANUAL=`MANUAL`,e.SYSTEM=`SYSTEM`,e.WEBHOOK=`WEBHOOK`,e.APPLICATION=`APPLICATION`,e}({}),Oo={type:X.ACTOR,properties:[{name:`source`,type:X.SELECT,hidden:!1,isRequired:!0,options:Object.keys(Do).map((e,t)=>({id:(0,n.v4)(),label:`${Do[e].toLowerCase()}`,value:e,position:t}))},{name:`workspaceMemberId`,type:X.UUID,hidden:`input`,isRequired:!1},{name:`name`,type:X.TEXT,hidden:`input`,isRequired:!0},{name:`context`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},ko={type:X.ADDRESS,properties:[{name:`addressStreet1`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressStreet2`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressCity`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressPostcode`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressState`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressCountry`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`addressLat`,type:X.NUMERIC,hidden:!1,isRequired:!1},{name:`addressLng`,type:X.NUMERIC,hidden:!1,isRequired:!1}]},Ao={type:X.CURRENCY,properties:[{name:`amountMicros`,type:X.NUMERIC,hidden:!1,isRequired:!1},{name:`currencyCode`,type:X.TEXT,hidden:!1,isRequired:!1}]},jo={type:X.EMAILS,properties:[{name:`primaryEmail`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalEmails`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},Mo={type:X.FULL_NAME,properties:[{name:`firstName`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1},{name:`lastName`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1}]},No={type:X.LINKS,properties:[{name:`primaryLinkLabel`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`primaryLinkUrl`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`secondaryLinks`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},Po={type:X.PHONES,properties:[{name:`primaryPhoneNumber`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCountryCode`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCallingCode`,type:X.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalPhones`,type:X.RAW_JSON,hidden:!1,isRequired:!1}]},Fo={type:X.RICH_TEXT,properties:[{name:`blocknote`,type:X.TEXT,hidden:!1,isRequired:!1},{name:`markdown`,type:X.TEXT,hidden:!1,isRequired:!1}]};Ha({blocknote:ha().nullable().optional(),markdown:ha().nullable()}),new Map([[X.LINKS,No],[X.CURRENCY,Ao],[X.FULL_NAME,Mo],[X.ADDRESS,ko],[X.ACTOR,Oo],[X.EMAILS,jo],[X.PHONES,Po],[X.RICH_TEXT,Fo]]),X.RELATION,X.MORPH_RELATION,X.FILES,X.TS_VECTOR;var Io=function(e){return e.CommandMenuDisplay=`command-menu-display`,e.ViewRecord=`view-record`,e.ViewRecords=`view-records`,e.MergeRecords=`merge-records`,e.UpdateRecords=`update-records`,e.EditRichText=`edit-rich-text`,e.Copilot=`copilot`,e.WorkflowTriggerSelectType=`workflow-trigger-select-type`,e.WorkflowStepCreate=`workflow-step-create`,e.WorkflowStepEditType=`workflow-step-edit-type`,e.WorkflowStepView=`workflow-step-view`,e.WorkflowStepEdit=`workflow-step-edit`,e.WorkflowRunStepView=`workflow-run-step-view`,e.SearchRecords=`search-records`,e.AskAI=`ask-ai`,e.PageLayoutDashboardWidgetTypeSelect=`page-layout-dashboard-widget-type-select`,e.PageLayoutTabSettings=`page-layout-tab-settings`,e.DashboardChartSettings=`dashboard-chart-settings`,e.DashboardIframeSettings=`dashboard-iframe-settings`,e.DashboardRecordTableSettings=`dashboard-record-table-settings`,e.RecordPageFieldsSettings=`record-page-fields-settings`,e.RecordPageFieldSettings=`record-page-field-settings`,e.ViewFrontComponent=`view-front-component`,e.NavigationMenuItemEdit=`navigation-menu-item-edit`,e.NavigationMenuAddItem=`navigation-menu-add-item`,e.CommandMenuEdit=`command-menu-edit`,e.PageLayoutRecordPageWidgetTypeSelect=`page-layout-record-page-widget-type-select`,e.ComposeEmail=`compose-email`,e.ComposeCalendarEvent=`compose-calendar-event`,e.CreateRelatedRecord=`create-related-record`,e.SendCampaignTest=`send-campaign-test`,e.EmailBlockSettings=`email-block-settings`,e.SettingsMetadataTranslations=`settings-metadata-translations`,e}({}),Lo=`frontComponentHostCommunicationApi`;globalThis[Lo]??={};var Z=globalThis.frontComponentHostCommunicationApi,Ro=()=>{let e=Z.closeSidePanel;if(!m(e))throw Error(`closeSidePanelFunction is not set`);return e()},zo=e=>{let t=Z.copyToClipboard;if(!m(t))throw Error(`copyToClipboardFunction is not set`);return t(e)},Bo=e=>{let t=process.env.applicationVariables;if(t)return JSON.parse(t)[e]},Vo=e=>{let t=Z.enqueueSnackbar;if(!m(t))throw Error(`enqueueSnackbarFunction is not set`);return t(e)},Ho=(e,t,n,r)=>{let i=Z.navigate;if(!m(i))throw Error(`navigateFunction is not set`);return i(e,t,n,r)},Uo=e=>{let t=Z.openCommandConfirmationModal;if(!m(t))throw Error(`openCommandConfirmationModalFunction is not set`);return t(e)},Wo=e=>{let t=Z.openSidePanelPage;if(!m(t))throw Error(`openSidePanelPageFunction is not set`);return t(e)},Q=()=>{let e=Z.unmountFrontComponent;if(!m(e))throw Error(`unmountFrontComponentFunction is not set`);return e()},Go=e=>{let t=Z.updateProgress;if(!m(t))throw Error(`updateProgressFunction is not set`);return t(e)},Ko=(e,t)=>{let n=Z.uploadFile;if(!m(n))throw Error(`uploadFileFunction is not set`);return n(e,t)},qo=e=>e.colorScheme,Jo=()=>l(qo),Yo=e=>e.frontComponentId,$=()=>l(Yo),Xo=()=>{let t=d();return{locale:t,t:(0,e.useCallback)((e,n)=>ft(e,n,t),[t])}},Zo=e=>e.selectedRecordIds.length===1?e.selectedRecordIds[0]:null,Qo=()=>l(Zo),$o=e=>e.selectedRecordIds,es=()=>l($o),ts=()=>l(e=>e.timelineActivityId),ns=e=>e.userId,rs=()=>l(ns),is=e=>f(e),as=()=>o()?.locale??`en`,os=(e,t)=>ft(e,t,as()),ss=e=>`${e}-command-error`,cs=({execute:t})=>{let[n,r]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{n||(r(!0),(async()=>{await t(),await Q()})())},[t,n,$()]),null},ls=({to:t,params:n,queryParams:r,options:i})=>{let[a,o]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{a||(o(!0),(async()=>{await Ho(t,n,r,i),await Q()})())},[t,n,r,i,a,$()]),null},us=t=>{let[n,r]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{n||(r(!0),(async()=>{await Wo(t),await Q()})())},[t,n,$()]),null},ds=({title:t,subtitle:n,execute:r,confirmButtonText:i,confirmButtonAccent:a})=>{let[o,s]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{o||(s(!0),(async()=>{await Uo({title:t,subtitle:n,confirmButtonText:i,confirmButtonAccent:a})===`confirm`&&await r(),await Q()})())},[t,n,r,i,a,o,$()]),null};exports.AppPath=Eo,exports.Command=cs,exports.CommandLink=ls,exports.CommandModal=ds,exports.CommandOpenSidePanelPage=us,exports.SidePanelPages=Io,exports.Trans=mt,exports.closeSidePanel=Ro,exports.copyToClipboard=zo,exports.enqueueSnackbar=Vo,exports.getApplicationVariable=Bo,exports.getFrontComponentCommandErrorDedupeKey=ss,exports.msg=is,exports.navigate=Ho,exports.openCommandConfirmationModal=Uo,exports.openSidePanelPage=Wo,exports.t=os,exports.unmountFrontComponent=Q,exports.updateProgress=Go,exports.uploadFile=Ko,exports.useColorScheme=Jo,exports.useFrontComponentExecutionContext=l,exports.useFrontComponentId=$,exports.useLocale=d,exports.useRecordId=Qo,exports.useSelectedRecordIds=es,exports.useTimelineActivityId=ts,exports.useTranslate=Xo,exports.useUserId=rs;
21
40
  //# sourceMappingURL=index.cjs.map