@rimori/playwright-testing 0.3.28 → 0.3.29-next.1
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/README.md +4 -4
- package/dist/core/MessageChannelSimulator.js +2 -2
- package/dist/core/RimoriTestEnvironment.d.ts +1 -1
- package/dist/core/RimoriTestEnvironment.js +3 -3
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_client__loadShare__.mjs.js +5 -8
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_react_mf_2_client__loadShare__.mjs.js +51 -69
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs.js +1 -1
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_1_jsx_mf_2_dev_mf_2_runtime__loadShare__.mjs.js +1 -9
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs.js +9 -25
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__zod__loadShare__.mjs.js +1 -1
- package/dist/harness/hostInit.js +1 -1
- package/dist/harness/index.html +0 -1
- package/dist/harness/index.js +1 -1
- package/dist/harness/localSharedImportMap.js +1 -1
- package/dist/harness/preload-helper.js +1 -1
- package/dist/harness/remoteEntry.js +1 -7
- package/dist/harness/rolldown-runtime.js +1 -0
- package/dist/harness/virtualExposes.js +1 -1
- package/dist/harness/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__rimori-scenario-host__remoteEntry-_hash_.js +4 -0
- package/package.json +7 -7
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react__loadShare__.mjs.js +0 -9
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react__loadShare__.mjs_commonjs-proxy.js +0 -1
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs.js +0 -9
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_2_dom__loadShare__.mjs.js +0 -9
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function St(r,e){for(var t=0;t<e.length;t++){const s=e[t];if(typeof s!="string"&&!Array.isArray(s)){for(const n in s)if(n!=="default"&&!(n in r)){const a=Object.getOwnPropertyDescriptor(s,n);a&&Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:()=>s[n]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var v;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var pe;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(pe||(pe={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(r)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Ie=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class w extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,f=0;for(;f<i.path.length;){const l=i.path[f];f===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(i))):o[l]=o[l]||{_errors:[]},o=o[l],f++}}};return n(this),s}static assert(e){if(!(e instanceof w))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,v.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}w.create=r=>new w(r);const W=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:v.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(r)}return{message:t}};let Me=W;function $e(r){Me=r}function ce(){return Me}const ue=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const f=s.filter(l=>!!l).slice().reverse();for(const l of f)o=l(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},Pe=[];function c(r,e){const t=ce(),s=ue({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===W?void 0:W].filter(n=>!!n)});r.common.issues.push(s)}class b{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return b.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),B=r=>({status:"dirty",value:r}),k=r=>({status:"valid",value:r}),ye=r=>r.status==="aborted",ge=r=>r.status==="dirty",D=r=>r.status==="valid",H=r=>typeof Promise<"u"&&r instanceof Promise;var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));class E{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ee=(r,e)=>{if(D(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new w(r.common.issues);return this._error=t,this._error}}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:f}=r;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??s??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:n}}class p{get description(){return this._def.description}_getType(e){return A(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(H(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},n=this._parseSync({data:e,path:s.path,parent:s});return Ee(s,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:t});return D(s)?{value:s.value}:{issues:t.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(s=>D(s)?{value:s.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(H(n)?n:Promise.resolve(n));return Ee(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new T({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return C.create(this,this._def)}nullable(){return V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return O.create(this)}promise(){return J.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new T({...y(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new xe({typeName:_.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ie({...y(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return de.create(this,e)}readonly(){return oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ot=/^c[^\s-]{8,}$/i,Ct=/^[0-9a-z]+$/,Nt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,At=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Et=/^[a-z0-9_-]{21}$/i,Rt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,It=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Mt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let we;const $t=/^(?:(?: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])$/,Pt=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Vt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,zt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Lt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ve="((\\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=new RegExp(`^${Ve}$`);function ze(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Bt(r){return new RegExp(`^${ze(r)}$`)}function Ze(r){let e=`${Ve}T${ze(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ft(r,e){return!!((e==="v4"||!e)&&$t.test(r)||(e==="v6"||!e)&&Vt.test(r))}function Wt(r,e){if(!Rt.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function qt(r,e){return!!((e==="v4"||!e)&&Pt.test(r)||(e==="v6"||!e)&&zt.test(r))}class S extends p{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.string,received:a.parsedType}),m}const s=new b;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&c(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")It.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")we||(we=new RegExp(Mt,"u")),we.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")At.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")Et.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")Ot.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")Ct.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")Nt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ulid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),c(n,{validation:"url",code:d.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"regex",code:d.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ze(a).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?Ut.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Bt(a).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?jt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Ft(e.data,a.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?Wt(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"jwt",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?qt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cidr",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?Dt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?Lt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64url",code:d.invalid_string,message:a.message}),s.dirty()):v.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...h.errToObj(s)})}_addCheck(e){return new S({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new S({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}S.create=r=>new S({checks:[],typeName:_.ZodString,coerce:r?.coerce??!1,...y(r)});function Jt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=Number.parseInt(r.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class M extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.number,received:a.parsedType}),m}let s;const n=new b;for(const a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Jt(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{code:d.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}M.create=r=>new M({checks:[],typeName:_.ZodNumber,coerce:r?.coerce||!1,...y(r)});class $ extends p{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let s;const n=new b;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}$.create=r=>new $({checks:[],typeName:_.ZodBigInt,coerce:r?.coerce??!1,...y(r)});class K extends p{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:u.boolean,received:s.parsedType}),m}return k(e.data)}}K.create=r=>new K({typeName:_.ZodBoolean,coerce:r?.coerce||!1,...y(r)});class L extends p{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_date}),m}const s=new b;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):v.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}L.create=r=>new L({checks:[],coerce:r?.coerce||!1,typeName:_.ZodDate,...y(r)});class le extends p{_parse(e){if(this._getType(e)!==u.symbol){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:u.symbol,received:s.parsedType}),m}return k(e.data)}}le.create=r=>new le({typeName:_.ZodSymbol,...y(r)});class G extends p{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:u.undefined,received:s.parsedType}),m}return k(e.data)}}G.create=r=>new G({typeName:_.ZodUndefined,...y(r)});class Q extends p{_parse(e){if(this._getType(e)!==u.null){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:u.null,received:s.parsedType}),m}return k(e.data)}}Q.create=r=>new Q({typeName:_.ZodNull,...y(r)});class q extends p{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}}q.create=r=>new q({typeName:_.ZodAny,...y(r)});class z extends p{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}}z.create=r=>new z({typeName:_.ZodUnknown,...y(r)});class R extends p{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}R.create=r=>new R({typeName:_.ZodNever,...y(r)});class fe extends p{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:u.void,received:s.parsedType}),m}return k(e.data)}}fe.create=r=>new fe({typeName:_.ZodVoid,...y(r)});class O extends p{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(c(t,{code:i?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(c(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new E(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new E(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new O({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new O({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new O({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}O.create=(r,e)=>new O({type:r,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...y(e)});function Y(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=C.create(Y(s))}return new x({...r._def,shape:()=>e})}else return r instanceof O?new O({...r._def,type:Y(r.element)}):r instanceof C?C.create(Y(r.unwrap())):r instanceof V?V.create(Y(r.unwrap())):r instanceof N?N.create(r.items.map(e=>Y(e))):r}class x extends p{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const l=this._getOrReturnCtx(e);return c(l,{code:d.invalid_type,expected:u.object,received:l.parsedType}),m}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof R&&this._def.unknownKeys==="strip"))for(const l in n.data)i.includes(l)||o.push(l);const f=[];for(const l of i){const g=a[l],Z=n.data[l];f.push({key:{status:"valid",value:l},value:g._parse(new E(n,Z,n.path,l)),alwaysSet:l in n.data})}if(this._def.catchall instanceof R){const l=this._def.unknownKeys;if(l==="passthrough")for(const g of o)f.push({key:{status:"valid",value:g},value:{status:"valid",value:n.data[g]}});else if(l==="strict")o.length>0&&(c(n,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const g of o){const Z=n.data[g];f.push({key:{status:"valid",value:g},value:l._parse(new E(n,Z,n.path,g)),alwaysSet:g in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const l=[];for(const g of f){const Z=await g.key,Ae=await g.value;l.push({key:Z,value:Ae,alwaysSet:g.alwaysSet})}return l}).then(l=>b.mergeObjectSync(s,l)):b.mergeObjectSync(s,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{const n=this._def.errorMap?.(t,s).message??s.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const s of v.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const s of v.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}deepPartial(){return Y(this)}partial(e){const t={};for(const s of v.objectKeys(this.shape)){const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const s of v.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof C;)a=a._def.innerType;t[s]=a}return new x({...this._def,shape:()=>t})}keyof(){return De(v.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:R.create(),typeName:_.ZodObject,...y(e)});x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:R.create(),typeName:_.ZodObject,...y(e)});x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:R.create(),typeName:_.ZodObject,...y(e)});class X extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new w(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const f of s){const l={...t,common:{...t.common,issues:[]},parent:null},g=f._parseSync({data:t.data,path:t.path,parent:l});if(g.status==="valid")return g;g.status==="dirty"&&!a&&(a={result:g,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(f=>new w(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}X.create=(r,e)=>new X({options:r,typeName:_.ZodUnion,...y(e)});const j=r=>r instanceof re?j(r.schema):r instanceof T?j(r.innerType()):r instanceof se?[r.value]:r instanceof P?r.options:r instanceof ne?v.objectValues(r.enum):r instanceof ae?j(r._def.innerType):r instanceof G?[void 0]:r instanceof Q?[null]:r instanceof C?[void 0,...j(r.unwrap())]:r instanceof V?[null,...j(r.unwrap())]:r instanceof xe||r instanceof oe?j(r.unwrap()):r instanceof ie?j(r._def.innerType):[];class _e extends p{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=j(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new _e({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(s)})}}function Te(r,e){const t=A(r),s=A(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){const n=v.objectKeys(e),a=v.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const f=Te(r[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],f=Te(i,o);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class ee extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(ye(a)||ye(i))return m;const o=Te(a.value,i.value);return o.valid?((ge(a)||ge(i))&&t.dirty(),{status:t.value,value:o.data}):(c(s,{code:d.invalid_intersection_types}),m)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ee.create=(r,e,t)=>new ee({left:r,right:e,typeName:_.ZodIntersection,...y(t)});class N extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return c(s,{code:d.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return c(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(c(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new E(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new N({...this._def,rest:e})}}N.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:r,typeName:_.ZodTuple,rest:null,...y(e)})};class te extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.object)return c(s,{code:d.invalid_type,expected:u.object,received:s.parsedType}),m;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new E(s,o,s.path,o)),value:i._parse(new E(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof p?new te({keyType:e,valueType:t,typeName:_.ZodRecord,...y(s)}):new te({keyType:S.create(),valueType:e,typeName:_.ZodRecord,...y(t)})}}class he extends p{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return c(s,{code:d.invalid_type,expected:u.map,received:s.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,f],l)=>({key:n._parse(new E(s,o,s.path,[l,"key"])),value:a._parse(new E(s,f,s.path,[l,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const l=await f.key,g=await f.value;if(l.status==="aborted"||g.status==="aborted")return m;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(l.value,g.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const l=f.key,g=f.value;if(l.status==="aborted"||g.status==="aborted")return m;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(l.value,g.value)}return{status:t.value,value:o}}}}he.create=(r,e,t)=>new he({valueType:e,keyType:r,typeName:_.ZodMap,...y(t)});class U extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return c(s,{code:d.invalid_type,expected:u.set,received:s.parsedType}),m;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(c(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(c(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(f){const l=new Set;for(const g of f){if(g.status==="aborted")return m;g.status==="dirty"&&t.dirty(),l.add(g.value)}return{status:t.value,value:l}}const o=[...s.data.values()].map((f,l)=>a._parse(new E(s,f,s.path,l)));return s.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new U({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}U.create=(r,e)=>new U({valueType:r,minSize:null,maxSize:null,typeName:_.ZodSet,...y(e)});class F extends p{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return c(t,{code:d.invalid_type,expected:u.function,received:t.parsedType}),m;function s(o,f){return ue({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ce(),W].filter(l=>!!l),issueData:{code:d.invalid_arguments,argumentsError:f}})}function n(o,f){return ue({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ce(),W].filter(l=>!!l),issueData:{code:d.invalid_return_type,returnTypeError:f}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof J){const o=this;return k(async function(...f){const l=new w([]),g=await o._def.args.parseAsync(f,a).catch(ke=>{throw l.addIssue(s(f,ke)),l}),Z=await Reflect.apply(i,this,g);return await o._def.returns._def.type.parseAsync(Z,a).catch(ke=>{throw l.addIssue(n(Z,ke)),l})})}else{const o=this;return k(function(...f){const l=o._def.args.safeParse(f,a);if(!l.success)throw new w([s(f,l.error)]);const g=Reflect.apply(i,this,l.data),Z=o._def.returns.safeParse(g,a);if(!Z.success)throw new w([n(g,Z.error)]);return Z.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new F({...this._def,args:N.create(e).rest(z.create())})}returns(e){return new F({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new F({args:e||N.create([]).rest(z.create()),returns:t||z.create(),typeName:_.ZodFunction,...y(s)})}}class re extends p{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}re.create=(r,e)=>new re({getter:r,typeName:_.ZodLazy,...y(e)});class se extends p{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(r,e)=>new se({value:r,typeName:_.ZodLiteral,...y(e)});function De(r,e){return new P({values:r,typeName:_.ZodEnum,...y(e)})}class P extends p{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return c(t,{expected:v.joinValues(s),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:s}),m}return k(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return P.create(e,{...this._def,...t})}exclude(e,t=this._def){return P.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}P.create=De;class ne extends p{_parse(e){const t=v.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){const n=v.objectValues(t);return c(s,{expected:v.joinValues(n),received:s.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=v.objectValues(t);return c(s,{received:s.data,code:d.invalid_enum_value,options:n}),m}return k(e.data)}get enum(){return this._def.values}}ne.create=(r,e)=>new ne({values:r,typeName:_.ZodNativeEnum,...y(e)});class J extends p{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}J.create=(r,e)=>new J({type:r,typeName:_.ZodPromise,...y(e)});class T extends p{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{c(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?B(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?B(o.value):o}}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);if(s.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!D(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>D(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);v.assertNever(n)}}T.create=(r,e,t)=>new T({schema:r,typeName:_.ZodEffects,effect:e,...y(t)});T.createWithPreprocess=(r,e,t)=>new T({schema:e,effect:{type:"preprocess",transform:r},typeName:_.ZodEffects,...y(t)});class C extends p{_parse(e){return this._getType(e)===u.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}C.create=(r,e)=>new C({innerType:r,typeName:_.ZodOptional,...y(e)});class V extends p{_parse(e){return this._getType(e)===u.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(r,e)=>new V({innerType:r,typeName:_.ZodNullable,...y(e)});class ae extends p{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ae.create=(r,e)=>new ae({innerType:r,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ie extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return H(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new w(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new w(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ie.create=(r,e)=>new ie({innerType:r,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class me extends p{_parse(e){if(this._getType(e)!==u.nan){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}me.create=r=>new me({typeName:_.ZodNaN,...y(r)});const Le=Symbol("zod_brand");class xe extends p{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class de extends p{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),B(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new de({in:e,out:t,typeName:_.ZodPipeline})}}class oe extends p{_parse(e){const t=this._def.innerType._parse(e),s=n=>(D(n)&&(n.value=Object.freeze(n.value)),n);return H(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}oe.create=(r,e)=>new oe({innerType:r,typeName:_.ZodReadonly,...y(e)});function Re(r,e){const t=typeof r=="function"?r(e):typeof r=="string"?{message:r}:r;return typeof t=="string"?{message:t}:t}function Se(r,e={},t){return r?q.create().superRefine((s,n)=>{const a=r(s);if(a instanceof Promise)return a.then(i=>{if(!i){const o=Re(e,s),f=o.fatal??t??!0;n.addIssue({code:"custom",...o,fatal:f})}});if(!a){const i=Re(e,s),o=i.fatal??t??!0;n.addIssue({code:"custom",...i,fatal:o})}}):q.create()}const Ue={object:x.lazycreate};var _;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(_||(_={}));const Be=(r,e={message:`Input not instance of ${r.name}`})=>Se(t=>t instanceof r,e),Oe=S.create,Ce=M.create,Fe=me.create,We=$.create,Ne=K.create,qe=L.create,Je=le.create,Ye=G.create,He=Q.create,Ke=q.create,Ge=z.create,Qe=R.create,Xe=fe.create,et=O.create,tt=x.create,rt=x.strictCreate,st=X.create,nt=_e.create,at=ee.create,it=N.create,ot=te.create,dt=he.create,ct=U.create,ut=F.create,lt=re.create,ft=se.create,ht=P.create,mt=ne.create,_t=J.create,ve=T.create,pt=C.create,yt=V.create,gt=T.createWithPreprocess,vt=de.create,xt=()=>Oe().optional(),bt=()=>Ce().optional(),kt=()=>Ne().optional(),wt={string:r=>S.create({...r,coerce:!0}),number:r=>M.create({...r,coerce:!0}),boolean:r=>K.create({...r,coerce:!0}),bigint:r=>$.create({...r,coerce:!0}),date:r=>L.create({...r,coerce:!0})},Tt=m,je=Object.freeze(Object.defineProperty({__proto__:null,BRAND:Le,DIRTY:B,EMPTY_PATH:Pe,INVALID:m,NEVER:Tt,OK:k,ParseStatus:b,Schema:p,ZodAny:q,ZodArray:O,ZodBigInt:$,ZodBoolean:K,ZodBranded:xe,ZodCatch:ie,ZodDate:L,ZodDefault:ae,ZodDiscriminatedUnion:_e,ZodEffects:T,ZodEnum:P,ZodError:w,get ZodFirstPartyTypeKind(){return _},ZodFunction:F,ZodIntersection:ee,ZodIssueCode:d,ZodLazy:re,ZodLiteral:se,ZodMap:he,ZodNaN:me,ZodNativeEnum:ne,ZodNever:R,ZodNull:Q,ZodNullable:V,ZodNumber:M,ZodObject:x,ZodOptional:C,ZodParsedType:u,ZodPipeline:de,ZodPromise:J,ZodReadonly:oe,ZodRecord:te,ZodSchema:p,ZodSet:U,ZodString:S,ZodSymbol:le,ZodTransformer:T,ZodTuple:N,ZodType:p,ZodUndefined:G,ZodUnion:X,ZodUnknown:z,ZodVoid:fe,addIssueToContext:c,any:Ke,array:et,bigint:We,boolean:Ne,coerce:wt,custom:Se,date:qe,datetimeRegex:Ze,defaultErrorMap:W,discriminatedUnion:nt,effect:ve,enum:ht,function:ut,getErrorMap:ce,getParsedType:A,instanceof:Be,intersection:at,isAborted:ye,isAsync:H,isDirty:ge,isValid:D,late:Ue,lazy:lt,literal:ft,makeIssue:ue,map:dt,nan:Fe,nativeEnum:mt,never:Qe,null:He,nullable:yt,number:Ce,object:tt,get objectUtil(){return pe},oboolean:kt,onumber:bt,optional:pt,ostring:xt,pipeline:vt,preprocess:gt,promise:_t,quotelessJson:Ie,record:ot,set:ct,setErrorMap:$e,strictObject:rt,string:Oe,symbol:Je,transformer:ve,tuple:it,undefined:Ye,union:st,unknown:Ge,get util(){return v},void:Xe},Symbol.toStringTag,{value:"Module"})),Yt=Object.freeze(Object.defineProperty({__proto__:null,BRAND:Le,DIRTY:B,EMPTY_PATH:Pe,INVALID:m,NEVER:Tt,OK:k,ParseStatus:b,Schema:p,ZodAny:q,ZodArray:O,ZodBigInt:$,ZodBoolean:K,ZodBranded:xe,ZodCatch:ie,ZodDate:L,ZodDefault:ae,ZodDiscriminatedUnion:_e,ZodEffects:T,ZodEnum:P,ZodError:w,get ZodFirstPartyTypeKind(){return _},ZodFunction:F,ZodIntersection:ee,ZodIssueCode:d,ZodLazy:re,ZodLiteral:se,ZodMap:he,ZodNaN:me,ZodNativeEnum:ne,ZodNever:R,ZodNull:Q,ZodNullable:V,ZodNumber:M,ZodObject:x,ZodOptional:C,ZodParsedType:u,ZodPipeline:de,ZodPromise:J,ZodReadonly:oe,ZodRecord:te,ZodSchema:p,ZodSet:U,ZodString:S,ZodSymbol:le,ZodTransformer:T,ZodTuple:N,ZodType:p,ZodUndefined:G,ZodUnion:X,ZodUnknown:z,ZodVoid:fe,addIssueToContext:c,any:Ke,array:et,bigint:We,boolean:Ne,coerce:wt,custom:Se,date:qe,datetimeRegex:Ze,default:je,defaultErrorMap:W,discriminatedUnion:nt,effect:ve,enum:ht,function:ut,getErrorMap:ce,getParsedType:A,instanceof:Be,intersection:at,isAborted:ye,isAsync:H,isDirty:ge,isValid:D,late:Ue,lazy:lt,literal:ft,makeIssue:ue,map:dt,nan:Fe,nativeEnum:mt,never:Qe,null:He,nullable:yt,number:Ce,object:tt,get objectUtil(){return pe},oboolean:kt,onumber:bt,optional:pt,ostring:xt,pipeline:vt,preprocess:gt,promise:_t,quotelessJson:Ie,record:ot,set:ct,setErrorMap:$e,strictObject:rt,string:Oe,symbol:Je,transformer:ve,tuple:it,undefined:Ye,union:st,unknown:Ge,get util(){return v},void:Xe,z:je},Symbol.toStringTag,{value:"Module"})),be="__mf_module_cache__";globalThis[be]||={share:{},remote:{}};globalThis[be].share||={};globalThis[be].remote||={};const Zt=globalThis[be];let I=Zt.share.zod;I===void 0&&(I=Yt,Zt.share.zod=I);const Ht=I,Kt=I.__esModule?I.default:I.default??I,{z:Gt,defaultErrorMap:Qt,setErrorMap:Xt,getErrorMap:er,makeIssue:tr,EMPTY_PATH:rr,ParseStatus:sr,INVALID:nr,DIRTY:ar,OK:ir,isAborted:or,isDirty:dr,isValid:cr,isAsync:ur,addIssueToContext:lr,util:fr,objectUtil:hr,ZodParsedType:mr,getParsedType:_r,ZodType:pr,ZodString:yr,ZodNumber:gr,ZodBigInt:vr,ZodBoolean:xr,ZodDate:br,ZodSymbol:kr,ZodUndefined:wr,ZodNull:Tr,ZodAny:Zr,ZodUnknown:Sr,ZodNever:Or,ZodVoid:Cr,ZodArray:Nr,ZodObject:Ar,ZodUnion:Er,ZodDiscriminatedUnion:Rr,ZodIntersection:jr,ZodTuple:Ir,ZodRecord:Mr,ZodMap:$r,ZodSet:Pr,ZodFunction:Vr,ZodLazy:zr,ZodLiteral:Dr,ZodEnum:Lr,ZodNativeEnum:Ur,ZodPromise:Br,ZodEffects:Fr,ZodTransformer:Wr,ZodOptional:qr,ZodNullable:Jr,ZodDefault:Yr,ZodCatch:Hr,ZodNaN:Kr,BRAND:Gr,ZodBranded:Qr,ZodPipeline:Xr,ZodReadonly:es,Schema:ts,ZodSchema:rs,late:ss,ZodFirstPartyTypeKind:ns,coerce:as,any:is,array:os,bigint:ds,boolean:cs,date:us,discriminatedUnion:ls,effect:fs,enum:hs,function:ms,instanceof:_s,intersection:ps,lazy:ys,literal:gs,map:vs,nan:xs,nativeEnum:bs,never:ks,null:ws,nullable:Ts,number:Zs,object:Ss,oboolean:Os,onumber:Cs,optional:Ns,ostring:As,pipeline:Es,preprocess:Rs,promise:js,record:Is,set:Ms,strictObject:$s,string:Ps,symbol:Vs,transformer:zs,tuple:Ds,undefined:Ls,union:Us,unknown:Bs,void:Fs,NEVER:Ws,datetimeRegex:qs,custom:Js,ZodIssueCode:Ys,quotelessJson:Hs,ZodError:Ks}=I,Gs=St({__proto__:null,BRAND:Gr,DIRTY:ar,EMPTY_PATH:rr,INVALID:nr,NEVER:Ws,OK:ir,ParseStatus:sr,Schema:ts,ZodAny:Zr,ZodArray:Nr,ZodBigInt:vr,ZodBoolean:xr,ZodBranded:Qr,ZodCatch:Hr,ZodDate:br,ZodDefault:Yr,ZodDiscriminatedUnion:Rr,ZodEffects:Fr,ZodEnum:Lr,ZodError:Ks,ZodFirstPartyTypeKind:ns,ZodFunction:Vr,ZodIntersection:jr,ZodIssueCode:Ys,ZodLazy:zr,ZodLiteral:Dr,ZodMap:$r,ZodNaN:Kr,ZodNativeEnum:Ur,ZodNever:Or,ZodNull:Tr,ZodNullable:Jr,ZodNumber:gr,ZodObject:Ar,ZodOptional:qr,ZodParsedType:mr,ZodPipeline:Xr,ZodPromise:Br,ZodReadonly:es,ZodRecord:Mr,ZodSchema:rs,ZodSet:Pr,ZodString:yr,ZodSymbol:kr,ZodTransformer:Wr,ZodTuple:Ir,ZodType:pr,ZodUndefined:wr,ZodUnion:Er,ZodUnknown:Sr,ZodVoid:Cr,addIssueToContext:lr,any:is,array:os,bigint:ds,boolean:cs,coerce:as,custom:Js,date:us,datetimeRegex:qs,default:Kt,defaultErrorMap:Qt,discriminatedUnion:ls,effect:fs,enum:hs,function:ms,getErrorMap:er,getParsedType:_r,instanceof:_s,intersection:ps,isAborted:or,isAsync:ur,isDirty:dr,isValid:cr,late:ss,lazy:ys,literal:gs,makeIssue:tr,map:vs,nan:xs,nativeEnum:bs,never:ks,null:ws,nullable:Ts,number:Zs,object:Ss,objectUtil:hr,oboolean:Os,onumber:Cs,optional:Ns,ostring:As,pipeline:Es,preprocess:Rs,promise:js,quotelessJson:Hs,record:Is,set:Ms,setErrorMap:Xt,strictObject:$s,string:Ps,symbol:Vs,transformer:zs,tuple:Ds,undefined:Ls,union:Us,unknown:Bs,util:fr,void:Fs,z:Gt},[Ht]);export{Gs as _,Yt as a};
|
|
1
|
+
import{r as e}from"./rolldown-runtime.js";var t;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(t||={});var n;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(n||={});var r=t.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),i=e=>{switch(typeof e){case`undefined`:return r.undefined;case`string`:return r.string;case`number`:return Number.isNaN(e)?r.nan:r.number;case`boolean`:return r.boolean;case`function`:return r.function;case`bigint`:return r.bigint;case`symbol`:return r.symbol;case`object`:return Array.isArray(e)?r.array:e===null?r.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?r.promise:typeof Map<`u`&&e instanceof Map?r.map:typeof Set<`u`&&e instanceof Set?r.set:typeof Date<`u`&&e instanceof Date?r.date:r.object;default:return r.unknown}},a=t.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),o=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,`$1:`),s=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,t.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};s.create=e=>new s(e);var c=(e,n)=>{let i;switch(e.code){case a.invalid_type:i=e.received===r.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case a.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(e.expected,t.jsonStringifyReplacer)}`;break;case a.unrecognized_keys:i=`Unrecognized key(s) in object: ${t.joinValues(e.keys,`, `)}`;break;case a.invalid_union:i=`Invalid input`;break;case a.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${t.joinValues(e.options)}`;break;case a.invalid_enum_value:i=`Invalid enum value. Expected ${t.joinValues(e.options)}, received '${e.received}'`;break;case a.invalid_arguments:i=`Invalid function arguments`;break;case a.invalid_return_type:i=`Invalid function return type`;break;case a.invalid_date:i=`Invalid date`;break;case a.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(i=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(i=`${i} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?i=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?i=`Invalid input: must end with "${e.validation.endsWith}"`:t.assertNever(e.validation):i=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case a.too_small:i=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case a.too_big:i=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case a.custom:i=`Invalid input`;break;case a.invalid_intersection_types:i=`Intersection results could not be merged`;break;case a.not_multiple_of:i=`Number must be a multiple of ${e.multipleOf}`;break;case a.not_finite:i=`Number must be finite`;break;default:i=n.defaultError,t.assertNever(e)}return{message:i}},ee=c;function te(e){ee=e}function l(){return ee}var u=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},ne=[];function d(e,t){let n=l(),r=u({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===c?void 0:c].filter(e=>!!e)});e.common.issues.push(r)}var f=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return p;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return p;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},p=Object.freeze({status:`aborted`}),m=e=>({status:`dirty`,value:e}),h=e=>({status:`valid`,value:e}),re=e=>e.status===`aborted`,ie=e=>e.status===`dirty`,g=e=>e.status===`valid`,_=e=>typeof Promise<`u`&&e instanceof Promise,v;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(v||={});var y=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ae=(e,t)=>{if(g(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new s(e.common.issues);return this._error=t,this._error}}};function b(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var x=class{get description(){return this._def.description}_getType(e){return i(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new f,ctx:{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(_(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)};return ae(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return g(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>g(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parse({data:e,path:n.path,parent:n});return ae(n,await(_(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),o=()=>r.addIssue({code:a.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new K({schema:this,typeName:Q.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return q.create(this,this._def)}nullable(){return J.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return P.create(this)}promise(){return G.create(this,this._def)}or(e){return L.create([this,e],this._def)}and(e){return z.create(this,e,this._def)}transform(e){return new K({...b(this._def),schema:this,typeName:Q.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Y({...b(this._def),innerType:this,defaultValue:t,typeName:Q.ZodDefault})}brand(){return new Be({typeName:Q.ZodBranded,type:this,...b(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new X({...b(this._def),innerType:this,catchValue:t,typeName:Q.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ve.create(this,e)}readonly(){return Z.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},oe=/^c[^\s-]{8,}$/i,se=/^[0-9a-z]+$/,ce=/^[0-9A-HJKMNP-TV-Z]{26}$/i,le=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ue=/^[a-z0-9_-]{21}$/i,de=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,fe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,me=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,he,ge=/^(?:(?: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])$/,_e=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ve=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ye=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,be=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Se=`((\\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])))`,Ce=RegExp(`^${Se}$`);function we(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Te(e){return RegExp(`^${we(e)}$`)}function Ee(e){let t=`${Se}T${we(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function De(e,t){return!!((t===`v4`||!t)&&ge.test(e)||(t===`v6`||!t)&&ve.test(e))}function Oe(e,t){if(!de.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function ke(e,t){return!!((t===`v4`||!t)&&_e.test(e)||(t===`v6`||!t)&&ye.test(e))}var S=class e extends x{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==r.string){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.string,received:t.parsedType}),p}let n=new f,i;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(i=this._getOrReturnCtx(e,i),d(i,{code:a.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),n.dirty());else if(r.kind===`max`)e.data.length>r.value&&(i=this._getOrReturnCtx(e,i),d(i,{code:a.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),n.dirty());else if(r.kind===`length`){let t=e.data.length>r.value,o=e.data.length<r.value;(t||o)&&(i=this._getOrReturnCtx(e,i),t?d(i,{code:a.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):o&&d(i,{code:a.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),n.dirty())}else if(r.kind===`email`)pe.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`email`,code:a.invalid_string,message:r.message}),n.dirty());else if(r.kind===`emoji`)he||=new RegExp(me,`u`),he.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`emoji`,code:a.invalid_string,message:r.message}),n.dirty());else if(r.kind===`uuid`)le.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`uuid`,code:a.invalid_string,message:r.message}),n.dirty());else if(r.kind===`nanoid`)ue.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`nanoid`,code:a.invalid_string,message:r.message}),n.dirty());else if(r.kind===`cuid`)oe.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`cuid`,code:a.invalid_string,message:r.message}),n.dirty());else if(r.kind===`cuid2`)se.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`cuid2`,code:a.invalid_string,message:r.message}),n.dirty());else if(r.kind===`ulid`)ce.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`ulid`,code:a.invalid_string,message:r.message}),n.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),d(i,{validation:`url`,code:a.invalid_string,message:r.message}),n.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`regex`,code:a.invalid_string,message:r.message}),n.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(i=this._getOrReturnCtx(e,i),d(i,{code:a.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),n.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(i=this._getOrReturnCtx(e,i),d(i,{code:a.invalid_string,validation:{startsWith:r.value},message:r.message}),n.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(i=this._getOrReturnCtx(e,i),d(i,{code:a.invalid_string,validation:{endsWith:r.value},message:r.message}),n.dirty()):r.kind===`datetime`?Ee(r).test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{code:a.invalid_string,validation:`datetime`,message:r.message}),n.dirty()):r.kind===`date`?Ce.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{code:a.invalid_string,validation:`date`,message:r.message}),n.dirty()):r.kind===`time`?Te(r).test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{code:a.invalid_string,validation:`time`,message:r.message}),n.dirty()):r.kind===`duration`?fe.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`duration`,code:a.invalid_string,message:r.message}),n.dirty()):r.kind===`ip`?De(e.data,r.version)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`ip`,code:a.invalid_string,message:r.message}),n.dirty()):r.kind===`jwt`?Oe(e.data,r.alg)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`jwt`,code:a.invalid_string,message:r.message}),n.dirty()):r.kind===`cidr`?ke(e.data,r.version)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`cidr`,code:a.invalid_string,message:r.message}),n.dirty()):r.kind===`base64`?be.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`base64`,code:a.invalid_string,message:r.message}),n.dirty()):r.kind===`base64url`?xe.test(e.data)||(i=this._getOrReturnCtx(e,i),d(i,{validation:`base64url`,code:a.invalid_string,message:r.message}),n.dirty()):t.assertNever(r);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:a.invalid_string,...v.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...v.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...v.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...v.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...v.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...v.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...v.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...v.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...v.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...v.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...v.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...v.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...v.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...v.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...v.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...v.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...v.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...v.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...v.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...v.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...v.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...v.errToObj(t)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};S.create=e=>new S({checks:[],typeName:Q.ZodString,coerce:e?.coerce??!1,...b(e)});function Ae(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var C=class e extends x{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==r.number){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.number,received:t.parsedType}),p}let n,i=new f;for(let r of this._def.checks)r.kind===`int`?t.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:a.invalid_type,expected:`integer`,received:`float`,message:r.message}),i.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:a.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:a.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind===`multipleOf`?Ae(e.data,r.value)!==0&&(n=this._getOrReturnCtx(e,n),d(n,{code:a.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),d(n,{code:a.not_finite,message:r.message}),i.dirty()):t.assertNever(r);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,v.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,v.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,v.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,v.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:v.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:v.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:v.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:v.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:v.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:v.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&t.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};C.create=e=>new C({checks:[],typeName:Q.ZodNumber,coerce:e?.coerce||!1,...b(e)});var w=class e extends x{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==r.bigint)return this._getInvalidInput(e);let n,i=new f;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:a.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(n=this._getOrReturnCtx(e,n),d(n,{code:a.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),d(n,{code:a.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):t.assertNever(r);return{status:i.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit(`min`,e,!0,v.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,v.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,v.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,v.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:v.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:v.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};w.create=e=>new w({checks:[],typeName:Q.ZodBigInt,coerce:e?.coerce??!1,...b(e)});var T=class extends x{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==r.boolean){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.boolean,received:t.parsedType}),p}return h(e.data)}};T.create=e=>new T({typeName:Q.ZodBoolean,coerce:e?.coerce||!1,...b(e)});var E=class e extends x{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==r.date){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.date,received:t.parsedType}),p}if(Number.isNaN(e.data.getTime()))return d(this._getOrReturnCtx(e),{code:a.invalid_date}),p;let n=new f,i;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(i=this._getOrReturnCtx(e,i),d(i,{code:a.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),n.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(i=this._getOrReturnCtx(e,i),d(i,{code:a.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),n.dirty()):t.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:v.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:v.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};E.create=e=>new E({checks:[],coerce:e?.coerce||!1,typeName:Q.ZodDate,...b(e)});var D=class extends x{_parse(e){if(this._getType(e)!==r.symbol){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.symbol,received:t.parsedType}),p}return h(e.data)}};D.create=e=>new D({typeName:Q.ZodSymbol,...b(e)});var O=class extends x{_parse(e){if(this._getType(e)!==r.undefined){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.undefined,received:t.parsedType}),p}return h(e.data)}};O.create=e=>new O({typeName:Q.ZodUndefined,...b(e)});var k=class extends x{_parse(e){if(this._getType(e)!==r.null){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.null,received:t.parsedType}),p}return h(e.data)}};k.create=e=>new k({typeName:Q.ZodNull,...b(e)});var A=class extends x{constructor(){super(...arguments),this._any=!0}_parse(e){return h(e.data)}};A.create=e=>new A({typeName:Q.ZodAny,...b(e)});var j=class extends x{constructor(){super(...arguments),this._unknown=!0}_parse(e){return h(e.data)}};j.create=e=>new j({typeName:Q.ZodUnknown,...b(e)});var M=class extends x{_parse(e){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.never,received:t.parsedType}),p}};M.create=e=>new M({typeName:Q.ZodNever,...b(e)});var N=class extends x{_parse(e){if(this._getType(e)!==r.undefined){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.void,received:t.parsedType}),p}return h(e.data)}};N.create=e=>new N({typeName:Q.ZodVoid,...b(e)});var P=class e extends x{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==r.array)return d(t,{code:a.invalid_type,expected:r.array,received:t.parsedType}),p;if(i.exactLength!==null){let e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&(d(t,{code:e?a.too_big:a.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&t.data.length<i.minLength.value&&(d(t,{code:a.too_small,minimum:i.minLength.value,type:`array`,inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&t.data.length>i.maxLength.value&&(d(t,{code:a.too_big,maximum:i.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>i.type._parseAsync(new y(t,e,t.path,n)))).then(e=>f.mergeArray(n,e));let o=[...t.data].map((e,n)=>i.type._parseSync(new y(t,e,t.path,n)));return f.mergeArray(n,o)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:v.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:v.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:v.toString(n)}})}nonempty(e){return this.min(1,e)}};P.create=(e,t)=>new P({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Q.ZodArray,...b(t)});function F(e){if(e instanceof I){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=q.create(F(r))}return new I({...e._def,shape:()=>t})}else if(e instanceof P)return new P({...e._def,type:F(e.element)});else if(e instanceof q)return q.create(F(e.unwrap()));else if(e instanceof J)return J.create(F(e.unwrap()));else if(e instanceof B)return B.create(e.items.map(e=>F(e)));else return e}var I=class e extends x{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=t.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==r.object){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.object,received:t.parsedType}),p}let{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof M&&this._def.unknownKeys===`strip`))for(let e in n.data)o.includes(e)||s.push(e);let c=[];for(let e of o){let t=i[e],r=n.data[e];c.push({key:{status:`valid`,value:e},value:t._parse(new y(n,r,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof M){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of s)c.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)s.length>0&&(d(n,{code:a.unrecognized_keys,keys:s}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of s){let r=n.data[t];c.push({key:{status:`valid`,value:t},value:e._parse(new y(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of c){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>f.mergeObjectSync(t,e)):f.mergeObjectSync(t,c)}get shape(){return this._def.shape()}strict(t){return v.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:v.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Q.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(n){let r={};for(let e of t.objectKeys(n))n[e]&&this.shape[e]&&(r[e]=this.shape[e]);return new e({...this._def,shape:()=>r})}omit(n){let r={};for(let e of t.objectKeys(this.shape))n[e]||(r[e]=this.shape[e]);return new e({...this._def,shape:()=>r})}deepPartial(){return F(this)}partial(n){let r={};for(let e of t.objectKeys(this.shape)){let t=this.shape[e];n&&!n[e]?r[e]=t:r[e]=t.optional()}return new e({...this._def,shape:()=>r})}required(n){let r={};for(let e of t.objectKeys(this.shape))if(n&&!n[e])r[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof q;)t=t._def.innerType;r[e]=t}return new e({...this._def,shape:()=>r})}keyof(){return Le(t.objectKeys(this.shape))}};I.create=(e,t)=>new I({shape:()=>e,unknownKeys:`strip`,catchall:M.create(),typeName:Q.ZodObject,...b(t)}),I.strictCreate=(e,t)=>new I({shape:()=>e,unknownKeys:`strict`,catchall:M.create(),typeName:Q.ZodObject,...b(t)}),I.lazycreate=(e,t)=>new I({shape:e,unknownKeys:`strip`,catchall:M.create(),typeName:Q.ZodObject,...b(t)});var L=class extends x{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new s(e.ctx.common.issues));return d(t,{code:a.invalid_union,unionErrors:n}),p}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new s(e));return d(t,{code:a.invalid_union,unionErrors:i}),p}}get options(){return this._def.options}};L.create=(e,t)=>new L({options:e,typeName:Q.ZodUnion,...b(t)});var R=e=>e instanceof V?R(e.schema):e instanceof K?R(e.innerType()):e instanceof H?[e.value]:e instanceof U?e.options:e instanceof W?t.objectValues(e.enum):e instanceof Y?R(e._def.innerType):e instanceof O?[void 0]:e instanceof k?[null]:e instanceof q?[void 0,...R(e.unwrap())]:e instanceof J?[null,...R(e.unwrap())]:e instanceof Be||e instanceof Z?R(e.unwrap()):e instanceof X?R(e._def.innerType):[],je=class e extends x{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.object)return d(t,{code:a.invalid_type,expected:r.object,received:t.parsedType}),p;let n=this.discriminator,i=t.data[n],o=this.optionsMap.get(i);return o?t.common.async?o._parseAsync({data:t.data,path:t.path,parent:t}):o._parseSync({data:t.data,path:t.path,parent:t}):(d(t,{code:a.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=R(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:Q.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...b(r)})}};function Me(e,n){let a=i(e),o=i(n);if(e===n)return{valid:!0,data:e};if(a===r.object&&o===r.object){let r=t.objectKeys(n),i=t.objectKeys(e).filter(e=>r.indexOf(e)!==-1),a={...e,...n};for(let t of i){let r=Me(e[t],n[t]);if(!r.valid)return{valid:!1};a[t]=r.data}return{valid:!0,data:a}}else if(a===r.array&&o===r.array){if(e.length!==n.length)return{valid:!1};let t=[];for(let r=0;r<e.length;r++){let i=e[r],a=n[r],o=Me(i,a);if(!o.valid)return{valid:!1};t.push(o.data)}return{valid:!0,data:t}}else if(a===r.date&&o===r.date&&+e==+n)return{valid:!0,data:e};else return{valid:!1}}var z=class extends x{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(re(e)||re(r))return p;let i=Me(e.value,r.value);return i.valid?((ie(e)||ie(r))&&t.dirty(),{status:t.value,value:i.data}):(d(n,{code:a.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};z.create=(e,t,n)=>new z({left:e,right:t,typeName:Q.ZodIntersection,...b(n)});var B=class e extends x{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.array)return d(n,{code:a.invalid_type,expected:r.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return d(n,{code:a.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),p;!this._def.rest&&n.data.length>this._def.items.length&&(d(n,{code:a.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let i=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new y(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(i).then(e=>f.mergeArray(t,e)):f.mergeArray(t,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};B.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new B({items:e,typeName:Q.ZodTuple,rest:null,...b(t)})};var Ne=class e extends x{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.object)return d(n,{code:a.invalid_type,expected:r.object,received:n.parsedType}),p;let i=[],o=this._def.keyType,s=this._def.valueType;for(let e in n.data)i.push({key:o._parse(new y(n,e,n.path,e)),value:s._parse(new y(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?f.mergeObjectAsync(t,i):f.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof x?new e({keyType:t,valueType:n,typeName:Q.ZodRecord,...b(r)}):new e({keyType:S.create(),valueType:t,typeName:Q.ZodRecord,...b(n)})}},Pe=class extends x{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.map)return d(n,{code:a.invalid_type,expected:r.map,received:n.parsedType}),p;let i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([e,t],r)=>({key:i._parse(new y(n,e,n.path,[r,`key`])),value:o._parse(new y(n,t,n.path,[r,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of s){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return p;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of s){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return p;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};Pe.create=(e,t,n)=>new Pe({valueType:t,keyType:e,typeName:Q.ZodMap,...b(n)});var Fe=class e extends x{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==r.set)return d(n,{code:a.invalid_type,expected:r.set,received:n.parsedType}),p;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(d(n,{code:a.too_small,minimum:i.minSize.value,type:`set`,inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(d(n,{code:a.too_big,maximum:i.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let o=this._def.valueType;function s(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return p;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let c=[...n.data.values()].map((e,t)=>o._parse(new y(n,e,n.path,t)));return n.common.async?Promise.all(c).then(e=>s(e)):s(c)}min(t,n){return new e({...this._def,minSize:{value:t,message:v.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:v.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Fe.create=(e,t)=>new Fe({valueType:e,minSize:null,maxSize:null,typeName:Q.ZodSet,...b(t)});var Ie=class e extends x{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==r.function)return d(t,{code:a.invalid_type,expected:r.function,received:t.parsedType}),p;function n(e,n){return u({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),c].filter(e=>!!e),issueData:{code:a.invalid_arguments,argumentsError:n}})}function i(e,n){return u({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),c].filter(e=>!!e),issueData:{code:a.invalid_return_type,returnTypeError:n}})}let o={errorMap:t.common.contextualErrorMap},ee=t.data;if(this._def.returns instanceof G){let e=this;return h(async function(...t){let r=new s([]),a=await e._def.args.parseAsync(t,o).catch(e=>{throw r.addIssue(n(t,e)),r}),c=await Reflect.apply(ee,this,a);return await e._def.returns._def.type.parseAsync(c,o).catch(e=>{throw r.addIssue(i(c,e)),r})})}else{let e=this;return h(function(...t){let r=e._def.args.safeParse(t,o);if(!r.success)throw new s([n(t,r.error)]);let a=Reflect.apply(ee,this,r.data),c=e._def.returns.safeParse(a,o);if(!c.success)throw new s([i(a,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:B.create(t).rest(j.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||B.create([]).rest(j.create()),returns:n||j.create(),typeName:Q.ZodFunction,...b(r)})}},V=class extends x{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};V.create=(e,t)=>new V({getter:e,typeName:Q.ZodLazy,...b(t)});var H=class extends x{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:a.invalid_literal,expected:this._def.value}),p}return{status:`valid`,value:e.data}}get value(){return this._def.value}};H.create=(e,t)=>new H({value:e,typeName:Q.ZodLiteral,...b(t)});function Le(e,t){return new U({values:e,typeName:Q.ZodEnum,...b(t)})}var U=class e extends x{_parse(e){if(typeof e.data!=`string`){let n=this._getOrReturnCtx(e),r=this._def.values;return d(n,{expected:t.joinValues(r),received:n.parsedType,code:a.invalid_type}),p}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return d(t,{received:t.data,code:a.invalid_enum_value,options:n}),p}return h(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};U.create=Le;var W=class extends x{_parse(e){let n=t.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==r.string&&i.parsedType!==r.number){let e=t.objectValues(n);return d(i,{expected:t.joinValues(e),received:i.parsedType,code:a.invalid_type}),p}if(this._cache||=new Set(t.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=t.objectValues(n);return d(i,{received:i.data,code:a.invalid_enum_value,options:e}),p}return h(e.data)}get enum(){return this._def.values}};W.create=(e,t)=>new W({values:e,typeName:Q.ZodNativeEnum,...b(t)});var G=class extends x{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==r.promise&&t.common.async===!1?(d(t,{code:a.invalid_type,expected:r.promise,received:t.parsedType}),p):h((t.parsedType===r.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};G.create=(e,t)=>new G({type:e,typeName:Q.ZodPromise,...b(t)});var K=class extends x{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:e=>{d(r,e),e.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type===`preprocess`){let e=i.transform(r.data,a);if(r.common.async)return Promise.resolve(e).then(async e=>{if(n.value===`aborted`)return p;let t=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return t.status===`aborted`?p:t.status===`dirty`||n.value===`dirty`?m(t.value):t});{if(n.value===`aborted`)return p;let t=this._def.schema._parseSync({data:e,path:r.path,parent:r});return t.status===`aborted`?p:t.status===`dirty`||n.value===`dirty`?m(t.value):t}}if(i.type===`refinement`){let e=e=>{let t=i.refinement(e,a);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(r.common.async===!1){let t=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return t.status===`aborted`?p:(t.status===`dirty`&&n.dirty(),e(t.value),{status:n.value,value:t.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(t=>t.status===`aborted`?p:(t.status===`dirty`&&n.dirty(),e(t.value).then(()=>({status:n.value,value:t.value}))))}if(i.type===`transform`)if(r.common.async===!1){let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!g(e))return p;let t=i.transform(e.value,a);if(t instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:n.value,value:t}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>g(e)?Promise.resolve(i.transform(e.value,a)).then(e=>({status:n.value,value:e})):p);t.assertNever(i)}};K.create=(e,t,n)=>new K({schema:e,typeName:Q.ZodEffects,effect:t,...b(n)}),K.createWithPreprocess=(e,t,n)=>new K({schema:t,effect:{type:`preprocess`,transform:e},typeName:Q.ZodEffects,...b(n)});var q=class extends x{_parse(e){return this._getType(e)===r.undefined?h(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};q.create=(e,t)=>new q({innerType:e,typeName:Q.ZodOptional,...b(t)});var J=class extends x{_parse(e){return this._getType(e)===r.null?h(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};J.create=(e,t)=>new J({innerType:e,typeName:Q.ZodNullable,...b(t)});var Y=class extends x{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===r.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Y.create=(e,t)=>new Y({innerType:e,typeName:Q.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...b(t)});var X=class extends x{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return _(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new s(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new s(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};X.create=(e,t)=>new X({innerType:e,typeName:Q.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...b(t)});var Re=class extends x{_parse(e){if(this._getType(e)!==r.nan){let t=this._getOrReturnCtx(e);return d(t,{code:a.invalid_type,expected:r.nan,received:t.parsedType}),p}return{status:`valid`,value:e.data}}};Re.create=e=>new Re({typeName:Q.ZodNaN,...b(e)});var ze=Symbol(`zod_brand`),Be=class extends x{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},Ve=class e extends x{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?p:e.status===`dirty`?(t.dirty(),m(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?p:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:Q.ZodPipeline})}},Z=class extends x{_parse(e){let t=this._def.innerType._parse(e),n=e=>(g(e)&&(e.value=Object.freeze(e.value)),e);return _(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};Z.create=(e,t)=>new Z({innerType:e,typeName:Q.ZodReadonly,...b(t)});function He(e,t){let n=typeof e==`function`?e(t):typeof e==`string`?{message:e}:e;return typeof n==`string`?{message:n}:n}function Ue(e,t={},n){return e?A.create().superRefine((r,i)=>{let a=e(r);if(a instanceof Promise)return a.then(e=>{if(!e){let e=He(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}});if(!a){let e=He(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}}):A.create()}var We={object:I.lazycreate},Q;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(Q||={});var Ge=(e,t={message:`Input not instance of ${e.name}`})=>Ue(t=>t instanceof e,t),Ke=S.create,qe=C.create,Je=Re.create,Ye=w.create,Xe=T.create,Ze=E.create,Qe=D.create,$e=O.create,et=k.create,tt=A.create,nt=j.create,rt=M.create,it=N.create,at=P.create,ot=I.create,st=I.strictCreate,ct=L.create,lt=je.create,ut=z.create,dt=B.create,ft=Ne.create,pt=Pe.create,mt=Fe.create,ht=Ie.create,gt=V.create,_t=H.create,vt=U.create,yt=W.create,bt=G.create,xt=K.create,St=q.create,Ct=J.create,wt=K.createWithPreprocess,Tt=Ve.create,Et=()=>Ke().optional(),Dt=()=>qe().optional(),Ot=()=>Xe().optional(),kt={string:(e=>S.create({...e,coerce:!0})),number:(e=>C.create({...e,coerce:!0})),boolean:(e=>T.create({...e,coerce:!0})),bigint:(e=>w.create({...e,coerce:!0})),date:(e=>E.create({...e,coerce:!0}))},At=p,jt=e({BRAND:()=>ze,DIRTY:()=>m,EMPTY_PATH:()=>ne,INVALID:()=>p,NEVER:()=>At,OK:()=>h,ParseStatus:()=>f,Schema:()=>x,ZodAny:()=>A,ZodArray:()=>P,ZodBigInt:()=>w,ZodBoolean:()=>T,ZodBranded:()=>Be,ZodCatch:()=>X,ZodDate:()=>E,ZodDefault:()=>Y,ZodDiscriminatedUnion:()=>je,ZodEffects:()=>K,ZodEnum:()=>U,ZodError:()=>s,ZodFirstPartyTypeKind:()=>Q,ZodFunction:()=>Ie,ZodIntersection:()=>z,ZodIssueCode:()=>a,ZodLazy:()=>V,ZodLiteral:()=>H,ZodMap:()=>Pe,ZodNaN:()=>Re,ZodNativeEnum:()=>W,ZodNever:()=>M,ZodNull:()=>k,ZodNullable:()=>J,ZodNumber:()=>C,ZodObject:()=>I,ZodOptional:()=>q,ZodParsedType:()=>r,ZodPipeline:()=>Ve,ZodPromise:()=>G,ZodReadonly:()=>Z,ZodRecord:()=>Ne,ZodSchema:()=>x,ZodSet:()=>Fe,ZodString:()=>S,ZodSymbol:()=>D,ZodTransformer:()=>K,ZodTuple:()=>B,ZodType:()=>x,ZodUndefined:()=>O,ZodUnion:()=>L,ZodUnknown:()=>j,ZodVoid:()=>N,addIssueToContext:()=>d,any:()=>tt,array:()=>at,bigint:()=>Ye,boolean:()=>Xe,coerce:()=>kt,custom:()=>Ue,date:()=>Ze,datetimeRegex:()=>Ee,defaultErrorMap:()=>c,discriminatedUnion:()=>lt,effect:()=>xt,enum:()=>vt,function:()=>ht,getErrorMap:()=>l,getParsedType:()=>i,instanceof:()=>Ge,intersection:()=>ut,isAborted:()=>re,isAsync:()=>_,isDirty:()=>ie,isValid:()=>g,late:()=>We,lazy:()=>gt,literal:()=>_t,makeIssue:()=>u,map:()=>pt,nan:()=>Je,nativeEnum:()=>yt,never:()=>rt,null:()=>et,nullable:()=>Ct,number:()=>qe,object:()=>ot,objectUtil:()=>n,oboolean:()=>Ot,onumber:()=>Dt,optional:()=>St,ostring:()=>Et,pipeline:()=>Tt,preprocess:()=>wt,promise:()=>bt,quotelessJson:()=>o,record:()=>ft,set:()=>mt,setErrorMap:()=>te,strictObject:()=>st,string:()=>Ke,symbol:()=>Qe,transformer:()=>xt,tuple:()=>dt,undefined:()=>$e,union:()=>ct,unknown:()=>nt,util:()=>t,void:()=>it}),Mt=e({BRAND:()=>ze,DIRTY:()=>m,EMPTY_PATH:()=>ne,INVALID:()=>p,NEVER:()=>At,OK:()=>h,ParseStatus:()=>f,Schema:()=>x,ZodAny:()=>A,ZodArray:()=>P,ZodBigInt:()=>w,ZodBoolean:()=>T,ZodBranded:()=>Be,ZodCatch:()=>X,ZodDate:()=>E,ZodDefault:()=>Y,ZodDiscriminatedUnion:()=>je,ZodEffects:()=>K,ZodEnum:()=>U,ZodError:()=>s,ZodFirstPartyTypeKind:()=>Q,ZodFunction:()=>Ie,ZodIntersection:()=>z,ZodIssueCode:()=>a,ZodLazy:()=>V,ZodLiteral:()=>H,ZodMap:()=>Pe,ZodNaN:()=>Re,ZodNativeEnum:()=>W,ZodNever:()=>M,ZodNull:()=>k,ZodNullable:()=>J,ZodNumber:()=>C,ZodObject:()=>I,ZodOptional:()=>q,ZodParsedType:()=>r,ZodPipeline:()=>Ve,ZodPromise:()=>G,ZodReadonly:()=>Z,ZodRecord:()=>Ne,ZodSchema:()=>x,ZodSet:()=>Fe,ZodString:()=>S,ZodSymbol:()=>D,ZodTransformer:()=>K,ZodTuple:()=>B,ZodType:()=>x,ZodUndefined:()=>O,ZodUnion:()=>L,ZodUnknown:()=>j,ZodVoid:()=>N,addIssueToContext:()=>d,any:()=>tt,array:()=>at,bigint:()=>Ye,boolean:()=>Xe,coerce:()=>kt,custom:()=>Ue,date:()=>Ze,datetimeRegex:()=>Ee,default:()=>Nt,defaultErrorMap:()=>c,discriminatedUnion:()=>lt,effect:()=>xt,enum:()=>vt,function:()=>ht,getErrorMap:()=>l,getParsedType:()=>i,instanceof:()=>Ge,intersection:()=>ut,isAborted:()=>re,isAsync:()=>_,isDirty:()=>ie,isValid:()=>g,late:()=>We,lazy:()=>gt,literal:()=>_t,makeIssue:()=>u,map:()=>pt,nan:()=>Je,nativeEnum:()=>yt,never:()=>rt,null:()=>et,nullable:()=>Ct,number:()=>qe,object:()=>ot,objectUtil:()=>n,oboolean:()=>Ot,onumber:()=>Dt,optional:()=>St,ostring:()=>Et,pipeline:()=>Tt,preprocess:()=>wt,promise:()=>bt,quotelessJson:()=>o,record:()=>ft,set:()=>mt,setErrorMap:()=>te,strictObject:()=>st,string:()=>Ke,symbol:()=>Qe,transformer:()=>xt,tuple:()=>dt,undefined:()=>$e,union:()=>ct,unknown:()=>nt,util:()=>t,void:()=>it,z:()=>jt}),Nt=jt,Pt=e({BRAND:()=>Bn,DIRTY:()=>qt,EMPTY_PATH:()=>Wt,INVALID:()=>Kt,NEVER:()=>Pr,OK:()=>Jt,ParseStatus:()=>Gt,Schema:()=>Wn,ZodAny:()=>mn,ZodArray:()=>vn,ZodBigInt:()=>cn,ZodBoolean:()=>ln,ZodBranded:()=>Vn,ZodCatch:()=>Rn,ZodDate:()=>un,ZodDefault:()=>Ln,ZodDiscriminatedUnion:()=>xn,ZodEffects:()=>Nn,ZodEnum:()=>An,ZodError:()=>zr,ZodFirstPartyTypeKind:()=>qn,ZodFunction:()=>Dn,ZodIntersection:()=>Sn,ZodIssueCode:()=>Lr,ZodLazy:()=>On,ZodLiteral:()=>kn,ZodMap:()=>Tn,ZodNaN:()=>zn,ZodNativeEnum:()=>jn,ZodNever:()=>gn,ZodNull:()=>pn,ZodNullable:()=>In,ZodNumber:()=>sn,ZodObject:()=>yn,ZodOptional:()=>Fn,ZodParsedType:()=>nn,ZodPipeline:()=>Hn,ZodPromise:()=>Mn,ZodReadonly:()=>Un,ZodRecord:()=>wn,ZodSchema:()=>Gn,ZodSet:()=>En,ZodString:()=>on,ZodSymbol:()=>dn,ZodTransformer:()=>Pn,ZodTuple:()=>Cn,ZodType:()=>an,ZodUndefined:()=>fn,ZodUnion:()=>bn,ZodUnknown:()=>hn,ZodVoid:()=>_n,__moduleExports:()=>Lt,addIssueToContext:()=>$t,any:()=>Yn,array:()=>Xn,bigint:()=>Zn,boolean:()=>Qn,coerce:()=>Jn,custom:()=>Ir,date:()=>$n,datetimeRegex:()=>Fr,default:()=>Rt,defaultErrorMap:()=>Bt,discriminatedUnion:()=>er,effect:()=>tr,enum:()=>nr,function:()=>rr,getErrorMap:()=>Ht,getParsedType:()=>rn,instanceof:()=>ir,intersection:()=>ar,isAborted:()=>Yt,isAsync:()=>Qt,isDirty:()=>Xt,isValid:()=>Zt,late:()=>Kn,lazy:()=>or,literal:()=>sr,makeIssue:()=>Ut,map:()=>cr,nan:()=>lr,nativeEnum:()=>ur,never:()=>dr,null:()=>fr,nullable:()=>pr,number:()=>mr,object:()=>hr,objectUtil:()=>tn,oboolean:()=>gr,onumber:()=>_r,optional:()=>vr,ostring:()=>yr,pipeline:()=>br,preprocess:()=>xr,promise:()=>Sr,quotelessJson:()=>Rr,record:()=>Cr,set:()=>wr,setErrorMap:()=>Vt,strictObject:()=>Tr,string:()=>Er,symbol:()=>Dr,transformer:()=>Or,tuple:()=>kr,undefined:()=>Ar,union:()=>jr,unknown:()=>Mr,util:()=>en,void:()=>Nr,z:()=>zt}),Ft=`__mf_module_cache__`;globalThis[Ft]||={share:{},remote:{}},globalThis[Ft].share||={},globalThis[Ft].remote||={};var It=globalThis[Ft],$=It.share.zod;$===void 0&&($=Mt,It.share.zod=$);var Lt=$,Rt=$.__esModule?$.default:$.default??$,{z:zt,defaultErrorMap:Bt,setErrorMap:Vt,getErrorMap:Ht,makeIssue:Ut,EMPTY_PATH:Wt,ParseStatus:Gt,INVALID:Kt,DIRTY:qt,OK:Jt,isAborted:Yt,isDirty:Xt,isValid:Zt,isAsync:Qt,addIssueToContext:$t,util:en,objectUtil:tn,ZodParsedType:nn,getParsedType:rn,ZodType:an,ZodString:on,ZodNumber:sn,ZodBigInt:cn,ZodBoolean:ln,ZodDate:un,ZodSymbol:dn,ZodUndefined:fn,ZodNull:pn,ZodAny:mn,ZodUnknown:hn,ZodNever:gn,ZodVoid:_n,ZodArray:vn,ZodObject:yn,ZodUnion:bn,ZodDiscriminatedUnion:xn,ZodIntersection:Sn,ZodTuple:Cn,ZodRecord:wn,ZodMap:Tn,ZodSet:En,ZodFunction:Dn,ZodLazy:On,ZodLiteral:kn,ZodEnum:An,ZodNativeEnum:jn,ZodPromise:Mn,ZodEffects:Nn,ZodTransformer:Pn,ZodOptional:Fn,ZodNullable:In,ZodDefault:Ln,ZodCatch:Rn,ZodNaN:zn,BRAND:Bn,ZodBranded:Vn,ZodPipeline:Hn,ZodReadonly:Un,Schema:Wn,ZodSchema:Gn,late:Kn,ZodFirstPartyTypeKind:qn,coerce:Jn,any:Yn,array:Xn,bigint:Zn,boolean:Qn,date:$n,discriminatedUnion:er,effect:tr,enum:nr,function:rr,instanceof:ir,intersection:ar,lazy:or,literal:sr,map:cr,nan:lr,nativeEnum:ur,never:dr,null:fr,nullable:pr,number:mr,object:hr,oboolean:gr,onumber:_r,optional:vr,ostring:yr,pipeline:br,preprocess:xr,promise:Sr,record:Cr,set:wr,strictObject:Tr,string:Er,symbol:Dr,transformer:Or,tuple:kr,undefined:Ar,union:jr,unknown:Mr,void:Nr,NEVER:Pr,datetimeRegex:Fr,custom:Ir,ZodIssueCode:Lr,quotelessJson:Rr,ZodError:zr}=$;export{Mt as n,Pt as t};
|
package/dist/harness/hostInit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./preload-helper.js";var t=`__mf_module_cache__`;globalThis[t]||={share:{},remote:{}},globalThis[t].share||={},globalThis[t].remote||={};var n=globalThis[t],r;async function i(){return r||=(async()=>{let t=await(await e(()=>import(`./remoteEntry.js`),[])).init();for(let[e,r]of Object.entries({react:{shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"react-dom":{shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"react/jsx-dev-runtime":{shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"react/jsx-runtime":{shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"@rimori/client":{shareConfig:{singleton:!0,requiredVersion:`^2.5.38-next.1`}},"@rimori/react-client":{shareConfig:{singleton:!0,requiredVersion:`^0.4.22`}},"@tanstack/react-query":{shareConfig:{singleton:!0,requiredVersion:`^5.100.10`}},zod:{shareConfig:{singleton:!0,requiredVersion:`^3.25.76`}}}))n.share[e]===void 0&&await t.loadShare(e,{customShareInfo:{shareConfig:r.shareConfig}}).then(t=>{let r=typeof t==`function`?t():t;return Promise.resolve(r).then(t=>{n.share[e]=t})});return await Promise.all([]),t})(),r}r=i();export{r as hostInitPromise,i as initHost};
|
package/dist/harness/index.html
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Rimori Scenario Host</title>
|
|
7
7
|
<script type="module" crossorigin src="/__rimori_harness__/mf-entry-bootstrap-0.js"></script>
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/__rimori_harness__/remoteEntry.js">
|
|
9
8
|
</head>
|
|
10
9
|
<body>
|
|
11
10
|
<div id="root"></div>
|
package/dist/harness/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./virtualExposes.js";import"./
|
|
1
|
+
import"./virtualExposes.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__rimori-scenario-host__remoteEntry-_hash_.js";import{t as e}from"./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs.js";import{i as t,t as n}from"./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_react_mf_2_client__loadShare__.mjs.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=`__mfe_internal__rimori-scenario-host`;async function i(){let e=Date.now();for(;Date.now()-e<5e3;){let e=(globalThis.__FEDERATION__?.__INSTANCES__??[]).find(e=>e?.name===r);if(e)return e;await new Promise(e=>setTimeout(e,30))}throw Error(`[rimori-harness] Module Federation host '${r}' did not initialize within 5s`)}async function a(){let r=window.__RIMORI_HARNESS__;if(!r)throw Error(`[rimori-harness] Missing window.__RIMORI_HARNESS__ config.`);let{pluginId:a,remoteUrl:o}=r,s=await i();s.registerRemotes([{name:a,entry:o,type:`module`}],{force:!0});let c=await s.loadRemote(`${a}/MainPanel`),l=c.default??c;e(document.getElementById(`root`)).render(t(n,{pluginId:a,children:t(l,{})}))}a().catch(e=>{console.error(`[rimori-harness] fatal:`,e);let t=document.getElementById(`root`);t&&(t.innerHTML=`<pre style="color:red;padding:1rem">${String(e?.message??e)}</pre>`)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e}from"./rolldown-runtime.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__rimori-scenario-host__remoteEntry-_hash_.js";import{t}from"./preload-helper.js";var n={"@rimori/client":async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_client__loadShare__.mjs.js`).then(e=>e.c),[]),"@rimori/react-client":async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_react_mf_2_client__loadShare__.mjs.js`).then(e=>e.r),[]),"@tanstack/react-query":async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs.js`).then(e=>e.n),[]),react:async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_react_mf_2_client__loadShare__.mjs.js`).then(t=>e(t.b())),[]),"react-dom":async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_react_mf_2_client__loadShare__.mjs.js`).then(t=>e(t.l())),[]),"react-dom/client":async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs.js`).then(t=>e(t.n())),[]),"react/jsx-dev-runtime":async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_1_jsx_mf_2_dev_mf_2_runtime__loadShare__.mjs.js`).then(t=>e(t.n())),[]),"react/jsx-runtime":async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_react_mf_2_client__loadShare__.mjs.js`).then(t=>e(t.o())),[]),zod:async()=>await t(()=>import(`./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__zod__loadShare__.mjs.js`).then(e=>e.n),[])},r={"@rimori/client":{name:`@rimori/client`,version:`2.5.38-next.1`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r[`@rimori/client`].loaded=!0;let{"@rimori/client":e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^2.5.38-next.1`}},"@rimori/react-client":{name:`@rimori/react-client`,version:`0.4.22`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r[`@rimori/react-client`].loaded=!0;let{"@rimori/react-client":e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^0.4.22`}},"@tanstack/react-query":{name:`@tanstack/react-query`,version:`5.100.10`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r[`@tanstack/react-query`].loaded=!0;let{"@tanstack/react-query":e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^5.100.10`}},react:{name:`react`,version:`19.2.6`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r.react.loaded=!0;let{react:e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"react-dom":{name:`react-dom`,version:`19.2.6`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r[`react-dom`].loaded=!0;let{"react-dom":e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"react-dom/client":{name:`react-dom/client`,version:`19.2.6`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r[`react-dom/client`].loaded=!0;let{"react-dom/client":e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"react/jsx-dev-runtime":{name:`react/jsx-dev-runtime`,version:`19.2.6`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r[`react/jsx-dev-runtime`].loaded=!0;let{"react/jsx-dev-runtime":e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},"react/jsx-runtime":{name:`react/jsx-runtime`,version:`19.2.6`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r[`react/jsx-runtime`].loaded=!0;let{"react/jsx-runtime":e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^19.2.6`}},zod:{name:`zod`,version:`3.25.76`,scope:[`default`],loaded:!1,from:`__mfe_internal__rimori-scenario-host`,async get(){r.zod.loaded=!0;let{zod:e}=n,t={...await e()};return Object.defineProperty(t,`__esModule`,{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:`^3.25.76`}}},i=[];export{i as usedRemotes,r as usedShared};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var e=`modulepreload`,t=function(e){return`/__rimori_harness__/`+e},n={},r=function(r,i,a){let o=Promise.resolve();if(i&&i.length>0){let r=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(i.map(i=>{if(i=t(i,a),i in n)return;n[i]=!0;let o=i.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(a)for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.href===i&&(!o||t.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:e,o||(l.as=`script`),l.crossOrigin=``,l.href=i,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,t)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${i}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(let t of e||[])t.status===`rejected`&&s(t.reason);return r().catch(s)})};export{r as t};
|