twenty-sdk 2.13.0 → 2.14.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.
- package/CHANGELOG.md +17 -0
- package/dist/{AllIcons-BwIoyggb-DpmEuQAR.mjs → AllIcons-BwIoyggb-BCMFgulw.mjs} +1 -1
- package/dist/{AllIcons-BwIoyggb-Ck9DmOFs.js → AllIcons-BwIoyggb-Pq3paugc.js} +1 -1
- package/dist/{catalog-sync-BfaTQFam.mjs → catalog-sync-CXDxoJ8O.mjs} +1 -1
- package/dist/{catalog-sync-MvJJHh7v.js → catalog-sync-sANH0f3Y.js} +1 -1
- package/dist/cli.cjs +3 -3
- package/dist/cli.mjs +4 -4
- package/dist/define/index.cjs +2 -2
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +9 -3
- package/dist/define/index.mjs +133 -140
- package/dist/define/index.mjs.map +1 -1
- package/dist/{display-Co0K-nTB-CPdyKmin.js → display-Co0K-nTB-CGtaWbMi.js} +15 -15
- package/dist/{display-Co0K-nTB-DIalVNdw.mjs → display-Co0K-nTB-DAirZFT6.mjs} +3776 -3796
- package/dist/front-component/index.cjs +1 -1
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.d.ts +5 -1
- package/dist/front-component/index.mjs +5 -5
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/front-component-renderer.cjs +1 -1
- package/dist/{get-function-input-schema-NI9y_bIk-LH_O2OgF.mjs → get-function-input-schema-NI9y_bIk-Cdh2RIb9.mjs} +1 -1
- package/dist/{get-function-input-schema-NI9y_bIk-BZ2G7LIj.js → get-function-input-schema-NI9y_bIk-CqUY25sG.js} +1 -1
- package/dist/{login-oauth-DN2eTP67.js → login-oauth-0T8eWvyh.js} +10 -10
- package/dist/{login-oauth-BMTHndmD.mjs → login-oauth-BRpqOH2x.mjs} +393 -395
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +1 -1
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -17,5 +17,5 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require
|
|
|
17
17
|
newResult[${r}] = ${n}.value;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=v,c=!s.jitless,l=c&&ne.value,u=t.catchall,f;e._zod.parse=(s,d)=>{f??=r.value;let p=s.value;return o(p)?c&&l&&d?.async===!1&&d.jitless!==!0?(a||=i(t.shape),s=a(s,d),u?Kt([],p,s,d,f,e):s):n(s,d):(s.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),s)}});function Yt(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=>!C(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=>T(e,r,c())))}),t)}var Xt=i(`$ZodUnion`,(e,t)=>{P.init(e,t),h(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),h(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),h(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),h(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=>p(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=>Yt(t,i,e,a)):Yt(s,i,e,a)}}),Zt=i(`$ZodIntersection`,(e,t)=>{P.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])=>Qt(e,t,n)):Qt(e,i,a)}});function R(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(y(e)&&y(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=R(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=R(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 Qt(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),C(e))return e;let r=R(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var $t=i(`$ZodEnum`,(e,t)=>{P.init(e,t);let n=l(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ie.has(typeof e)).map(e=>typeof e==`string`?b(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}}),en=i(`$ZodTransform`,(e,t)=>{P.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new o(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 a;return n.value=i,n}});function tn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var nn=i(`$ZodOptional`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,h(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),h(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${p(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=>tn(t,e.value)):tn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),rn=i(`$ZodNullable`,(e,t)=>{P.init(e,t),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(e._zod,`optout`,()=>t.innerType._zod.optout),h(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${p(e.source)}|null)$`):void 0}),h(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)}),an=i(`$ZodDefault`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,h(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=>on(e,t)):on(r,t)}});function on(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var sn=i(`$ZodPrefault`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,h(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=i(`$ZodNonOptional`,(e,t)=>{P.init(e,t),h(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=>ln(t,e)):ln(i,e)}});function ln(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 un=i(`$ZodCatch`,(e,t)=>{P.init(e,t),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(e._zod,`optout`,()=>t.innerType._zod.optout),h(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=>T(e,n,c()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>T(e,n,c()))},input:e.value}),e.issues=[]),e)}}),dn=i(`$ZodPipe`,(e,t)=>{P.init(e,t),h(e._zod,`values`,()=>t.in._zod.values),h(e._zod,`optin`,()=>t.in._zod.optin),h(e._zod,`optout`,()=>t.out._zod.optout),h(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=>z(e,t.in,n)):z(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>z(e,t.out,n)):z(r,t.out,n)}});function z(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var fn=i(`$ZodReadonly`,(e,t)=>{P.init(e,t),h(e._zod,`propValues`,()=>t.innerType._zod.propValues),h(e._zod,`values`,()=>t.innerType._zod.values),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(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(pn):pn(r)}});function pn(e){return e.value=Object.freeze(e.value),e}var mn=i(`$ZodCustom`,(e,t)=>{M.init(e,t),P.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=>hn(t,n,r,e));hn(i,n,r,e)}});function hn(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(D(e))}}var gn=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 _n(){return new gn}var B=_n();function vn(e,t){return new e({type:`string`,...S(t)})}function yn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...S(t)})}function bn(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...S(t)})}function xn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...S(t)})}function Sn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...S(t)})}function Cn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...S(t)})}function wn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...S(t)})}function Tn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...S(t)})}function En(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...S(t)})}function Dn(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...S(t)})}function On(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...S(t)})}function kn(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...S(t)})}function An(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...S(t)})}function jn(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...S(t)})}function Mn(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...S(t)})}function Nn(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...S(t)})}function Pn(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...S(t)})}function Fn(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...S(t)})}function In(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...S(t)})}function Ln(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...S(t)})}function Rn(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...S(t)})}function zn(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...S(t)})}function Bn(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...S(t)})}function Vn(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...S(t)})}function Hn(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...S(t)})}function Un(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...S(t)})}function Wn(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...S(t)})}function Gn(e){return new e({type:`unknown`})}function Kn(e,t){return new e({type:`never`,...S(t)})}function qn(e,t){return new rt({check:`max_length`,...S(t),maximum:e})}function V(e,t){return new it({check:`min_length`,...S(t),minimum:e})}function Jn(e,t){return new at({check:`length_equals`,...S(t),length:e})}function Yn(e,t){return new ot({check:`string_format`,format:`regex`,...S(t),pattern:e})}function Xn(e){return new st({check:`string_format`,format:`lowercase`,...S(e)})}function Zn(e){return new ct({check:`string_format`,format:`uppercase`,...S(e)})}function Qn(e,t){return new lt({check:`string_format`,format:`includes`,...S(t),includes:e})}function $n(e,t){return new ut({check:`string_format`,format:`starts_with`,...S(t),prefix:e})}function er(e,t){return new dt({check:`string_format`,format:`ends_with`,...S(t),suffix:e})}function H(e){return new ft({check:`overwrite`,tx:e})}function tr(e){return H(t=>t.normalize(e))}function nr(){return H(e=>e.trim())}function rr(){return H(e=>e.toLowerCase())}function ir(){return H(e=>e.toUpperCase())}function ar(e,t,n){return new e({type:`array`,element:t,...S(n)})}function or(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...S(n)})}function sr(e){let t=cr(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(D(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(D(r))}},e(n.value,n)));return t}function cr(e,t){let n=new M({check:`custom`,...S(t)});return n._zod.check=e,n}var lr=i(`ZodISODateTime`,(e,t)=>{Et.init(e,t),G.init(e,t)});function ur(e){return Vn(lr,e)}var dr=i(`ZodISODate`,(e,t)=>{Dt.init(e,t),G.init(e,t)});function fr(e){return Hn(dr,e)}var pr=i(`ZodISOTime`,(e,t)=>{Ot.init(e,t),G.init(e,t)});function mr(e){return Un(pr,e)}var hr=i(`ZodISODuration`,(e,t)=>{kt.init(e,t),G.init(e,t)});function gr(e){return Wn(hr,e)}var _r=(e,t)=>{he.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ve(e,t)},flatten:{value:t=>_e(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,u,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,u,2)}},isEmpty:{get(){return e.issues.length===0}}})};i(`ZodError`,_r);var U=i(`ZodError`,_r,{Parent:Error}),vr=O(U),yr=k(U),br=A(U),xr=j(U),Sr=xe(U),Cr=Se(U),wr=Ce(U),Tr=we(U),Er=Te(U),Dr=Ee(U),Or=De(U),kr=Oe(U),W=i(`ZodType`,(e,t)=>(P.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(_(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>x(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>vr(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>br(e,t,n),e.parseAsync=async(t,n)=>yr(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>xr(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Sr(e,t,n),e.decode=(t,n)=>Cr(e,t,n),e.encodeAsync=async(t,n)=>wr(e,t,n),e.decodeAsync=async(t,n)=>Tr(e,t,n),e.safeEncode=(t,n)=>Er(e,t,n),e.safeDecode=(t,n)=>Dr(e,t,n),e.safeEncodeAsync=async(t,n)=>Or(e,t,n),e.safeDecodeAsync=async(t,n)=>kr(e,t,n),e.refine=(t,n)=>e.check(ki(t,n)),e.superRefine=t=>e.check(Ai(t)),e.overwrite=t=>e.check(H(t)),e.optional=()=>pi(e),e.nullable=()=>hi(e),e.nullish=()=>pi(hi(e)),e.nonoptional=t=>xi(e,t),e.array=()=>ni(e),e.or=t=>oi([e,t]),e.and=t=>ci(e,t),e.transform=t=>Ti(e,di(t)),e.default=t=>_i(e,t),e.prefault=t=>yi(e,t),e.catch=t=>Ci(e,t),e.pipe=t=>Ti(e,t),e.readonly=()=>Di(e),e.describe=t=>{let n=e.clone();return B.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return B.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return B.get(e);let n=e.clone();return B.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ar=i(`_ZodString`,(e,t)=>{F.init(e,t),W.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(Yn(...t)),e.includes=(...t)=>e.check(Qn(...t)),e.startsWith=(...t)=>e.check($n(...t)),e.endsWith=(...t)=>e.check(er(...t)),e.min=(...t)=>e.check(V(...t)),e.max=(...t)=>e.check(qn(...t)),e.length=(...t)=>e.check(Jn(...t)),e.nonempty=(...t)=>e.check(V(1,...t)),e.lowercase=t=>e.check(Xn(t)),e.uppercase=t=>e.check(Zn(t)),e.trim=()=>e.check(nr()),e.normalize=(...t)=>e.check(tr(...t)),e.toLowerCase=()=>e.check(rr()),e.toUpperCase=()=>e.check(ir())}),jr=i(`ZodString`,(e,t)=>{F.init(e,t),Ar.init(e,t),e.email=t=>e.check(yn(Nr,t)),e.url=t=>e.check(Tn(Fr,t)),e.jwt=t=>e.check(Bn(Xr,t)),e.emoji=t=>e.check(En(Ir,t)),e.guid=t=>e.check(bn(Pr,t)),e.uuid=t=>e.check(xn(K,t)),e.uuidv4=t=>e.check(Sn(K,t)),e.uuidv6=t=>e.check(Cn(K,t)),e.uuidv7=t=>e.check(wn(K,t)),e.nanoid=t=>e.check(Dn(Lr,t)),e.guid=t=>e.check(bn(Pr,t)),e.cuid=t=>e.check(On(Rr,t)),e.cuid2=t=>e.check(kn(zr,t)),e.ulid=t=>e.check(An(Br,t)),e.base64=t=>e.check(Ln(qr,t)),e.base64url=t=>e.check(Rn(Jr,t)),e.xid=t=>e.check(jn(Vr,t)),e.ksuid=t=>e.check(Mn(Hr,t)),e.ipv4=t=>e.check(Nn(Ur,t)),e.ipv6=t=>e.check(Pn(Wr,t)),e.cidrv4=t=>e.check(Fn(Gr,t)),e.cidrv6=t=>e.check(In(Kr,t)),e.e164=t=>e.check(zn(Yr,t)),e.datetime=t=>e.check(ur(t)),e.date=t=>e.check(fr(t)),e.time=t=>e.check(mr(t)),e.duration=t=>e.check(gr(t))});function Mr(e){return vn(jr,e)}var G=i(`ZodStringFormat`,(e,t)=>{I.init(e,t),Ar.init(e,t)}),Nr=i(`ZodEmail`,(e,t)=>{_t.init(e,t),G.init(e,t)}),Pr=i(`ZodGUID`,(e,t)=>{ht.init(e,t),G.init(e,t)}),K=i(`ZodUUID`,(e,t)=>{gt.init(e,t),G.init(e,t)}),Fr=i(`ZodURL`,(e,t)=>{vt.init(e,t),G.init(e,t)}),Ir=i(`ZodEmoji`,(e,t)=>{yt.init(e,t),G.init(e,t)}),Lr=i(`ZodNanoID`,(e,t)=>{bt.init(e,t),G.init(e,t)}),Rr=i(`ZodCUID`,(e,t)=>{xt.init(e,t),G.init(e,t)}),zr=i(`ZodCUID2`,(e,t)=>{St.init(e,t),G.init(e,t)}),Br=i(`ZodULID`,(e,t)=>{Ct.init(e,t),G.init(e,t)}),Vr=i(`ZodXID`,(e,t)=>{wt.init(e,t),G.init(e,t)}),Hr=i(`ZodKSUID`,(e,t)=>{Tt.init(e,t),G.init(e,t)}),Ur=i(`ZodIPv4`,(e,t)=>{At.init(e,t),G.init(e,t)}),Wr=i(`ZodIPv6`,(e,t)=>{jt.init(e,t),G.init(e,t)}),Gr=i(`ZodCIDRv4`,(e,t)=>{Mt.init(e,t),G.init(e,t)}),Kr=i(`ZodCIDRv6`,(e,t)=>{Nt.init(e,t),G.init(e,t)}),qr=i(`ZodBase64`,(e,t)=>{Ft.init(e,t),G.init(e,t)}),Jr=i(`ZodBase64URL`,(e,t)=>{Lt.init(e,t),G.init(e,t)}),Yr=i(`ZodE164`,(e,t)=>{Rt.init(e,t),G.init(e,t)}),Xr=i(`ZodJWT`,(e,t)=>{Bt.init(e,t),G.init(e,t)}),Zr=i(`ZodUnknown`,(e,t)=>{Vt.init(e,t),W.init(e,t)});function Qr(){return Gn(Zr)}var $r=i(`ZodNever`,(e,t)=>{Ht.init(e,t),W.init(e,t)});function ei(e){return Kn($r,e)}var ti=i(`ZodArray`,(e,t)=>{Wt.init(e,t),W.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(V(t,n)),e.nonempty=t=>e.check(V(1,t)),e.max=(t,n)=>e.check(qn(t,n)),e.length=(t,n)=>e.check(Jn(t,n)),e.unwrap=()=>e.element});function ni(e,t){return ar(ti,e,t)}var ri=i(`ZodObject`,(e,t)=>{Jt.init(e,t),W.init(e,t),h(e,`shape`,()=>t.shape),e.keyof=()=>li(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Qr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Qr()}),e.strict=()=>e.clone({...e._zod.def,catchall:ei()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ce(e,t),e.safeExtend=t=>le(e,t),e.merge=t=>ue(e,t),e.pick=t=>oe(e,t),e.omit=t=>se(e,t),e.partial=(...t)=>de(fi,e,t[0]),e.required=(...t)=>fe(bi,e,t[0])});function ii(e,t){return new ri({type:`object`,shape:e??{},...S(t)})}var ai=i(`ZodUnion`,(e,t)=>{Xt.init(e,t),W.init(e,t),e.options=t.options});function oi(e,t){return new ai({type:`union`,options:e,...S(t)})}var si=i(`ZodIntersection`,(e,t)=>{Zt.init(e,t),W.init(e,t)});function ci(e,t){return new si({type:`intersection`,left:e,right:t})}var q=i(`ZodEnum`,(e,t)=>{$t.init(e,t),W.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 q({...t,checks:[],...S(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 q({...t,checks:[],...S(r),entries:i})}});function li(e,t){return new q({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...S(t)})}var ui=i(`ZodTransform`,(e,t)=>{en.init(e,t),W.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new o(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(D(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(D(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 ui({type:`transform`,transform:e})}var fi=i(`ZodOptional`,(e,t)=>{nn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pi(e){return new fi({type:`optional`,innerType:e})}var mi=i(`ZodNullable`,(e,t)=>{rn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hi(e){return new mi({type:`nullable`,innerType:e})}var gi=i(`ZodDefault`,(e,t)=>{an.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _i(e,t){return new gi({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():re(t)}})}var vi=i(`ZodPrefault`,(e,t)=>{sn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yi(e,t){return new vi({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():re(t)}})}var bi=i(`ZodNonOptional`,(e,t)=>{cn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xi(e,t){return new bi({type:`nonoptional`,innerType:e,...S(t)})}var Si=i(`ZodCatch`,(e,t)=>{un.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ci(e,t){return new Si({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var wi=i(`ZodPipe`,(e,t)=>{dn.init(e,t),W.init(e,t),e.in=t.in,e.out=t.out});function Ti(e,t){return new wi({type:`pipe`,in:e,out:t})}var Ei=i(`ZodReadonly`,(e,t)=>{fn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Di(e){return new Ei({type:`readonly`,innerType:e})}var Oi=i(`ZodCustom`,(e,t)=>{mn.init(e,t),W.init(e,t)});function ki(e,t={}){return or(Oi,e,t)}function Ai(e){return sr(e)}var ji=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}(),Mi=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 ji(a))})}),t},e}(),Ni=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.`)},Pi=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},Fi=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 Mi().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=Ni(this.validationMetadatas.entries()),f=d.next();!f.done;f=d.next()){var p=Pi(f.value,2),m=p[0],h=p[1];e.prototype instanceof m&&u.push.apply(u,Fi([],Pi(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 Ii=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}()),Li,J;function Ri(e){if(Li)try{var t=Li.get(e);if(t||!J||!J.fallback)return t}catch(e){if(!J||!J.fallbackOnErrors)throw e}return Ii.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 Ri(this.target)},enumerable:!1,configurable:!0}),e})();var zi=function(e){return e.Verify=`/verify`,e.VerifyEmail=`/verify-email`,e.SignInUp=`/welcome`,e.Invite=`/invite/:workspaceInviteHash`,e.ResetPassword=`/reset-password/:passwordResetToken`,e.CreateWorkspace=`/create/workspace`,e.CreateProfile=`/create/profile`,e.SyncEmails=`/sync/emails`,e.InviteTeam=`/invite-team`,e.PlanRequired=`/plan-required`,e.PlanRequiredSuccess=`/plan-required/payment-success`,e.BookCallDecision=`/book-call-decision`,e.BookCall=`/book-call`,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.NotFoundWildcard=`*`,e.NotFound=`/not-found`,e}({}),Y=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}({}),Bi=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}({}),Vi={type:Y.ACTOR,properties:[{name:`source`,type:Y.SELECT,hidden:!1,isRequired:!0,options:Object.keys(Bi).map((e,n)=>({id:(0,t.v4)(),label:`${Bi[e].toLowerCase()}`,value:e,position:n}))},{name:`workspaceMemberId`,type:Y.UUID,hidden:`input`,isRequired:!1},{name:`name`,type:Y.TEXT,hidden:`input`,isRequired:!0},{name:`context`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},Hi={type:Y.ADDRESS,properties:[{name:`addressStreet1`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressStreet2`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressCity`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressPostcode`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressState`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressCountry`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressLat`,type:Y.NUMERIC,hidden:!1,isRequired:!1},{name:`addressLng`,type:Y.NUMERIC,hidden:!1,isRequired:!1}]},Ui={type:Y.CURRENCY,properties:[{name:`amountMicros`,type:Y.NUMERIC,hidden:!1,isRequired:!1},{name:`currencyCode`,type:Y.TEXT,hidden:!1,isRequired:!1}]},Wi={type:Y.EMAILS,properties:[{name:`primaryEmail`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalEmails`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},Gi={type:Y.FULL_NAME,properties:[{name:`firstName`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1},{name:`lastName`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1}]},Ki={type:Y.LINKS,properties:[{name:`primaryLinkLabel`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`primaryLinkUrl`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`secondaryLinks`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},qi={type:Y.PHONES,properties:[{name:`primaryPhoneNumber`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCountryCode`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCallingCode`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalPhones`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},Ji={type:Y.RICH_TEXT,properties:[{name:`blocknote`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`markdown`,type:Y.TEXT,hidden:!1,isRequired:!1}]};ii({blocknote:Mr().nullable().optional(),markdown:Mr().nullable()}),new Map([[Y.LINKS,Ki],[Y.CURRENCY,Ui],[Y.FULL_NAME,Gi],[Y.ADDRESS,Hi],[Y.ACTOR,Vi],[Y.EMAILS,Wi],[Y.PHONES,qi],[Y.RICH_TEXT,Ji]]);var Yi=function(e){return e.CommandMenuDisplay=`command-menu-display`,e.ViewRecord=`view-record`,e.MergeRecords=`merge-records`,e.UpdateRecords=`update-records`,e.ViewCalendarEvent=`view-calendar-event`,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.ViewPreviousAiChats=`view-previous-ai-chats`,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.ComposeCampaign=`compose-campaign`,e}({}),Xi=`frontComponentHostCommunicationApi`;globalThis[Xi]??={};var X=globalThis.frontComponentHostCommunicationApi,Zi=()=>{let e=X.closeSidePanel;if(!r(e))throw Error(`closeSidePanelFunction is not set`);return e()},Qi=e=>{let t=X.copyToClipboard;if(!r(t))throw Error(`copyToClipboardFunction is not set`);return t(e)},$i=e=>{let t=process.env.applicationVariables;if(t)return JSON.parse(t)[e]},ea=e=>{let t=X.enqueueSnackbar;if(!r(t))throw Error(`enqueueSnackbarFunction is not set`);return t(e)},ta=(e,t,n,i)=>{let a=X.navigate;if(!r(a))throw Error(`navigateFunction is not set`);return a(e,t,n,i)},na=e=>{let t=X.openCommandConfirmationModal;if(!r(t))throw Error(`openCommandConfirmationModalFunction is not set`);return t(e)},ra=e=>{let t=X.openSidePanelPage;if(!r(t))throw Error(`openSidePanelPageFunction is not set`);return t(e)},Z=()=>{let e=X.unmountFrontComponent;if(!r(e))throw Error(`unmountFrontComponentFunction is not set`);return e()},ia=e=>{let t=X.updateProgress;if(!r(t))throw Error(`updateProgressFunction is not set`);return t(e)},aa=`__twentySdkExecutionContext__`,oa=`__twentySdkContextListeners__`,sa=()=>(globalThis.__twentySdkContextListeners__||(globalThis[oa]=new Set),globalThis[oa]),ca=()=>globalThis[aa],la=e=>{sa().add(e)},ua=e=>{sa().delete(e)},Q=e=>{let[t,r]=(0,n.useState)(()=>e(ca())),i=(0,n.useRef)(t);return(0,n.useEffect)(()=>{let t=()=>{let t=e(ca());t!==i.current&&(i.current=t,r(t))};return la(t),t(),()=>ua(t)},[e]),t},da=e=>e.frontComponentId,$=()=>Q(da),fa=e=>e.selectedRecordIds.length===1?e.selectedRecordIds[0]:null,pa=()=>Q(fa),ma=e=>e.selectedRecordIds,ha=()=>Q(ma),ga=e=>e.userId,_a=()=>Q(ga),va=e=>`${e}-command-error`,ya=({execute:e})=>{let[t,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t||(r(!0),(async()=>{await e(),await Z()})())},[e,t,$()]),null},ba=({to:e,params:t,queryParams:r,options:i})=>{let[a,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{a||(o(!0),(async()=>{await ta(e,t,r,i),await Z()})())},[e,t,r,i,a,$()]),null},xa=({page:e,pageTitle:t,pageIcon:r,onClick:i,shouldResetSearchState:a=!1})=>{let[o,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{o||(s(!0),(async()=>{i?.(),await ra({page:e,pageTitle:t,pageIcon:r,shouldResetSearchState:a}),await Z()})())},[e,t,r,a,i,o,$()]),null},Sa=({title:e,subtitle:t,execute:r,confirmButtonText:i,confirmButtonAccent:a})=>{let[o,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{o||(s(!0),(async()=>{await na({title:e,subtitle:t,confirmButtonText:i,confirmButtonAccent:a})===`confirm`&&await r(),await Z()})())},[e,t,r,i,a,o,$()]),null};exports.AppPath=zi,exports.Command=ya,exports.CommandLink=ba,exports.CommandModal=Sa,exports.CommandOpenSidePanelPage=xa,exports.SidePanelPages=Yi,exports.closeSidePanel=Zi,exports.copyToClipboard=Qi,exports.enqueueSnackbar=ea,exports.getApplicationVariable=$i,exports.getFrontComponentCommandErrorDedupeKey=va,exports.navigate=ta,exports.openCommandConfirmationModal=na,exports.openSidePanelPage=ra,exports.unmountFrontComponent=Z,exports.updateProgress=ia,exports.useFrontComponentExecutionContext=Q,exports.useFrontComponentId=$,exports.useRecordId=pa,exports.useSelectedRecordIds=ha,exports.useUserId=_a;
|
|
20
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=v,c=!s.jitless,l=c&&ne.value,u=t.catchall,f;e._zod.parse=(s,d)=>{f??=r.value;let p=s.value;return o(p)?c&&l&&d?.async===!1&&d.jitless!==!0?(a||=i(t.shape),s=a(s,d),u?Kt([],p,s,d,f,e):s):n(s,d):(s.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),s)}});function Yt(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=>!C(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=>T(e,r,c())))}),t)}var Xt=i(`$ZodUnion`,(e,t)=>{P.init(e,t),h(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),h(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),h(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),h(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=>p(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=>Yt(t,i,e,a)):Yt(s,i,e,a)}}),Zt=i(`$ZodIntersection`,(e,t)=>{P.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])=>Qt(e,t,n)):Qt(e,i,a)}});function R(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(y(e)&&y(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=R(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=R(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 Qt(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),C(e))return e;let r=R(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var $t=i(`$ZodEnum`,(e,t)=>{P.init(e,t);let n=l(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ie.has(typeof e)).map(e=>typeof e==`string`?b(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}}),en=i(`$ZodTransform`,(e,t)=>{P.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new o(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 a;return n.value=i,n}});function tn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var nn=i(`$ZodOptional`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,h(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),h(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${p(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=>tn(t,e.value)):tn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),rn=i(`$ZodNullable`,(e,t)=>{P.init(e,t),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(e._zod,`optout`,()=>t.innerType._zod.optout),h(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${p(e.source)}|null)$`):void 0}),h(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)}),an=i(`$ZodDefault`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,h(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=>on(e,t)):on(r,t)}});function on(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var sn=i(`$ZodPrefault`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,h(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=i(`$ZodNonOptional`,(e,t)=>{P.init(e,t),h(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=>ln(t,e)):ln(i,e)}});function ln(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 un=i(`$ZodCatch`,(e,t)=>{P.init(e,t),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(e._zod,`optout`,()=>t.innerType._zod.optout),h(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=>T(e,n,c()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>T(e,n,c()))},input:e.value}),e.issues=[]),e)}}),dn=i(`$ZodPipe`,(e,t)=>{P.init(e,t),h(e._zod,`values`,()=>t.in._zod.values),h(e._zod,`optin`,()=>t.in._zod.optin),h(e._zod,`optout`,()=>t.out._zod.optout),h(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=>z(e,t.in,n)):z(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>z(e,t.out,n)):z(r,t.out,n)}});function z(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var fn=i(`$ZodReadonly`,(e,t)=>{P.init(e,t),h(e._zod,`propValues`,()=>t.innerType._zod.propValues),h(e._zod,`values`,()=>t.innerType._zod.values),h(e._zod,`optin`,()=>t.innerType._zod.optin),h(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(pn):pn(r)}});function pn(e){return e.value=Object.freeze(e.value),e}var mn=i(`$ZodCustom`,(e,t)=>{M.init(e,t),P.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=>hn(t,n,r,e));hn(i,n,r,e)}});function hn(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(D(e))}}var gn=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 _n(){return new gn}var B=_n();function vn(e,t){return new e({type:`string`,...S(t)})}function yn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...S(t)})}function bn(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...S(t)})}function xn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...S(t)})}function Sn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...S(t)})}function Cn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...S(t)})}function wn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...S(t)})}function Tn(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...S(t)})}function En(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...S(t)})}function Dn(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...S(t)})}function On(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...S(t)})}function kn(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...S(t)})}function An(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...S(t)})}function jn(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...S(t)})}function Mn(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...S(t)})}function Nn(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...S(t)})}function Pn(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...S(t)})}function Fn(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...S(t)})}function In(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...S(t)})}function Ln(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...S(t)})}function Rn(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...S(t)})}function zn(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...S(t)})}function Bn(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...S(t)})}function Vn(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...S(t)})}function Hn(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...S(t)})}function Un(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...S(t)})}function Wn(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...S(t)})}function Gn(e){return new e({type:`unknown`})}function Kn(e,t){return new e({type:`never`,...S(t)})}function qn(e,t){return new rt({check:`max_length`,...S(t),maximum:e})}function V(e,t){return new it({check:`min_length`,...S(t),minimum:e})}function Jn(e,t){return new at({check:`length_equals`,...S(t),length:e})}function Yn(e,t){return new ot({check:`string_format`,format:`regex`,...S(t),pattern:e})}function Xn(e){return new st({check:`string_format`,format:`lowercase`,...S(e)})}function Zn(e){return new ct({check:`string_format`,format:`uppercase`,...S(e)})}function Qn(e,t){return new lt({check:`string_format`,format:`includes`,...S(t),includes:e})}function $n(e,t){return new ut({check:`string_format`,format:`starts_with`,...S(t),prefix:e})}function er(e,t){return new dt({check:`string_format`,format:`ends_with`,...S(t),suffix:e})}function H(e){return new ft({check:`overwrite`,tx:e})}function tr(e){return H(t=>t.normalize(e))}function nr(){return H(e=>e.trim())}function rr(){return H(e=>e.toLowerCase())}function ir(){return H(e=>e.toUpperCase())}function ar(e,t,n){return new e({type:`array`,element:t,...S(n)})}function or(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...S(n)})}function sr(e){let t=cr(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(D(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(D(r))}},e(n.value,n)));return t}function cr(e,t){let n=new M({check:`custom`,...S(t)});return n._zod.check=e,n}var lr=i(`ZodISODateTime`,(e,t)=>{Et.init(e,t),G.init(e,t)});function ur(e){return Vn(lr,e)}var dr=i(`ZodISODate`,(e,t)=>{Dt.init(e,t),G.init(e,t)});function fr(e){return Hn(dr,e)}var pr=i(`ZodISOTime`,(e,t)=>{Ot.init(e,t),G.init(e,t)});function mr(e){return Un(pr,e)}var hr=i(`ZodISODuration`,(e,t)=>{kt.init(e,t),G.init(e,t)});function gr(e){return Wn(hr,e)}var _r=(e,t)=>{he.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ve(e,t)},flatten:{value:t=>_e(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,u,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,u,2)}},isEmpty:{get(){return e.issues.length===0}}})};i(`ZodError`,_r);var U=i(`ZodError`,_r,{Parent:Error}),vr=O(U),yr=k(U),br=A(U),xr=j(U),Sr=xe(U),Cr=Se(U),wr=Ce(U),Tr=we(U),Er=Te(U),Dr=Ee(U),Or=De(U),kr=Oe(U),W=i(`ZodType`,(e,t)=>(P.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(_(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>x(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>vr(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>br(e,t,n),e.parseAsync=async(t,n)=>yr(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>xr(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Sr(e,t,n),e.decode=(t,n)=>Cr(e,t,n),e.encodeAsync=async(t,n)=>wr(e,t,n),e.decodeAsync=async(t,n)=>Tr(e,t,n),e.safeEncode=(t,n)=>Er(e,t,n),e.safeDecode=(t,n)=>Dr(e,t,n),e.safeEncodeAsync=async(t,n)=>Or(e,t,n),e.safeDecodeAsync=async(t,n)=>kr(e,t,n),e.refine=(t,n)=>e.check(ki(t,n)),e.superRefine=t=>e.check(Ai(t)),e.overwrite=t=>e.check(H(t)),e.optional=()=>pi(e),e.nullable=()=>hi(e),e.nullish=()=>pi(hi(e)),e.nonoptional=t=>xi(e,t),e.array=()=>ni(e),e.or=t=>oi([e,t]),e.and=t=>ci(e,t),e.transform=t=>Ti(e,di(t)),e.default=t=>_i(e,t),e.prefault=t=>yi(e,t),e.catch=t=>Ci(e,t),e.pipe=t=>Ti(e,t),e.readonly=()=>Di(e),e.describe=t=>{let n=e.clone();return B.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return B.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return B.get(e);let n=e.clone();return B.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ar=i(`_ZodString`,(e,t)=>{F.init(e,t),W.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(Yn(...t)),e.includes=(...t)=>e.check(Qn(...t)),e.startsWith=(...t)=>e.check($n(...t)),e.endsWith=(...t)=>e.check(er(...t)),e.min=(...t)=>e.check(V(...t)),e.max=(...t)=>e.check(qn(...t)),e.length=(...t)=>e.check(Jn(...t)),e.nonempty=(...t)=>e.check(V(1,...t)),e.lowercase=t=>e.check(Xn(t)),e.uppercase=t=>e.check(Zn(t)),e.trim=()=>e.check(nr()),e.normalize=(...t)=>e.check(tr(...t)),e.toLowerCase=()=>e.check(rr()),e.toUpperCase=()=>e.check(ir())}),jr=i(`ZodString`,(e,t)=>{F.init(e,t),Ar.init(e,t),e.email=t=>e.check(yn(Nr,t)),e.url=t=>e.check(Tn(Fr,t)),e.jwt=t=>e.check(Bn(Xr,t)),e.emoji=t=>e.check(En(Ir,t)),e.guid=t=>e.check(bn(Pr,t)),e.uuid=t=>e.check(xn(K,t)),e.uuidv4=t=>e.check(Sn(K,t)),e.uuidv6=t=>e.check(Cn(K,t)),e.uuidv7=t=>e.check(wn(K,t)),e.nanoid=t=>e.check(Dn(Lr,t)),e.guid=t=>e.check(bn(Pr,t)),e.cuid=t=>e.check(On(Rr,t)),e.cuid2=t=>e.check(kn(zr,t)),e.ulid=t=>e.check(An(Br,t)),e.base64=t=>e.check(Ln(qr,t)),e.base64url=t=>e.check(Rn(Jr,t)),e.xid=t=>e.check(jn(Vr,t)),e.ksuid=t=>e.check(Mn(Hr,t)),e.ipv4=t=>e.check(Nn(Ur,t)),e.ipv6=t=>e.check(Pn(Wr,t)),e.cidrv4=t=>e.check(Fn(Gr,t)),e.cidrv6=t=>e.check(In(Kr,t)),e.e164=t=>e.check(zn(Yr,t)),e.datetime=t=>e.check(ur(t)),e.date=t=>e.check(fr(t)),e.time=t=>e.check(mr(t)),e.duration=t=>e.check(gr(t))});function Mr(e){return vn(jr,e)}var G=i(`ZodStringFormat`,(e,t)=>{I.init(e,t),Ar.init(e,t)}),Nr=i(`ZodEmail`,(e,t)=>{_t.init(e,t),G.init(e,t)}),Pr=i(`ZodGUID`,(e,t)=>{ht.init(e,t),G.init(e,t)}),K=i(`ZodUUID`,(e,t)=>{gt.init(e,t),G.init(e,t)}),Fr=i(`ZodURL`,(e,t)=>{vt.init(e,t),G.init(e,t)}),Ir=i(`ZodEmoji`,(e,t)=>{yt.init(e,t),G.init(e,t)}),Lr=i(`ZodNanoID`,(e,t)=>{bt.init(e,t),G.init(e,t)}),Rr=i(`ZodCUID`,(e,t)=>{xt.init(e,t),G.init(e,t)}),zr=i(`ZodCUID2`,(e,t)=>{St.init(e,t),G.init(e,t)}),Br=i(`ZodULID`,(e,t)=>{Ct.init(e,t),G.init(e,t)}),Vr=i(`ZodXID`,(e,t)=>{wt.init(e,t),G.init(e,t)}),Hr=i(`ZodKSUID`,(e,t)=>{Tt.init(e,t),G.init(e,t)}),Ur=i(`ZodIPv4`,(e,t)=>{At.init(e,t),G.init(e,t)}),Wr=i(`ZodIPv6`,(e,t)=>{jt.init(e,t),G.init(e,t)}),Gr=i(`ZodCIDRv4`,(e,t)=>{Mt.init(e,t),G.init(e,t)}),Kr=i(`ZodCIDRv6`,(e,t)=>{Nt.init(e,t),G.init(e,t)}),qr=i(`ZodBase64`,(e,t)=>{Ft.init(e,t),G.init(e,t)}),Jr=i(`ZodBase64URL`,(e,t)=>{Lt.init(e,t),G.init(e,t)}),Yr=i(`ZodE164`,(e,t)=>{Rt.init(e,t),G.init(e,t)}),Xr=i(`ZodJWT`,(e,t)=>{Bt.init(e,t),G.init(e,t)}),Zr=i(`ZodUnknown`,(e,t)=>{Vt.init(e,t),W.init(e,t)});function Qr(){return Gn(Zr)}var $r=i(`ZodNever`,(e,t)=>{Ht.init(e,t),W.init(e,t)});function ei(e){return Kn($r,e)}var ti=i(`ZodArray`,(e,t)=>{Wt.init(e,t),W.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(V(t,n)),e.nonempty=t=>e.check(V(1,t)),e.max=(t,n)=>e.check(qn(t,n)),e.length=(t,n)=>e.check(Jn(t,n)),e.unwrap=()=>e.element});function ni(e,t){return ar(ti,e,t)}var ri=i(`ZodObject`,(e,t)=>{Jt.init(e,t),W.init(e,t),h(e,`shape`,()=>t.shape),e.keyof=()=>li(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Qr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Qr()}),e.strict=()=>e.clone({...e._zod.def,catchall:ei()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ce(e,t),e.safeExtend=t=>le(e,t),e.merge=t=>ue(e,t),e.pick=t=>oe(e,t),e.omit=t=>se(e,t),e.partial=(...t)=>de(fi,e,t[0]),e.required=(...t)=>fe(bi,e,t[0])});function ii(e,t){return new ri({type:`object`,shape:e??{},...S(t)})}var ai=i(`ZodUnion`,(e,t)=>{Xt.init(e,t),W.init(e,t),e.options=t.options});function oi(e,t){return new ai({type:`union`,options:e,...S(t)})}var si=i(`ZodIntersection`,(e,t)=>{Zt.init(e,t),W.init(e,t)});function ci(e,t){return new si({type:`intersection`,left:e,right:t})}var q=i(`ZodEnum`,(e,t)=>{$t.init(e,t),W.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 q({...t,checks:[],...S(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 q({...t,checks:[],...S(r),entries:i})}});function li(e,t){return new q({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...S(t)})}var ui=i(`ZodTransform`,(e,t)=>{en.init(e,t),W.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new o(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(D(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(D(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 ui({type:`transform`,transform:e})}var fi=i(`ZodOptional`,(e,t)=>{nn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pi(e){return new fi({type:`optional`,innerType:e})}var mi=i(`ZodNullable`,(e,t)=>{rn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hi(e){return new mi({type:`nullable`,innerType:e})}var gi=i(`ZodDefault`,(e,t)=>{an.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _i(e,t){return new gi({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():re(t)}})}var vi=i(`ZodPrefault`,(e,t)=>{sn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yi(e,t){return new vi({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():re(t)}})}var bi=i(`ZodNonOptional`,(e,t)=>{cn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xi(e,t){return new bi({type:`nonoptional`,innerType:e,...S(t)})}var Si=i(`ZodCatch`,(e,t)=>{un.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ci(e,t){return new Si({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var wi=i(`ZodPipe`,(e,t)=>{dn.init(e,t),W.init(e,t),e.in=t.in,e.out=t.out});function Ti(e,t){return new wi({type:`pipe`,in:e,out:t})}var Ei=i(`ZodReadonly`,(e,t)=>{fn.init(e,t),W.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Di(e){return new Ei({type:`readonly`,innerType:e})}var Oi=i(`ZodCustom`,(e,t)=>{mn.init(e,t),W.init(e,t)});function ki(e,t={}){return or(Oi,e,t)}function Ai(e){return sr(e)}var ji=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}(),Mi=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 ji(a))})}),t},e}(),Ni=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.`)},Pi=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},Fi=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 Mi().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=Ni(this.validationMetadatas.entries()),f=d.next();!f.done;f=d.next()){var p=Pi(f.value,2),m=p[0],h=p[1];e.prototype instanceof m&&u.push.apply(u,Fi([],Pi(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 Ii=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}()),Li,J;function Ri(e){if(Li)try{var t=Li.get(e);if(t||!J||!J.fallback)return t}catch(e){if(!J||!J.fallbackOnErrors)throw e}return Ii.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 Ri(this.target)},enumerable:!1,configurable:!0}),e})();var zi=function(e){return e.Verify=`/verify`,e.VerifyEmail=`/verify-email`,e.SignInUp=`/welcome`,e.Invite=`/invite/:workspaceInviteHash`,e.ResetPassword=`/reset-password/:passwordResetToken`,e.CreateWorkspace=`/create/workspace`,e.CreateProfile=`/create/profile`,e.SyncEmails=`/sync/emails`,e.InviteTeam=`/invite-team`,e.PlanRequired=`/plan-required`,e.PlanRequiredSuccess=`/plan-required/payment-success`,e.BookCallDecision=`/book-call-decision`,e.BookCall=`/book-call`,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.NotFoundWildcard=`*`,e.NotFound=`/not-found`,e}({}),Y=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}({}),Bi=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}({}),Vi={type:Y.ACTOR,properties:[{name:`source`,type:Y.SELECT,hidden:!1,isRequired:!0,options:Object.keys(Bi).map((e,n)=>({id:(0,t.v4)(),label:`${Bi[e].toLowerCase()}`,value:e,position:n}))},{name:`workspaceMemberId`,type:Y.UUID,hidden:`input`,isRequired:!1},{name:`name`,type:Y.TEXT,hidden:`input`,isRequired:!0},{name:`context`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},Hi={type:Y.ADDRESS,properties:[{name:`addressStreet1`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressStreet2`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressCity`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressPostcode`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressState`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressCountry`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`addressLat`,type:Y.NUMERIC,hidden:!1,isRequired:!1},{name:`addressLng`,type:Y.NUMERIC,hidden:!1,isRequired:!1}]},Ui={type:Y.CURRENCY,properties:[{name:`amountMicros`,type:Y.NUMERIC,hidden:!1,isRequired:!1},{name:`currencyCode`,type:Y.TEXT,hidden:!1,isRequired:!1}]},Wi={type:Y.EMAILS,properties:[{name:`primaryEmail`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalEmails`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},Gi={type:Y.FULL_NAME,properties:[{name:`firstName`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1},{name:`lastName`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!1}]},Ki={type:Y.LINKS,properties:[{name:`primaryLinkLabel`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`primaryLinkUrl`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`secondaryLinks`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},qi={type:Y.PHONES,properties:[{name:`primaryPhoneNumber`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCountryCode`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`primaryPhoneCallingCode`,type:Y.TEXT,hidden:!1,isRequired:!1,isIncludedInUniqueConstraint:!0},{name:`additionalPhones`,type:Y.RAW_JSON,hidden:!1,isRequired:!1}]},Ji={type:Y.RICH_TEXT,properties:[{name:`blocknote`,type:Y.TEXT,hidden:!1,isRequired:!1},{name:`markdown`,type:Y.TEXT,hidden:!1,isRequired:!1}]};ii({blocknote:Mr().nullable().optional(),markdown:Mr().nullable()}),new Map([[Y.LINKS,Ki],[Y.CURRENCY,Ui],[Y.FULL_NAME,Gi],[Y.ADDRESS,Hi],[Y.ACTOR,Vi],[Y.EMAILS,Wi],[Y.PHONES,qi],[Y.RICH_TEXT,Ji]]);var Yi=function(e){return e.CommandMenuDisplay=`command-menu-display`,e.ViewRecord=`view-record`,e.MergeRecords=`merge-records`,e.UpdateRecords=`update-records`,e.ViewCalendarEvent=`view-calendar-event`,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.ViewPreviousAiChats=`view-previous-ai-chats`,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.ComposeCampaign=`compose-campaign`,e}({}),Xi=`frontComponentHostCommunicationApi`;globalThis[Xi]??={};var X=globalThis.frontComponentHostCommunicationApi,Zi=()=>{let e=X.closeSidePanel;if(!r(e))throw Error(`closeSidePanelFunction is not set`);return e()},Qi=e=>{let t=X.copyToClipboard;if(!r(t))throw Error(`copyToClipboardFunction is not set`);return t(e)},$i=e=>{let t=process.env.applicationVariables;if(t)return JSON.parse(t)[e]},ea=e=>{let t=X.enqueueSnackbar;if(!r(t))throw Error(`enqueueSnackbarFunction is not set`);return t(e)},ta=(e,t,n,i)=>{let a=X.navigate;if(!r(a))throw Error(`navigateFunction is not set`);return a(e,t,n,i)},na=e=>{let t=X.openCommandConfirmationModal;if(!r(t))throw Error(`openCommandConfirmationModalFunction is not set`);return t(e)},ra=e=>{let t=X.openSidePanelPage;if(!r(t))throw Error(`openSidePanelPageFunction is not set`);return t(e)},Z=()=>{let e=X.unmountFrontComponent;if(!r(e))throw Error(`unmountFrontComponentFunction is not set`);return e()},ia=e=>{let t=X.updateProgress;if(!r(t))throw Error(`updateProgressFunction is not set`);return t(e)},aa=`__twentySdkExecutionContext__`,oa=`__twentySdkContextListeners__`,sa=()=>(globalThis.__twentySdkContextListeners__||(globalThis[oa]=new Set),globalThis[oa]),ca=()=>globalThis[aa],la=e=>{sa().add(e)},ua=e=>{sa().delete(e)},Q=e=>{let[t,r]=(0,n.useState)(()=>e(ca())),i=(0,n.useRef)(t);return(0,n.useEffect)(()=>{let t=()=>{let t=e(ca());t!==i.current&&(i.current=t,r(t))};return la(t),t(),()=>ua(t)},[e]),t},da=e=>e.colorScheme,fa=()=>Q(da),pa=e=>e.frontComponentId,$=()=>Q(pa),ma=e=>e.selectedRecordIds.length===1?e.selectedRecordIds[0]:null,ha=()=>Q(ma),ga=e=>e.selectedRecordIds,_a=()=>Q(ga),va=e=>e.userId,ya=()=>Q(va),ba=e=>`${e}-command-error`,xa=({execute:e})=>{let[t,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t||(r(!0),(async()=>{await e(),await Z()})())},[e,t,$()]),null},Sa=({to:e,params:t,queryParams:r,options:i})=>{let[a,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{a||(o(!0),(async()=>{await ta(e,t,r,i),await Z()})())},[e,t,r,i,a,$()]),null},Ca=({page:e,pageTitle:t,pageIcon:r,onClick:i,shouldResetSearchState:a=!1})=>{let[o,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{o||(s(!0),(async()=>{i?.(),await ra({page:e,pageTitle:t,pageIcon:r,shouldResetSearchState:a}),await Z()})())},[e,t,r,a,i,o,$()]),null},wa=({title:e,subtitle:t,execute:r,confirmButtonText:i,confirmButtonAccent:a})=>{let[o,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{o||(s(!0),(async()=>{await na({title:e,subtitle:t,confirmButtonText:i,confirmButtonAccent:a})===`confirm`&&await r(),await Z()})())},[e,t,r,i,a,o,$()]),null};exports.AppPath=zi,exports.Command=xa,exports.CommandLink=Sa,exports.CommandModal=wa,exports.CommandOpenSidePanelPage=Ca,exports.SidePanelPages=Yi,exports.closeSidePanel=Zi,exports.copyToClipboard=Qi,exports.enqueueSnackbar=ea,exports.getApplicationVariable=$i,exports.getFrontComponentCommandErrorDedupeKey=ba,exports.navigate=ta,exports.openCommandConfirmationModal=na,exports.openSidePanelPage=ra,exports.unmountFrontComponent=Z,exports.updateProgress=ia,exports.useColorScheme=fa,exports.useFrontComponentExecutionContext=Q,exports.useFrontComponentId=$,exports.useRecordId=ha,exports.useSelectedRecordIds=_a,exports.useUserId=ya;
|
|
21
21
|
//# sourceMappingURL=index.cjs.map
|