vendor: 54,215 bytes, line 1
1import{u as Je,s as K,j as p,B as je,L as Ge}from"./index-B0cTFD4s.js";import{r as F,d as Xe,h as Qe}from"./router-BvNiAcqA.js";import{I as Ae}from"./input-DPLyZNju.js";import{L as Me}from"./label-CZTElDVv.js";import{g as Ke}from"./proxy-_ndGpe3j.js";import{M as Fe}from"./mail-DwvwPvLm.js";import{L as et}from"./lock-BOosGLvN.js";import"./index-RF0-oCdM.js";var x;(function(r){r.assertEqual=n=>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"&&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})(x||(x={}));var Ce;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Ce||(Ce={}));const h=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=r=>{switch(typeof r){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(r)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(r)?h.array:r===null?h.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?h.promise:typeof Map<"u"&&r instanceof Map?h.map:typeof Set<"u"&&r instanceof Set?h.set:typeof Date<"u"&&r instanceof Date?h.date:h.object;default:return h.unknown}},d=x.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"]),tt=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class N extends Error{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}get errors(){return this.issues}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,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return n(this),s}static assert(e){if(!(e instanceof N))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}N.create=r=>new N(r);const G=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===h.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${x.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}"`:x.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==="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,x.assertNever(r)}return{message:t}};let Ve=G;function rt(r){Ve=r}function ye(){return Ve}const _e=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 l=s.filter(c=>!!c).slice().reverse();for(const c of l)o=c(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},st=[];function u(r,e){const t=ye(),s=_e({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===G?void 0:G].filter(n=>!!n)});r.common.issues.push(s)}class w{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 g;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 w.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 g;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 g=Object.freeze({status:"aborted"}),Y=r=>({status:"dirty",value:r}),T=r=>({status:"valid",value:r}),Ee=r=>r.status==="aborted",Oe=r=>r.status==="dirty",re=r=>r.status==="valid",se=r=>typeof Promise<"u"&&r instanceof Promise;function xe(r,e,t,s){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function Le(r,e,t,s,n){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var f;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(f||(f={}));var ee,te;class O{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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Pe=(r,e)=>{if(re(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 N(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)=>{var l,c;const{message:m}=r;return i.code==="invalid_enum_value"?{message:m??o.defaultError}:typeof o.data>"u"?{message:(l=m??s)!==null&&l!==void 0?l:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=m??t)!==null&&c!==void 0?c:o.defaultError}},description:n}}class _{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return P(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new w,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(se(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Pe(n,a)}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==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(se(n)?n:Promise.resolve(n));return Pe(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(l=>l?!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 Z({schema:this,typeName:v.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return E.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return S.create(this,this._def)}promise(){return Q.create(this,this._def)}or(e){return oe.create([this,e],this._def)}and(e){return de.create(this,e,this._def)}transform(e){return new Z({...y(this._def),schema:this,typeName:v.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new fe({...y(this._def),innerType:this,defaultValue:t,typeName:v.ZodDefault})}brand(){return new Ie({typeName:v.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new me({...y(this._def),innerType:this,catchValue:t,typeName:v.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ve.create(this,e)}readonly(){return pe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const nt=/^c[^\s-]{8,}$/i,at=/^[0-9a-z]+$/,it=/^[0-9A-HJKMNP-TV-Z]{26}$/,ot=/^[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,dt=/^[a-z0-9_-]{21}$/i,ct=/^[-+]?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)?)??$/,lt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ut="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Se;const ht=/^(?:(?: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])$/,ft=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,mt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,De="((\\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])))",pt=new RegExp(`^${De}$`);function ze(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function vt(r){return new RegExp(`^${ze(r)}$`)}function Ue(r){let e=`${De}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 gt(r,e){return!!((e==="v4"||!e)&&ht.test(r)||(e==="v6"||!e)&&ft.test(r))}class j extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:h.string,received:a.parsedType}),g}const s=new w;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),u(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),u(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?u(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&u(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")lt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Se||(Se=new RegExp(ut,"u")),Se.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")ot.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")dt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")nt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")at.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")it.test(e.data)||(n=this._getOrReturnCtx(e,n),u(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),u(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),u(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),u(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),u(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),u(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ue(a).test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?pt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?vt(a).test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?ct.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?gt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?mt.test(e.data)||(n=this._getOrReturnCtx(e,n),u(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):x.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,...f.errToObj(s)})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...f.errToObj(e==null?void 0: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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...f.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...f.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...f.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...f.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...f.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...f.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...f.errToObj(t)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new j({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new j({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new j({...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 isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}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}}j.create=r=>{var e;return new j({checks:[],typeName:v.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};function yt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class $ extends _{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)!==h.number){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:h.number,received:a.parsedType}),g}let s;const n=new w;for(const a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),u(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),u(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),u(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?yt(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),u(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),u(s,{code:d.not_finite,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,f.toString(t))}gt(e,t){return this.setLimit("min",e,!1,f.toString(t))}lte(e,t){return this.setLimit("max",e,!0,f.toString(t))}lt(e,t){return this.setLimit("max",e,!1,f.toString(t))}setLimit(e,t,s,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:f.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.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"&&x.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)}}$.create=r=>new $({checks:[],typeName:v.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class V extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==h.bigint){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:h.bigint,received:a.parsedType}),g}let s;const n=new w;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),u(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),u(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),u(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,f.toString(t))}gt(e,t){return this.setLimit("min",e,!1,f.toString(t))}lte(e,t){return this.setLimit("max",e,!0,f.toString(t))}lt(e,t){return this.setLimit("max",e,!1,f.toString(t))}setLimit(e,t,s,n){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:f.toString(n)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:f.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}}V.create=r=>{var e;return new V({checks:[],typeName:v.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...y(r)})};class ne extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.boolean,received:s.parsedType}),g}return T(e.data)}}ne.create=r=>new ne({typeName:v.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...y(r)});class B extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:h.date,received:a.parsedType}),g}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_date}),g}const s=new w;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),u(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),u(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):x.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:f.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}}B.create=r=>new B({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:v.ZodDate,...y(r)});class be extends _{_parse(e){if(this._getType(e)!==h.symbol){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.symbol,received:s.parsedType}),g}return T(e.data)}}be.create=r=>new be({typeName:v.ZodSymbol,...y(r)});class ae extends _{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.undefined,received:s.parsedType}),g}return T(e.data)}}ae.create=r=>new ae({typeName:v.ZodUndefined,...y(r)});class ie extends _{_parse(e){if(this._getType(e)!==h.null){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.null,received:s.parsedType}),g}return T(e.data)}}ie.create=r=>new ie({typeName:v.ZodNull,...y(r)});class X extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return T(e.data)}}X.create=r=>new X({typeName:v.ZodAny,...y(r)});class U extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return T(e.data)}}U.create=r=>new U({typeName:v.ZodUnknown,...y(r)});class M extends _{_parse(e){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:h.never,received:t.parsedType}),g}}M.create=r=>new M({typeName:v.ZodNever,...y(r)});class ke extends _{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.void,received:s.parsedType}),g}return T(e.data)}}ke.create=r=>new ke({typeName:v.ZodVoid,...y(r)});class S extends _{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==h.array)return u(t,{code:d.invalid_type,expected:h.array,received:t.parsedType}),g;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(u(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&&(u(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&&(u(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 O(t,i,t.path,o)))).then(i=>w.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new O(t,i,t.path,o)));return w.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new S({...this._def,minLength:{value:e,message:f.toString(t)}})}max(e,t){return new S({...this._def,maxLength:{value:e,message:f.toString(t)}})}length(e,t){return new S({...this._def,exactLength:{value:e,message:f.toString(t)}})}nonempty(e){return this.min(1,e)}}S.create=(r,e)=>new S({type:r,minLength:null,maxLength:null,exactLength:null,typeName:v.ZodArray,...y(e)});function H(r){if(r instanceof b){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=E.create(H(s))}return new b({...r._def,shape:()=>e})}else return r instanceof S?new S({...r._def,type:H(r.element)}):r instanceof E?E.create(H(r.unwrap())):r instanceof D?D.create(H(r.unwrap())):r instanceof R?R.create(r.items.map(e=>H(e))):r}class b extends _{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=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==h.object){const c=this._getOrReturnCtx(e);return u(c,{code:d.invalid_type,expected:h.object,received:c.parsedType}),g}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof M&&this._def.unknownKeys==="strip"))for(const c in n.data)i.includes(c)||o.push(c);const l=[];for(const c of i){const m=a[c],k=n.data[c];l.push({key:{status:"valid",value:c},value:m._parse(new O(n,k,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof M){const c=this._def.unknownKeys;if(c==="passthrough")for(const m of o)l.push({key:{status:"valid",value:m},value:{status:"valid",value:n.data[m]}});else if(c==="strict")o.length>0&&(u(n,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const m of o){const k=n.data[m];l.push({key:{status:"valid",value:m},value:c._parse(new O(n,k,n.path,m)),alwaysSet:m in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const m of l){const k=await m.key,ge=await m.value;c.push({key:k,value:ge,alwaysSet:m.alwaysSet})}return c}).then(c=>w.mergeObjectSync(s,c)):w.mergeObjectSync(s,l)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new b({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const l=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=f.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new b({...this._def,unknownKeys:"strip"})}passthrough(){return new b({...this._def,unknownKeys:"passthrough"})}extend(e){return new b({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new b({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:v.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new b({...this._def,catchall:e})}pick(e){const t={};return x.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new b({...this._def,shape:()=>t})}omit(e){const t={};return x.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new b({...this._def,shape:()=>t})}deepPartial(){return H(this)}partial(e){const t={};return x.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new b({...this._def,shape:()=>t})}required(e){const t={};return x.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof E;)a=a._def.innerType;t[s]=a}}),new b({...this._def,shape:()=>t})}keyof(){return Be(x.objectKeys(this.shape))}}b.create=(r,e)=>new b({shape:()=>r,unknownKeys:"strip",catchall:M.create(),typeName:v.ZodObject,...y(e)});b.strictCreate=(r,e)=>new b({shape:()=>r,unknownKeys:"strict",catchall:M.create(),typeName:v.ZodObject,...y(e)});b.lazycreate=(r,e)=>new b({shape:r,unknownKeys:"strip",catchall:M.create(),typeName:v.ZodObject,...y(e)});class oe extends _{_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 N(o.ctx.common.issues));return u(t,{code:d.invalid_union,unionErrors:i}),g}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 l of s){const c={...t,common:{...t.common,issues:[]},parent:null},m=l._parseSync({data:t.data,path:t.path,parent:c});if(m.status==="valid")return m;m.status==="dirty"&&!a&&(a={result:m,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(l=>new N(l));return u(t,{code:d.invalid_union,unionErrors:o}),g}}get options(){return this._def.options}}oe.create=(r,e)=>new oe({options:r,typeName:v.ZodUnion,...y(e)});const A=r=>r instanceof le?A(r.schema):r instanceof Z?A(r.innerType()):r instanceof ue?[r.value]:r instanceof L?r.options:r instanceof he?x.objectValues(r.enum):r instanceof fe?A(r._def.innerType):r instanceof ae?[void 0]:r instanceof ie?[null]:r instanceof E?[void 0,...A(r.unwrap())]:r instanceof D?[null,...A(r.unwrap())]:r instanceof Ie||r instanceof pe?A(r.unwrap()):r instanceof me?A(r._def.innerType):[];class Ne extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.object)return u(t,{code:d.invalid_type,expected:h.object,received:t.parsedType}),g;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}):(u(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),g)}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=A(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 Ne({typeName:v.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(s)})}}function Re(r,e){const t=P(r),s=P(e);if(r===e)return{valid:!0,data:r};if(t===h.object&&s===h.object){const n=x.objectKeys(e),a=x.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const l=Re(r[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(t===h.array&&s===h.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],l=Re(i,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===h.date&&s===h.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class de extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(Ee(a)||Ee(i))return g;const o=Re(a.value,i.value);return o.valid?((Oe(a)||Oe(i))&&t.dirty(),{status:t.value,value:o.data}):(u(s,{code:d.invalid_intersection_types}),g)};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}))}}de.create=(r,e,t)=>new de({left:r,right:e,typeName:v.ZodIntersection,...y(t)});class R extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.array)return u(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),g;if(s.data.length<this._def.items.length)return u(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&s.data.length>this._def.items.length&&(u(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 l=this._def.items[o]||this._def.rest;return l?l._parse(new O(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>w.mergeArray(t,i)):w.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:r,typeName:v.ZodTuple,rest:null,...y(e)})};class ce extends _{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!==h.object)return u(s,{code:d.invalid_type,expected:h.object,received:s.parsedType}),g;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new O(s,o,s.path,o)),value:i._parse(new O(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?w.mergeObjectAsync(t,n):w.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof _?new ce({keyType:e,valueType:t,typeName:v.ZodRecord,...y(s)}):new ce({keyType:j.create(),valueType:e,typeName:v.ZodRecord,...y(t)})}}class we extends _{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!==h.map)return u(s,{code:d.invalid_type,expected:h.map,received:s.parsedType}),g;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,l],c)=>({key:n._parse(new O(s,o,s.path,[c,"key"])),value:a._parse(new O(s,l,s.path,[c,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,m=await l.value;if(c.status==="aborted"||m.status==="aborted")return g;(c.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(c.value,m.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of i){const c=l.key,m=l.value;if(c.status==="aborted"||m.status==="aborted")return g;(c.status==="dirty"||m.status==="dirty")&&t.dirty(),o.set(c.value,m.value)}return{status:t.value,value:o}}}}we.create=(r,e,t)=>new we({valueType:e,keyType:r,typeName:v.ZodMap,...y(t)});class W extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.set)return u(s,{code:d.invalid_type,expected:h.set,received:s.parsedType}),g;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(u(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&&(u(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(l){const c=new Set;for(const m of l){if(m.status==="aborted")return g;m.status==="dirty"&&t.dirty(),c.add(m.value)}return{status:t.value,value:c}}const o=[...s.data.values()].map((l,c)=>a._parse(new O(s,l,s.path,c)));return s.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,t){return new W({...this._def,minSize:{value:e,message:f.toString(t)}})}max(e,t){return new W({...this._def,maxSize:{value:e,message:f.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}W.create=(r,e)=>new W({valueType:r,minSize:null,maxSize:null,typeName:v.ZodSet,...y(e)});class J extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.function)return u(t,{code:d.invalid_type,expected:h.function,received:t.parsedType}),g;function s(o,l){return _e({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),G].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:l}})}function n(o,l){return _e({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),G].filter(c=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Q){const o=this;return T(async function(...l){const c=new N([]),m=await o._def.args.parseAsync(l,a).catch(q=>{throw c.addIssue(s(l,q)),c}),k=await Reflect.apply(i,this,m);return await o._def.returns._def.type.parseAsync(k,a).catch(q=>{throw c.addIssue(n(k,q)),c})})}else{const o=this;return T(function(...l){const c=o._def.args.safeParse(l,a);if(!c.success)throw new N([s(l,c.error)]);const m=Reflect.apply(i,this,c.data),k=o._def.returns.safeParse(m,a);if(!k.success)throw new N([n(m,k.error)]);return k.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new J({...this._def,args:R.create(e).rest(U.create())})}returns(e){return new J({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new J({args:e||R.create([]).rest(U.create()),returns:t||U.create(),typeName:v.ZodFunction,...y(s)})}}class le extends _{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})}}le.create=(r,e)=>new le({getter:r,typeName:v.ZodLazy,...y(e)});class ue extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return u(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}ue.create=(r,e)=>new ue({value:r,typeName:v.ZodLiteral,...y(e)});function Be(r,e){return new L({values:r,typeName:v.ZodEnum,...y(e)})}class L extends _{constructor(){super(...arguments),ee.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{expected:x.joinValues(s),received:t.parsedType,code:d.invalid_type}),g}if(xe(this,ee)||Le(this,ee,new Set(this._def.values)),!xe(this,ee).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{received:t.data,code:d.invalid_enum_value,options:s}),g}return T(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 L.create(e,{...this._def,...t})}exclude(e,t=this._def){return L.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}ee=new WeakMap;L.create=Be;class he extends _{constructor(){super(...arguments),te.set(this,void 0)}_parse(e){const t=x.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==h.string&&s.parsedType!==h.number){const n=x.objectValues(t);return u(s,{expected:x.joinValues(n),received:s.parsedType,code:d.invalid_type}),g}if(xe(this,te)||Le(this,te,new Set(x.getValidEnumValues(this._def.values))),!xe(this,te).has(e.data)){const n=x.objectValues(t);return u(s,{received:s.data,code:d.invalid_enum_value,options:n}),g}return T(e.data)}get enum(){return this._def.values}}te=new WeakMap;he.create=(r,e)=>new he({values:r,typeName:v.ZodNativeEnum,...y(e)});class Q extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.promise&&t.common.async===!1)return u(t,{code:d.invalid_type,expected:h.promise,received:t.parsedType}),g;const s=t.parsedType===h.promise?t.data:Promise.resolve(t.data);return T(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Q.create=(r,e)=>new Q({type:r,typeName:v.ZodPromise,...y(e)});class Z extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===v.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=>{u(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 g;const l=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return l.status==="aborted"?g:l.status==="dirty"||t.value==="dirty"?Y(l.value):l});{if(t.value==="aborted")return g;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?g:o.status==="dirty"||t.value==="dirty"?Y(o.value):o}}if(n.type==="refinement"){const i=o=>{const l=n.refinement(o,a);if(s.common.async)return Promise.resolve(l);if(l 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"?g:(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"?g:(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(!re(i))return i;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=>re(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);x.assertNever(n)}}Z.create=(r,e,t)=>new Z({schema:r,typeName:v.ZodEffects,effect:e,...y(t)});Z.createWithPreprocess=(r,e,t)=>new Z({schema:e,effect:{type:"preprocess",transform:r},typeName:v.ZodEffects,...y(t)});class E extends _{_parse(e){return this._getType(e)===h.undefined?T(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}E.create=(r,e)=>new E({innerType:r,typeName:v.ZodOptional,...y(e)});class D extends _{_parse(e){return this._getType(e)===h.null?T(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(r,e)=>new D({innerType:r,typeName:v.ZodNullable,...y(e)});class fe extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===h.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}fe.create=(r,e)=>new fe({innerType:r,typeName:v.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class me extends _{_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 se(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new N(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new N(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}me.create=(r,e)=>new me({innerType:r,typeName:v.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Te extends _{_parse(e){if(this._getType(e)!==h.nan){const s=this._getOrReturnCtx(e);return u(s,{code:d.invalid_type,expected:h.nan,received:s.parsedType}),g}return{status:"valid",value:e.data}}}Te.create=r=>new Te({typeName:v.ZodNaN,...y(r)});const _t=Symbol("zod_brand");class Ie extends _{_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 ve extends _{_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"?g:a.status==="dirty"?(t.dirty(),Y(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"?g: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 ve({in:e,out:t,typeName:v.ZodPipeline})}}class pe extends _{_parse(e){const t=this._def.innerType._parse(e),s=n=>(re(n)&&(n.value=Object.freeze(n.value)),n);return se(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}pe.create=(r,e)=>new pe({innerType:r,typeName:v.ZodReadonly,...y(e)});function We(r,e={},t){return r?X.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,l=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,c=typeof o=="str
1ing"?{message:o}:o;n.addIssue({code:"custom",...c,fatal:l})}}):X.create()}const xt={object:b.lazycreate};var v;(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"})(v||(v={}));const bt=(r,e={message:`Input not instance of ${r.name}`})=>We(t=>t instanceof r,e),qe=j.create,He=$.create,kt=Te.create,wt=V.create,Ye=ne.create,Tt=B.create,Nt=be.create,jt=ae.create,St=ie.create,Zt=X.
1create,Ct=U.create,Et=M.create,Ot=ke.create,Rt=S.create,It=b.create,At=b.strictCreate,Mt=oe.create,Pt=Ne.create,$t=de.create,Vt=R.create,Lt=ce.create,Dt=we.create,zt=W.create,Ut=J.create,Bt=le.create,Wt=ue.create,qt=L.create,Ht=he.create,Yt=Q.create,$e=Z.create,Jt=E.create,Gt=D.create,Xt=Z.createWithPreprocess,Qt=ve.create,Kt=()=>qe().optional(),Ft=()=>He().optional(),er=()=>Ye().optional(),tr={string:r=>j.create({...r,coerce:!0}),number:r=>$.create({...r,coerce:!0}),boolean:r=>ne.create({...r,coerce:!0}),bigint:r=>V.create({...r,coerce:!0}),date:r=>B.create({...r,coerce:!0})},rr=g;var Ze=Object.freeze({__proto__:null,defaultErrorMap:G,setErrorMap:rt,getErrorMap:ye,makeIssue:_e,EMPTY_PATH:st,addIssueToContext:u,ParseStatus:w,INVALID:g,DIRTY:Y,OK:T,isAborted:Ee,isDirty:Oe,isValid:re,isAsync:se,get util(){return x},get objectUtil(){return Ce},ZodParsedType:h,getParsedType:P,ZodType:_,datetimeRegex:Ue,ZodString:j,ZodNumber:$,ZodBigInt:V,ZodBoolean:ne,ZodDate:B,ZodSymbol:be,ZodUndefined:ae,ZodNull:ie,ZodAny:X,ZodUnknown:U,ZodNever:M,ZodVoid:ke,ZodArray:S,ZodObject:b,ZodUnion:oe,ZodDiscriminatedUnion:Ne,ZodIntersection:de,ZodTuple:R,ZodRecord:ce,ZodMap:we,ZodSet:W,ZodFunction:J,ZodLazy:le,ZodLiteral:ue,ZodEnum:L,ZodNativeEnum:he,ZodPromise:Q,ZodEffects:Z,ZodTransformer:Z,ZodOptional:E,ZodNullable:D,ZodDefault:fe,ZodCatch:me,ZodNaN:Te,BRAND:_t,ZodBranded:Ie,ZodPipeline:ve,ZodReadonly:pe,custom:We,Schema:_,ZodSchema:_,late:xt,get ZodFirstPartyTypeKind(){return v},coerce:tr,any:Zt,array:Rt,bigint:wt,boolean:Ye,date:Tt,discriminatedUnion:Pt,effect:$e,enum:qt,function:Ut,instanceof:bt,intersection:$t,lazy:Bt,literal:Wt,map:Dt,nan:kt,nativeEnum:Ht,never:Et,null:St,nullable:Gt,number:He,object:It,oboolean:er,onumber:Ft,optional:Jt,ostring:Kt,pipeline:Qt,preprocess:Xt,promise:Yt,record:Lt,set:zt,strictObject:At,string:qe,symbol:Nt,transformer:$e,tuple:Vt,undefined:jt,union:Mt,unknown:Ct,void:Ot,NEVER:rr,ZodIssueCode:d,quotelessJson:tt,ZodError:N});const sr=Ze.object({email:Ze.string().email("Please enter a valid email"),password:Ze.string().min(6,"Password must be at least 6 characters")});function hr(){const[r,e]=F.useState(!0),[t,s]=F.useState(!1),[n,a]=F.useState(""),[i,o]=F.useState(""),l=Xe(),[c]=Qe(),{toast:m}=Je(),k=c.get("next")||"/";F.useEffect(()=>{K.auth.getSession().then(({data:C})=>{C.session&&l(k)});const{data:{subscription:I}}=K.auth.onAuthStateChange((C,z)=>{z&&l(k)});return()=>I.unsubscribe()},[]);const ge=async I=>{I.preventDefault();const C=sr.safeParse({email:n,password:i});if(!C.success){m({title:"Validation Error",description:C.error.errors[0].message,variant:"destructive"});return}s(!0);try{if(r){const{error:z}=await K.auth.signInWithPassword({email:n,password:i});if(z){m({title:"Login Failed",description:z.message,variant:"destructive"});return}m({title:"Success",description:"Logged in successfully"})}else{const{error:z}=await K.auth.signUp({email:n,password:i,options:{emailRedirectTo:`${window.location.origin}/`}});if(z){m({title:"Signup Failed",description:z.message,variant:"destructive"});return}m({title:"Account Created",description:"Check your email to confirm your account"})}}finally{s(!1)}},q=async I=>{s(!0);try{const{error:C}=await K.auth.signInWithOAuth({provider:I,options:{redirectTo:`${window.location.origin}/auth?next=${encodeURIComponent(k)}`}});if(C)throw C}catch(C){m({title:"OAuth Error",description:C.message,variant:"destructive"}),s(!1)}};return p.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[p.jsx("nav",{className:"border-b border-border/50",children:p.jsx("div",{className:"container mx-auto px-4 py-4 flex items-center justify-center",children:p.jsxs("a",{href:"/",className:"flex items-center gap-2 no-underline group/logo",children:[p.jsx("div",{className:"w-9 h-9 rounded-xl overflow-hidden flex items-center justify-center shadow-lg shadow-cyan-500/20 transition-all group-hover/logo:shadow-cyan-400/40",children:p.jsx("img",{src:"/images/tornado-icon.jpg",alt:"
1ViralSpinAI Logo",className:"w-full h-full object-cover"})}),p.jsxs("span",{className:"text-base font-bold tracking-tight text-white group-hover/logo:text-cyan-400 transition-colors",children:["ViralSpin",p.jsx("span",{className:"text-cyan-400 group-hover/logo:text-white",children:"AI"})]})]})})}),p.jsx("div",{className:"flex-1 flex items-center justify-center px-4 py-12",children:p.jsx(Ke.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"w-full max-w-md",children:p.jsxs("div",{className:"glass rounded-2xl p-8 border border-border/50",children:[p.jsxs("div",{className:"text-center mb-8",children:[p.jsx("h2",{className:"text-3xl font-bold mb-2",children:r?"Welcome Back":"Create Your Account"}),p.jsx("p",{className:"text-muted-foreground",children:r?"Sign in to continue creating amazing videos":"Sign up to start generating AI videos"})]}),p.jsxs("form",{onSubmit:ge,className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx(Me,{children:"Email"}),p.jsxs("div",{className:"relative mt-2",children:[p.jsx(Fe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),p.jsx(Ae,{type:"email",placeholder:"[email protected]",value:n,onChange:I=>a(I.target.value),className:"pl-10 bg-background/50 border-border/50"})]})]}),p.jsxs("div",{children:[p.jsx(Me,{children:"Password"}),p.jsxs("div",{className:"relative mt-2",children:[p.jsx(et,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),p.jsx(Ae,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:i,onChange:I=>o(I.target.value),className:"pl-10 bg-background/50 border-border/50"})]})]}),p.jsx(je,{type:"submit",className:"w-full button-gradient neon-glow",disabled:t,size:"lg",children:t?p.jsx(Ge,{className:"h-4 w-4 animate-spin"}):r?"Sign In":"Sign Up"})]}),p.jsxs("div",{className:"relative my-6",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx("div",{className:"w-full border-t border-border/50"})}),p.jsx("div",{className:"relative flex justify-center text-sm",children:p.jsx("span",{className:"px-2 bg-background text-muted-foreground",children:"Or continue with"})})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[p.jsxs(je,{variant:"outline",className:"w-full",disabled:t,onClick:()=>q("google"),children:[p.jsxs("svg",{className:"w-4 h-4 mr-2",viewBox:"0 0 24 24",children:[p.jsx("path",{fill:"#4285F4",d:"M22.56 12.25a10.5 10.5 0 0 0-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31l3.57 2.77c2.08-1.92 3.28-4.74 3.28-8.09z"}),p.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18V17.8C3.99 20.53 7.7 23 12 23z"}),p.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09a7.9 7.9 0 0 1-.35-2.09c0-.73.13-1.43.35-2.09V7.07H2.18A11.3 11.3 0 0 0 1 12c0 1.78.43 3.45 1.18 4.93l3.66-2.84z"}),p.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84C6.71 7.31 9.14 5.38 12 5.38z"})]}),"Google"]}),p.jsxs(je,{variant:"outline",className:"w-full",disabled:t,onClick:()=>q("facebook"),children:[p.jsx("svg",{className:"w-4 h-4 mr-2",viewBox:"0 0 24 24",children:p.jsx("path",{d:"M24 12.073C24 5.446 18.627 0 12 0S0 5.446 0 12.073C0 18.062 4.388 23.027 10.125 23.927v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),"Facebook"]})]}),p.jsx("div",{className:"mt-6 text-center text-sm",children:p.jsx("button",{type:"button",onClick:()=>e(!r),className:"text-primary hover:underline",children:r?"Don't have an account? Sign up":"Already have an account? Sign in"})})]})})}),p.jsx("footer",{className:"border-t border-border/50 py-6",children:p.jsxs("div",{className:"container mx-auto px-4 text-sm text-muted-foreground flex justify-between",children:[p.jsx("p",{children:"© 2026 ViralSpinAI. All rights reserved."}),p.jsxs("div",{className:"flex gap-6",children:[p.jsx("a",{href:"#",className:"hover:text-foreground",children:"Privacy Policy"}),p.jsx("a",{href:"#",className:"hover:text-foreground",children:"Terms of Service"})]})]})})]})}export{hr as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.