scordi-extension 1.15.1 → 1.15.3

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.
@@ -0,0 +1 @@
1
+ function t(r){return r&&r.isBlock===!0&&r.type==="EXECUTE_BLOCK"}function e(r){return r&&r.type==="CDP_CLICK"}function i(r){return r&&r.type==="CDP_KEYPRESS"}function n(r){return r&&r.type==="FETCH_API"}function u(r){return r&&r.$isError===!0}export{t as a,e as b,i as c,n as d,u as i};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-tW55lo_h.js","assets/types-BId3CBm7.js"])))=>i.map(i=>d[i]);
2
+ import{r as k,a as h,j as m,c as x}from"./index-B45Q7XiR.js";import{i as y,a as b}from"./internal-messages-Drf0Gb9U.js";const C="modulepreload",v=function(s){return"/"+s},g={},E=function(e,t,n){let o=Promise.resolve();if(t&&t.length>0){let l=function(i){return Promise.all(i.map(c=>Promise.resolve(c).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),p=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));o=l(t.map(i=>{if(i=v(i),i in g)return;g[i]=!0;const c=i.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${f}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":C,c||(d.as="script"),d.crossOrigin="",d.href=i,p&&d.setAttribute("nonce",p),document.head.appendChild(d),c)return new Promise((u,w)=>{d.addEventListener("load",u),d.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${i}`)))})}))}function a(l){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=l,window.dispatchEvent(r),!r.defaultPrevented)throw l}return o.then(l=>{for(const r of l||[])r.status==="rejected"&&a(r.reason);return e().catch(a)})};class L{async sendToBackground(e){return new Promise((t,n)=>{chrome.runtime.sendMessage(e,o=>{chrome.runtime.lastError?n(new Error(chrome.runtime.lastError.message||"Communication error")):y(o)?n(new Error(o.message)):t(o)})})}async executeBlock(e){const{BlockHandler:t}=await E(async()=>{const{BlockHandler:o}=await import("./index-tW55lo_h.js");return{BlockHandler:o}},__vite__mapDeps([0,1])),{synchronizedLock:n}=await E(async()=>{const{synchronizedLock:o}=await import("./index-CYVwV_2L.js");return{synchronizedLock:o}},[]);await n.getLock();try{return await t.executeBlock(e)}finally{n.releaseLock()}}async handleRuntimeMessage(e){if(e!=null&&e.isBlock&&(e==null?void 0:e.type)==="EXECUTE_BLOCK")try{return await this.executeBlock(e.data)}catch(t){return{$isError:!0,message:t instanceof Error?t.message:"Unknown error",data:{}}}throw new Error("Invalid message type")}sendToWebpage(e){window.postMessage(e,"*")}createErrorResponse(e,t){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!1,result:{error:t instanceof Error?t.message:"Unknown error",timestamp:new Date().toISOString()}}}createSuccessResponse(e,t){return{type:"8G_COLLECT_RESPONSE",requestId:e,success:!0,result:t}}}class S{constructor(e){this.kernel=e}initializeMessageListener(){chrome.runtime.onMessage.addListener((e,t,n)=>b(e)?(this.kernel.handleRuntimeMessage(e).then(o=>n(o)).catch(o=>n(this.kernel.createErrorResponse("",o))),!0):!1)}}class T{constructor(e){this.kernel=e}initializeMessageListener(){window.addEventListener("message",this.handleWindowMessage.bind(this))}async handleWindowMessage(e){if(e.source!==window)return;const t=e.data;switch(t.type){case"8G_EXTENSION_CHECK":this.handleExtensionCheck();break;case"8G_COLLECT_WORKFLOW":await this.handleCollectWorkflow(t);break}}handleExtensionCheck(){const e={type:"8G_EXTENSION_RESPONSE",installed:!0,version:"1.0.0"};this.kernel.sendToWebpage(e)}async handleCollectWorkflow(e){try{this.validateCollectWorkflowMessage(e);const t={type:"COLLECT_WORKFLOW_NEW_TAB",data:{targetUrl:e.targetUrl,workflow:e.workflow,closeTabAfterCollection:e.closeTabAfterCollection!==!1,activateTab:e.activateTab===!0}};try{const n=await this.kernel.sendToBackground(t),o=this.kernel.createSuccessResponse(e.requestId,n);this.kernel.sendToWebpage(o)}catch(n){const o=this.kernel.createErrorResponse(e.requestId,n);this.kernel.sendToWebpage(o)}}catch(t){const n=this.kernel.createErrorResponse(e.requestId,t);this.kernel.sendToWebpage(n)}}validateCollectWorkflowMessage(e){if(!e.targetUrl)throw new Error("Target URL is required");if(!e.workflow)throw new Error("Workflow is required");if(!e.workflow.start||!Array.isArray(e.workflow.steps))throw new Error("Workflow must have start and steps")}}var R=k();const _={"top-left":{top:"20px",left:"20px"},"top-right":{top:"20px",right:"20px"},"bottom-left":{bottom:"20px",left:"20px"},"bottom-right":{bottom:"20px",right:"20px"}};function I({message:s,buttonText:e,position:t,onConfirm:n,visible:o}){const[a,l]=h.useState(!1);h.useEffect(()=>{o?setTimeout(()=>l(!0),10):l(!1)},[o]);const r=()=>{const u=window.location.href.toLowerCase();return u.includes("login")||u.includes("signin")?"로그인 완료 후 확인 버튼을 클릭해주세요.":s};if(!o)return null;const p=()=>{l(!1),setTimeout(()=>{n()},200)},i={position:"fixed",..._[t],zIndex:2147483647,backgroundColor:"#ffffff",border:"2px solid #4f46e5",borderRadius:"12px",padding:"16px 20px",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",gap:"12px",minWidth:"280px",maxWidth:"400px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',transform:a?"scale(1)":"scale(0.9)",opacity:a?1:0,transition:"transform 0.2s ease-out, opacity 0.2s ease-out"},c={margin:0,fontSize:"14px",lineHeight:"1.5",color:"#1f2937",fontWeight:500},f={backgroundColor:"#4f46e5",color:"#ffffff",border:"none",borderRadius:"8px",padding:"10px 16px",fontSize:"14px",fontWeight:600,cursor:"pointer",transition:"background-color 0.2s ease",outline:"none"},d={backgroundColor:"#4338ca"};return R.createPortal(m.jsxs("div",{style:i,onClick:u=>u.stopPropagation(),children:[m.jsx("p",{style:c,children:r()}),m.jsx("button",{style:f,onMouseEnter:u=>{u.currentTarget.style.backgroundColor=d.backgroundColor},onMouseLeave:u=>{u.currentTarget.style.backgroundColor=f.backgroundColor},onClick:p,children:e})]}),document.body)}function W(){const[s,e]=h.useState({visible:!1,message:"",buttonText:"",position:"bottom-right",onConfirm:null});h.useEffect(()=>{const n=a=>{const l=a,{message:r,buttonText:p,position:i,onConfirm:c}=l.detail;console.log("[ConfirmationUI] Show event received:",{message:r,buttonText:p,position:i}),e({visible:!0,message:r,buttonText:p,position:i,onConfirm:c})},o=()=>{console.log("[ConfirmationUI] Hide event received"),e(a=>({...a,visible:!1}))};return window.addEventListener("8g-show-confirmation-ui",n),window.addEventListener("8g-hide-confirmation-ui",o),()=>{window.removeEventListener("8g-show-confirmation-ui",n),window.removeEventListener("8g-hide-confirmation-ui",o)}},[]);const t=()=>{console.log("[ConfirmationUI] User confirmed"),s.onConfirm&&s.onConfirm(),e(n=>({...n,visible:!1}))};return m.jsx(I,{message:s.message,buttonText:s.buttonText,position:s.position,onConfirm:t,visible:s.visible})}(()=>{if(window.is8gExtensionInjected)return;window.is8gExtensionInjected=!0,console.log("[8G Extension] Content script initialized on:",window.location.href);const s=new L,e=new S(s),t=new T(s);if(e.initializeMessageListener(),t.initializeMessageListener(),window.self===window.top){const o=()=>{const a=document.createElement("div");a.id="8g-confirmation-ui-root",a.style.cssText="all: initial; position: fixed; z-index: 2147483647;",document.body.appendChild(a),x.createRoot(a).render(m.jsx(W,{})),console.log("[8G Extension] Confirmation UI mounted (top frame only)")};document.body?o():document.addEventListener("DOMContentLoaded",o)}else console.log("[8G Extension] Skipping UI mount (inside iframe)")})();
@@ -0,0 +1,13 @@
1
+ (function () {
2
+ 'use strict';
3
+
4
+ const injectTime = performance.now();
5
+ (async () => {
6
+ const { onExecute } = await import(
7
+ /* @vite-ignore */
8
+ chrome.runtime.getURL("assets/main.tsx-DtStYr-r.js")
9
+ );
10
+ onExecute?.({ perf: { injectTime, loadTime: performance.now() - injectTime } });
11
+ })().catch(console.error);
12
+
13
+ })();
@@ -0,0 +1 @@
1
+ var tt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function st(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var ve;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ve||(ve={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),j=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?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(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},c=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"]),rt=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};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(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,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 a(this),r}static assert(e){if(!(e instanceof T))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={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const W=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Te=W;function at(s){Te=s}function ue(){return Te}const le=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const f=r.filter(l=>!!l).slice().reverse();for(const l of f)o=l(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}},nt=[];function d(s,e){const t=ue(),r=le({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===W?void 0:W].filter(a=>!!a)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return p;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return p;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const p=Object.freeze({status:"aborted"}),B=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),xe=s=>s.status==="aborted",ke=s=>s.status==="dirty",L=s=>s.status==="valid",H=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class S{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}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 be=(s,e)=>{if(L(e))return{success:!0,data:e.value};if(!s.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 T(s.common.issues);return this._error=t,this._error}}};function y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:a}}class _{get description(){return this._def.description}_getType(e){return j(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:j(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 r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},a=this._parseSync({data:e,path:r.path,parent:r});return be(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return L(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>L(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={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:j(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(H(a)?a:Promise.resolve(a));return be(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:c.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new Z({schema:this,typeName:m.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 N.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 K.create(this,e,this._def)}transform(e){return new Z({...y(this._def),schema:this,typeName:m.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:m.ZodDefault})}brand(){return new Ae({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return oe.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ne=/^c[^\s-]{8,}$/i,Re=/^[0-9a-z]+$/,Ze=/^[0-9A-HJKMNP-TV-Z]{26}$/i,je=/^[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,Ee=/^[a-z0-9_-]{21}$/i,Ie=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$e=/^[-+]?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)?)??$/,Me=/^(?!\.)(?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-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])$/,Ue=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Be=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ce="((\\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])))",Fe=new RegExp(`^${Ce}$`);function Oe(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function We(s){return new RegExp(`^${Oe(s)}$`)}function qe(s){let e=`${Ce}T${Oe(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Je(s,e){return!!((e==="v4"||!e)&&Pe.test(s)||(e==="v6"||!e)&&Le.test(s))}function He(s,e){if(!Ie.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Ye(s,e){return!!((e==="v4"||!e)&&ze.test(s)||(e==="v6"||!e)&&De.test(s))}class C extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.string,received:n.parsedType}),p}const r=new k;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.length<n.value;(i||o)&&(a=this._getOrReturnCtx(e,a),i?d(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&d(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Me.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"email",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")de||(de=new RegExp(Ve,"u")),de.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"emoji",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")je.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"uuid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Ee.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"nanoid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")Ne.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"cuid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")Re.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"cuid2",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")Ze.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"ulid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),d(a,{validation:"url",code:c.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"regex",code:c.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?qe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?Fe.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?We(n).test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?$e.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"duration",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?Je(e.data,n.version)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"ip",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?He(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"jwt",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?Ye(e.data,n.version)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"cidr",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?Ue.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"base64",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Be.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"base64url",code:c.invalid_string,message:n.message}),r.dirty()):v.assertNever(n);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:c.invalid_string,...h.errToObj(r)})}_addCheck(e){return new C({...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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.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,...h.errToObj(e==null?void 0: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==null?void 0:t.position,...h.errToObj(t==null?void 0: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 C({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new C({...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}}C.create=s=>new C({checks:[],typeName:m.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});function Ge(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class I 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)!==u.number){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.number,received:n.parsedType}),p}let r;const a=new k;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?Ge(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.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,r,a){return new I({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new I({...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 r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}I.create=s=>new I({checks:[],typeName:m.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class $ extends _{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 r;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),p}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,r,a){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_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=s=>new $({checks:[],typeName:m.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});class Y extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.boolean,received:r.parsedType}),p}return b(e.data)}}Y.create=s=>new Y({typeName:m.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class D extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.date,received:n.parsedType}),p}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_date}),p}const r=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...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}}D.create=s=>new D({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:m.ZodDate,...y(s)});class fe extends _{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.symbol,received:r.parsedType}),p}return b(e.data)}}fe.create=s=>new fe({typeName:m.ZodSymbol,...y(s)});class G extends _{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.undefined,received:r.parsedType}),p}return b(e.data)}}G.create=s=>new G({typeName:m.ZodUndefined,...y(s)});class Q extends _{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.null,received:r.parsedType}),p}return b(e.data)}}Q.create=s=>new Q({typeName:m.ZodNull,...y(s)});class q extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}q.create=s=>new q({typeName:m.ZodAny,...y(s)});class z extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}z.create=s=>new z({typeName:m.ZodUnknown,...y(s)});class E extends _{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),p}}E.create=s=>new E({typeName:m.ZodNever,...y(s)});class he extends _{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.void,received:r.parsedType}),p}return b(e.data)}}he.create=s=>new he({typeName:m.ZodVoid,...y(s)});class O extends _{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),p;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.length<a.exactLength.value;(i||o)&&(d(t,{code:i?c.too_big:c.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(d(t,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(d(t,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new S(t,i,t.path,o)))).then(i=>k.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new S(t,i,t.path,o)));return k.mergeArray(r,n)}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=(s,e)=>new O({type:s,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function P(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=N.create(P(r))}return new x({...s._def,shape:()=>e})}else return s instanceof O?new O({...s._def,type:P(s.element)}):s instanceof N?N.create(P(s.unwrap())):s instanceof V?V.create(P(s.unwrap())):s instanceof R?R.create(s.items.map(e=>P(e))):s}class x 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=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 d(l,{code:c.invalid_type,expected:u.object,received:l.parsedType}),p}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof E&&this._def.unknownKeys==="strip"))for(const l in a.data)i.includes(l)||o.push(l);const f=[];for(const l of i){const g=n[l],w=a.data[l];f.push({key:{status:"valid",value:l},value:g._parse(new S(a,w,a.path,l)),alwaysSet:l in a.data})}if(this._def.catchall instanceof E){const l=this._def.unknownKeys;if(l==="passthrough")for(const g of o)f.push({key:{status:"valid",value:g},value:{status:"valid",value:a.data[g]}});else if(l==="strict")o.length>0&&(d(a,{code:c.unrecognized_keys,keys:o}),r.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 w=a.data[g];f.push({key:{status:"valid",value:g},value:l._parse(new S(a,w,a.path,g)),alwaysSet:g in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const l=[];for(const g of f){const w=await g.key,ge=await g.value;l.push({key:w,value:ge,alwaysSet:g.alwaysSet})}return l}).then(l=>k.mergeObjectSync(r,l)):k.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}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:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return P(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof N;)n=n._def.innerType;t[r]=n}return new x({...this._def,shape:()=>t})}keyof(){return Se(v.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:E.create(),typeName:m.ZodObject,...y(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});class X extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const f of r){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"&&!n&&(n={result:g,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new T(f));return d(t,{code:c.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}}X.create=(s,e)=>new X({options:s,typeName:m.ZodUnion,...y(e)});const A=s=>s instanceof te?A(s.schema):s instanceof Z?A(s.innerType()):s instanceof se?[s.value]:s instanceof M?s.options:s instanceof re?v.objectValues(s.enum):s instanceof ae?A(s._def.innerType):s instanceof G?[void 0]:s instanceof Q?[null]:s instanceof N?[void 0,...A(s.unwrap())]:s instanceof V?[null,...A(s.unwrap())]:s instanceof Ae||s instanceof ie?A(s.unwrap()):s instanceof ne?A(s._def.innerType):[];class _e extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return d(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),p;const r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(d(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const n of t){const i=A(n.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(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new _e({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...y(r)})}}function pe(s,e){const t=j(s),r=j(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=pe(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<s.length;n++){const i=s[n],o=e[n],f=pe(i,o);if(!f.valid)return{valid:!1};a.push(f.data)}return{valid:!0,data:a}}else return t===u.date&&r===u.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class K extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(xe(n)||xe(i))return p;const o=pe(n.value,i.value);return o.valid?((ke(n)||ke(i))&&t.dirty(),{status:t.value,value:o.data}):(d(r,{code:c.invalid_intersection_types}),p)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}K.create=(s,e,t)=>new K({left:s,right:e,typeName:m.ZodIntersection,...y(t)});class R extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return d(r,{code:c.invalid_type,expected:u.array,received:r.parsedType}),p;if(r.data.length<this._def.items.length)return d(r,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&r.data.length>this._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new S(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>k.mergeArray(t,i)):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:m.ZodTuple,rest:null,...y(e)})};class ee extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return d(r,{code:c.invalid_type,expected:u.object,received:r.parsedType}),p;const a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new S(r,o,r.path,o)),value:i._parse(new S(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?k.mergeObjectAsync(t,a):k.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof _?new ee({keyType:e,valueType:t,typeName:m.ZodRecord,...y(r)}):new ee({keyType:C.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class me extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return d(r,{code:c.invalid_type,expected:u.map,received:r.parsedType}),p;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],l)=>({key:a._parse(new S(r,o,r.path,[l,"key"])),value:n._parse(new S(r,f,r.path,[l,"value"]))}));if(r.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 p;(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 p;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(l.value,g.value)}return{status:t.value,value:o}}}}me.create=(s,e,t)=>new me({valueType:e,keyType:s,typeName:m.ZodMap,...y(t)});class U extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return d(r,{code:c.invalid_type,expected:u.set,received:r.parsedType}),p;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(d(r,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(d(r,{code:c.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const l=new Set;for(const g of f){if(g.status==="aborted")return p;g.status==="dirty"&&t.dirty(),l.add(g.value)}return{status:t.value,value:l}}const o=[...r.data.values()].map((f,l)=>n._parse(new S(r,f,r.path,l)));return r.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=(s,e)=>new U({valueType:s,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class F extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return d(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),p;function r(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),W].filter(l=>!!l),issueData:{code:c.invalid_arguments,argumentsError:f}})}function a(o,f){return le({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ue(),W].filter(l=>!!l),issueData:{code:c.invalid_return_type,returnTypeError:f}})}const n={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof J){const o=this;return b(async function(...f){const l=new T([]),g=await o._def.args.parseAsync(f,n).catch(ce=>{throw l.addIssue(r(f,ce)),l}),w=await Reflect.apply(i,this,g);return await o._def.returns._def.type.parseAsync(w,n).catch(ce=>{throw l.addIssue(a(w,ce)),l})})}else{const o=this;return b(function(...f){const l=o._def.args.safeParse(f,n);if(!l.success)throw new T([r(f,l.error)]);const g=Reflect.apply(i,this,l.data),w=o._def.returns.safeParse(g,n);if(!w.success)throw new T([a(g,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new F({...this._def,args:R.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,r){return new F({args:e||R.create([]).rest(z.create()),returns:t||z.create(),typeName:m.ZodFunction,...y(r)})}}class te 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})}}te.create=(s,e)=>new te({getter:s,typeName:m.ZodLazy,...y(e)});class se extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(s,e)=>new se({value:s,typeName:m.ZodLiteral,...y(e)});function Se(s,e){return new M({values:s,typeName:m.ZodEnum,...y(e)})}class M extends _{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:v.joinValues(r),received:t.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),p}return b(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 M.create(e,{...this._def,...t})}exclude(e,t=this._def){return M.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}M.create=Se;class re extends _{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return d(r,{expected:v.joinValues(a),received:r.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=v.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:a}),p}return b(e.data)}get enum(){return this._def.values}}re.create=(s,e)=>new re({values:s,typeName:m.ZodNativeEnum,...y(e)});class J extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),p;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}J.create=(s,e)=>new J({type:s,typeName:m.ZodPromise,...y(e)});class Z extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{d(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return p;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?p:f.status==="dirty"||t.value==="dirty"?B(f.value):f});{if(t.value==="aborted")return p;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?p:o.status==="dirty"||t.value==="dirty"?B(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);if(r.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(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!L(i))return p;const o=a.transform(i.value,n);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:r.data,path:r.path,parent:r}).then(i=>L(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):p);v.assertNever(a)}}Z.create=(s,e,t)=>new Z({schema:s,typeName:m.ZodEffects,effect:e,...y(t)});Z.createWithPreprocess=(s,e,t)=>new Z({schema:e,effect:{type:"preprocess",transform:s},typeName:m.ZodEffects,...y(t)});class N extends _{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}N.create=(s,e)=>new N({innerType:s,typeName:m.ZodOptional,...y(e)});class V extends _{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(s,e)=>new V({innerType:s,typeName:m.ZodNullable,...y(e)});class ae extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ne extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return H(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ye extends _{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.nan,received:r.parsedType}),p}return{status:"valid",value:e.data}}}ye.create=s=>new ye({typeName:m.ZodNaN,...y(s)});const it=Symbol("zod_brand");class Ae extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class oe extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?p:n.status==="dirty"?(t.dirty(),B(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new oe({in:e,out:t,typeName:m.ZodPipeline})}}class ie extends _{_parse(e){const t=this._def.innerType._parse(e),r=a=>(L(a)&&(a.value=Object.freeze(a.value)),a);return H(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:m.ZodReadonly,...y(e)});function we(s,e){const t=typeof s=="function"?s(e):typeof s=="string"?{message:s}:s;return typeof t=="string"?{message:t}:t}function Qe(s,e={},t){return s?q.create().superRefine((r,a)=>{const n=s(r);if(n instanceof Promise)return n.then(i=>{if(!i){const o=we(e,r),f=o.fatal??t??!0;a.addIssue({code:"custom",...o,fatal:f})}});if(!n){const i=we(e,r),o=i.fatal??t??!0;a.addIssue({code:"custom",...i,fatal:o})}}):q.create()}const ot={object:x.lazycreate};var m;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(m||(m={}));const ct=(s,e={message:`Input not instance of ${s.name}`})=>Qe(t=>t instanceof s,e),Xe=C.create,Ke=I.create,dt=ye.create,ut=$.create,et=Y.create,lt=D.create,ft=fe.create,ht=G.create,pt=Q.create,mt=q.create,yt=z.create,_t=E.create,gt=he.create,vt=O.create,xt=x.create,kt=x.strictCreate,bt=X.create,wt=_e.create,Tt=K.create,Ct=R.create,Ot=ee.create,St=me.create,At=U.create,Nt=F.create,Rt=te.create,Zt=se.create,jt=M.create,Et=re.create,It=J.create,$t=Z.create,Mt=N.create,Vt=V.create,Pt=Z.createWithPreprocess,zt=oe.create,Lt=()=>Xe().optional(),Dt=()=>Ke().optional(),Ut=()=>et().optional(),Bt={string:(s=>C.create({...s,coerce:!0})),number:(s=>I.create({...s,coerce:!0})),boolean:(s=>Y.create({...s,coerce:!0})),bigint:(s=>$.create({...s,coerce:!0})),date:(s=>D.create({...s,coerce:!0}))},Ft=p;export{R as $,te as A,it as B,se as C,B as D,nt as E,me as F,ye as G,re as H,p as I,E as J,Q as K,V as L,I as M,Ft as N,b as O,k as P,x as Q,N as R,u as S,oe as T,J as U,ie as V,ee as W,U as X,C as Y,m as Z,fe as _,mt as a,G as a0,X as a1,z as a2,he as a3,d as a4,ut as a5,Bt as a6,Qe as a7,lt as a8,qe as a9,zt as aA,Pt as aB,It as aC,rt as aD,Ot as aE,At as aF,at as aG,kt as aH,ft as aI,Ct as aJ,ht as aK,yt as aL,v as aM,gt as aN,tt as aO,W as aa,wt as ab,$t as ac,Nt as ad,ue as ae,j as af,ct as ag,Tt as ah,xe as ai,H as aj,ke as ak,L as al,ot as am,Rt as an,le as ao,St as ap,dt as aq,Et as ar,_t as as,pt as at,Vt as au,ve as av,Ut as aw,Dt as ax,Mt as ay,Lt as az,vt as b,et as c,_ as d,jt as e,q as f,st as g,O as h,$ as i,Y as j,Ae as k,Zt as l,ne as m,Ke as n,xt as o,D as p,ae as q,_e as r,Xe as s,Z as t,bt as u,M as v,T as w,F as x,K as y,c as z};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "scordi-extension",
4
- "version": "1.15.1",
4
+ "version": "1.15.2",
5
5
  "icons": {
6
6
  "48": "public/logo.png"
7
7
  },
@@ -240,9 +240,13 @@ export declare class EightGClient {
240
240
  * 워크플로우 실행 요청
241
241
  */
242
242
  collectWorkflow(request: CollectWorkflowRequest): Promise<CollectWorkflowResult>;
243
- getWorkspaces(request: CollectWorkflowRequest): Promise<ConnectWorkspaceResponseDto>;
244
- getWorkspacePlanAndCycle(request: CollectWorkflowRequest): Promise<WorkspaceBillingDto | null>;
245
- getWorkspaceBillingHistories(request: CollectWorkflowRequest): Promise<WorkspaceBillingHistoryDto[]>;
246
- getWorkspaceMembers(request: CollectWorkflowRequest): Promise<WorkspaceMemberDto[]>;
243
+ getWorkspaces(request: CollectWorkflowRequest): Promise<ConnectWorkspaceResponseDto & CollectWorkflowResult>;
244
+ getWorkspacePlanAndCycle(workspaceKey: string, request: CollectWorkflowRequest): Promise<WorkspaceBillingDto & CollectWorkflowResult | CollectWorkflowResult>;
245
+ getWorkspaceBillingHistories(workspaceKey: string, request: CollectWorkflowRequest): Promise<{
246
+ data: WorkspaceBillingHistoryDto[];
247
+ } & CollectWorkflowResult>;
248
+ getWorkspaceMembers(workspaceKey: string, request: CollectWorkflowRequest): Promise<{
249
+ data: WorkspaceMemberDto[];
250
+ } & CollectWorkflowResult>;
247
251
  }
248
252
  //# sourceMappingURL=EightGClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EightGClient.d.ts","s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