edgeone 1.6.44-beta.1 → 1.6.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/edgeone-dist/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ var WZt=Object.create;var Sq=Object.defineProperty;var YZt=Object.getOwnProperty
|
|
|
18
18
|
`;return Pl(t,r)}function ZL(t){let e=Zpe.join(process.cwd(),".edgeone","auth.json");fT(e,{EDGEONE_PAGES_API_TOKEN:t.token,EDGEONE_PAGES_API_REGION:t.region})}function dT(){try{let t=Zpe.join(process.cwd(),".edgeone","auth.json");if(!Xm.default.existsSync(t))return null;let e=JSON.parse(Xm.default.readFileSync(t,"utf-8"));return{token:e==null?void 0:e.EDGEONE_PAGES_API_TOKEN,region:e==null?void 0:e.EDGEONE_PAGES_API_REGION}}catch{return null}}function QMe(t){return Xm.default.unlinkSync(t)}function qMe(t,e){return Q_(t)?Xm.default.appendFileSync(t,e):Xm.default.writeFileSync(t,e)}var LMe,Xm,jMe,nY,Zpe,Au=su(()=>{LMe=Pt(tY()),Xm=Pt(require("fs")),jMe=Pt(require("os"));el();nY=FMe(),Zpe=require("path")});var tfe=P((Fsi,UMe)=>{var gtr=typeof global=="object"&&global&&global.Object===Object&&global;UMe.exports=gtr});var e4=P((Lsi,zMe)=>{var Atr=tfe(),ytr=typeof self=="object"&&self&&self.Object===Object&&self,vtr=Atr||ytr||Function("return this")();zMe.exports=vtr});var Qq=P((jsi,$Me)=>{var xtr=e4(),btr=xtr.Symbol;$Me.exports=btr});var rfe=P((Msi,HMe)=>{function Etr(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}HMe.exports=Etr});var sY=P((Qsi,VMe)=>{var wtr=Array.isArray;VMe.exports=wtr});var JMe=P((qsi,YMe)=>{var GMe=Qq(),WMe=Object.prototype,_tr=WMe.hasOwnProperty,Str=WMe.toString,qq=GMe?GMe.toStringTag:void 0;function Ctr(t){var e=_tr.call(t,qq),r=t[qq];try{t[qq]=void 0;var n=!0}catch{}var o=Str.call(t);return n&&(e?t[qq]=r:delete t[qq]),o}YMe.exports=Ctr});var XMe=P((Usi,KMe)=>{var Itr=Object.prototype,ktr=Itr.toString;function Ttr(t){return ktr.call(t)}KMe.exports=Ttr});var t4=P((zsi,tQe)=>{var ZMe=Qq(),Btr=JMe(),Dtr=XMe(),Ptr="[object Null]",Rtr="[object Undefined]",eQe=ZMe?ZMe.toStringTag:void 0;function Otr(t){return t==null?t===void 0?Rtr:Ptr:eQe&&eQe in Object(t)?Btr(t):Dtr(t)}tQe.exports=Otr});var JP=P(($si,rQe)=>{function Ntr(t){return t!=null&&typeof t=="object"}rQe.exports=Ntr});var iQe=P((Hsi,nQe)=>{var Ftr=t4(),Ltr=JP(),jtr="[object Symbol]";function Mtr(t){return typeof t=="symbol"||Ltr(t)&&Ftr(t)==jtr}nQe.exports=Mtr});var lQe=P((Vsi,uQe)=>{var sQe=Qq(),Qtr=rfe(),qtr=sY(),Utr=iQe(),ztr=1/0,oQe=sQe?sQe.prototype:void 0,aQe=oQe?oQe.toString:void 0;function cQe(t){if(typeof t=="string")return t;if(qtr(t))return Qtr(t,cQe)+"";if(Utr(t))return aQe?aQe.call(t):"";var e=t+"";return e=="0"&&1/t==-ztr?"-0":e}uQe.exports=cQe});var Uq=P((Gsi,pQe)=>{var $tr=lQe();function Htr(t){return t==null?"":$tr(t)}pQe.exports=Htr});var dQe=P((Wsi,fQe)=>{function Vtr(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var s=Array(o);++n<o;)s[n]=t[n+e];return s}fQe.exports=Vtr});var mQe=P((Ysi,hQe)=>{var Gtr=dQe();function Wtr(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Gtr(t,e,r)}hQe.exports=Wtr});var nfe=P((Jsi,gQe)=>{var Ytr="\\ud800-\\udfff",Jtr="\\u0300-\\u036f",Ktr="\\ufe20-\\ufe2f",Xtr="\\u20d0-\\u20ff",Ztr=Jtr+Ktr+Xtr,trr="\\ufe0e\\ufe0f",rrr="\\u200d",nrr=RegExp("["+rrr+Ytr+Ztr+trr+"]");function irr(t){return nrr.test(t)}gQe.exports=irr});var yQe=P((Ksi,AQe)=>{function srr(t){return t.split("")}AQe.exports=srr});var CQe=P((Xsi,SQe)=>{var vQe="\\ud800-\\udfff",orr="\\u0300-\\u036f",arr="\\ufe20-\\ufe2f",crr="\\u20d0-\\u20ff",urr=orr+arr+crr,lrr="\\ufe0e\\ufe0f",prr="["+vQe+"]",ife="["+urr+"]",sfe="\\ud83c[\\udffb-\\udfff]",frr="(?:"+ife+"|"+sfe+")",xQe="[^"+vQe+"]",bQe="(?:\\ud83c[\\udde6-\\uddff]){2}",EQe="[\\ud800-\\udbff][\\udc00-\\udfff]",drr="\\u200d",wQe=frr+"?",_Qe="["+lrr+"]?",hrr="(?:"+drr+"(?:"+[xQe,bQe,EQe].join("|")+")"+_Qe+wQe+")*",mrr=_Qe+wQe+hrr,grr="(?:"+[xQe+ife+"?",ife,bQe,EQe,prr].join("|")+")",Arr=RegExp(sfe+"(?="+sfe+")|"+grr+mrr,"g");function yrr(t){return t.match(Arr)||[]}SQe.exports=yrr});var kQe=P((Zsi,IQe)=>{var vrr=yQe(),xrr=nfe(),brr=CQe();function Err(t){return xrr(t)?brr(t):vrr(t)}IQe.exports=Err});var BQe=P((eoi,TQe)=>{var wrr=mQe(),_rr=nfe(),Srr=kQe(),Crr=Uq();function Irr(t){return function(e){e=Crr(e);var r=_rr(e)?Srr(e):void 0,n=r?r[0]:e.charAt(0),o=r?wrr(r,1).join(""):e.slice(1);return n[t]()+o}}TQe.exports=Irr});var PQe=P((toi,DQe)=>{var krr=BQe(),Trr=krr("toUpperCase");DQe.exports=Trr});var OQe=P((roi,RQe)=>{var Brr=Uq(),Drr=PQe();function Prr(t){return Drr(Brr(t).toLowerCase())}RQe.exports=Prr});var FQe=P((noi,NQe)=>{function Rrr(t,e,r,n){var o=-1,s=t==null?0:t.length;for(n&&s&&(r=t[++o]);++o<s;)r=e(r,t[o],o,t);return r}NQe.exports=Rrr});var jQe=P((ioi,LQe)=>{function Orr(t){return function(e){return t==null?void 0:t[e]}}LQe.exports=Orr});var QQe=P((soi,MQe)=>{var Nrr=jQe(),Frr={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Lrr=Nrr(Frr);MQe.exports=Lrr});var UQe=P((ooi,qQe)=>{var jrr=QQe(),Mrr=Uq(),Qrr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qrr="\\u0300-\\u036f",Urr="\\ufe20-\\ufe2f",zrr="\\u20d0-\\u20ff",$rr=qrr+Urr+zrr,Hrr="["+$rr+"]",Vrr=RegExp(Hrr,"g");function Grr(t){return t=Mrr(t),t&&t.replace(Qrr,jrr).replace(Vrr,"")}qQe.exports=Grr});var $Qe=P((aoi,zQe)=>{var Wrr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Yrr(t){return t.match(Wrr)||[]}zQe.exports=Yrr});var VQe=P((coi,HQe)=>{var Jrr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Krr(t){return Jrr.test(t)}HQe.exports=Krr});var p8e=P((uoi,l8e)=>{var KQe="\\ud800-\\udfff",Xrr="\\u0300-\\u036f",Zrr="\\ufe20-\\ufe2f",enr="\\u20d0-\\u20ff",tnr=Xrr+Zrr+enr,XQe="\\u2700-\\u27bf",ZQe="a-z\\xdf-\\xf6\\xf8-\\xff",rnr="\\xac\\xb1\\xd7\\xf7",nnr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",inr="\\u2000-\\u206f",snr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",e8e="A-Z\\xc0-\\xd6\\xd8-\\xde",onr="\\ufe0e\\ufe0f",t8e=rnr+nnr+inr+snr,r8e="['\u2019]",GQe="["+t8e+"]",anr="["+tnr+"]",n8e="\\d+",cnr="["+XQe+"]",i8e="["+ZQe+"]",s8e="[^"+KQe+t8e+n8e+XQe+ZQe+e8e+"]",unr="\\ud83c[\\udffb-\\udfff]",lnr="(?:"+anr+"|"+unr+")",pnr="[^"+KQe+"]",o8e="(?:\\ud83c[\\udde6-\\uddff]){2}",a8e="[\\ud800-\\udbff][\\udc00-\\udfff]",r4="["+e8e+"]",fnr="\\u200d",WQe="(?:"+i8e+"|"+s8e+")",dnr="(?:"+r4+"|"+s8e+")",YQe="(?:"+r8e+"(?:d|ll|m|re|s|t|ve))?",JQe="(?:"+r8e+"(?:D|LL|M|RE|S|T|VE))?",c8e=lnr+"?",u8e="["+onr+"]?",hnr="(?:"+fnr+"(?:"+[pnr,o8e,a8e].join("|")+")"+u8e+c8e+")*",mnr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gnr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Anr=u8e+c8e+hnr,ynr="(?:"+[cnr,o8e,a8e].join("|")+")"+Anr,vnr=RegExp([r4+"?"+i8e+"+"+YQe+"(?="+[GQe,r4,"$"].join("|")+")",dnr+"+"+JQe+"(?="+[GQe,r4+WQe,"$"].join("|")+")",r4+"?"+WQe+"+"+YQe,r4+"+"+JQe,gnr,mnr,n8e,ynr].join("|"),"g");function xnr(t){return t.match(vnr)||[]}l8e.exports=xnr});var d8e=P((loi,f8e)=>{var bnr=$Qe(),Enr=VQe(),wnr=Uq(),_nr=p8e();function Snr(t,e,r){return t=wnr(t),e=r?void 0:e,e===void 0?Enr(t)?_nr(t):bnr(t):t.match(e)||[]}f8e.exports=Snr});var m8e=P((poi,h8e)=>{var Cnr=FQe(),Inr=UQe(),knr=d8e(),Tnr="['\u2019]",Bnr=RegExp(Tnr,"g");function Dnr(t){return function(e){return Cnr(knr(Inr(e).replace(Bnr,"")),t,"")}}h8e.exports=Dnr});var A8e=P((foi,g8e)=>{var Pnr=OQe(),Rnr=m8e(),Onr=Rnr(function(t,e,r){return e=e.toLowerCase(),t+(r?Pnr(e):e)});g8e.exports=Onr});async function oY(t){var e,r;try{let n=JSON.parse(await y8e.default.promises.readFile(v8e.default.join(t,"package.json"),"utf-8"));return((e=n.dependencies)==null?void 0:e.nuxt)||((r=n.devDependencies)==null?void 0:r.nuxt)||"latest"}catch{return"latest"}}function ofe(){return process.env.LANG==="zh_CN.UTF-8"}var Nnr,y8e,v8e,n4=su(()=>{Nnr=Pt(A8e()),y8e=Pt(require("fs")),v8e=Pt(require("path"))});var zq=P(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.getParsedType=Rl.ZodParsedType=Rl.objectUtil=Rl.util=void 0;var afe;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),c={};for(let u of s)c[u]=o[u];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(afe||(Rl.util=afe={}));var x8e;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(x8e||(Rl.objectUtil=x8e={}));Rl.ZodParsedType=afe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Fnr=t=>{switch(typeof t){case"undefined":return Rl.ZodParsedType.undefined;case"string":return Rl.ZodParsedType.string;case"number":return Number.isNaN(t)?Rl.ZodParsedType.nan:Rl.ZodParsedType.number;case"boolean":return Rl.ZodParsedType.boolean;case"function":return Rl.ZodParsedType.function;case"bigint":return Rl.ZodParsedType.bigint;case"symbol":return Rl.ZodParsedType.symbol;case"object":return Array.isArray(t)?Rl.ZodParsedType.array:t===null?Rl.ZodParsedType.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Rl.ZodParsedType.promise:typeof Map<"u"&&t instanceof Map?Rl.ZodParsedType.map:typeof Set<"u"&&t instanceof Set?Rl.ZodParsedType.set:typeof Date<"u"&&t instanceof Date?Rl.ZodParsedType.date:Rl.ZodParsedType.object;default:return Rl.ZodParsedType.unknown}};Rl.getParsedType=Fnr});var aY=P(hT=>{"use strict";Object.defineProperty(hT,"__esModule",{value:!0});hT.ZodError=hT.quotelessJson=hT.ZodIssueCode=void 0;var b8e=zq();hT.ZodIssueCode=b8e.util.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"]);var Lnr=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");hT.quotelessJson=Lnr;var $q=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let u=n,p=0;for(;p<c.path.length;){let f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(r(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return o(this),n}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,b8e.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};hT.ZodError=$q;$q.create=t=>new $q(t)});var ufe=P(cfe=>{"use strict";Object.defineProperty(cfe,"__esModule",{value:!0});var Zg=aY(),KP=zq(),jnr=(t,e)=>{let r;switch(t.code){case Zg.ZodIssueCode.invalid_type:t.received===KP.ZodParsedType.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Zg.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,KP.util.jsonStringifyReplacer)}`;break;case Zg.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${KP.util.joinValues(t.keys,", ")}`;break;case Zg.ZodIssueCode.invalid_union:r="Invalid input";break;case Zg.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${KP.util.joinValues(t.options)}`;break;case Zg.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${KP.util.joinValues(t.options)}, received '${t.received}'`;break;case Zg.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Zg.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Zg.ZodIssueCode.invalid_date:r="Invalid date";break;case Zg.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:KP.util.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Zg.ZodIssueCode.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Zg.ZodIssueCode.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Zg.ZodIssueCode.custom:r="Invalid input";break;case Zg.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Zg.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Zg.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=e.defaultError,KP.util.assertNever(t)}return{message:r}};cfe.default=jnr});var cY=P(mT=>{"use strict";var Mnr=mT&&mT.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mT,"__esModule",{value:!0});mT.defaultErrorMap=void 0;mT.setErrorMap=Qnr;mT.getErrorMap=qnr;var E8e=Mnr(ufe());mT.defaultErrorMap=E8e.default;var w8e=E8e.default;function Qnr(t){w8e=t}function qnr(){return w8e}});var pfe=P(Ou=>{"use strict";var Unr=Ou&&Ou.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.isAsync=Ou.isValid=Ou.isDirty=Ou.isAborted=Ou.OK=Ou.DIRTY=Ou.INVALID=Ou.ParseStatus=Ou.EMPTY_PATH=Ou.makeIssue=void 0;Ou.addIssueToContext=Hnr;var znr=cY(),_8e=Unr(ufe()),$nr=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let u="",p=n.filter(f=>!!f).slice().reverse();for(let f of p)u=f(c,{data:e,defaultError:u}).message;return{...o,path:s,message:u}};Ou.makeIssue=$nr;Ou.EMPTY_PATH=[];function Hnr(t,e){let r=(0,znr.getErrorMap)(),n=(0,Ou.makeIssue)({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===_8e.default?void 0:_8e.default].filter(o=>!!o)});t.common.issues.push(n)}var lfe=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return Ou.INVALID;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return Ou.INVALID;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}};Ou.ParseStatus=lfe;Ou.INVALID=Object.freeze({status:"aborted"});var Vnr=t=>({status:"dirty",value:t});Ou.DIRTY=Vnr;var Gnr=t=>({status:"valid",value:t});Ou.OK=Gnr;var Wnr=t=>t.status==="aborted";Ou.isAborted=Wnr;var Ynr=t=>t.status==="dirty";Ou.isDirty=Ynr;var Jnr=t=>t.status==="valid";Ou.isValid=Jnr;var Knr=t=>typeof Promise<"u"&&t instanceof Promise;Ou.isAsync=Knr});var C8e=P(S8e=>{"use strict";Object.defineProperty(S8e,"__esModule",{value:!0})});var k8e=P(uY=>{"use strict";Object.defineProperty(uY,"__esModule",{value:!0});uY.errorUtil=void 0;var I8e;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(I8e||(uY.errorUtil=I8e={}))});var Q8e=P(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.discriminatedUnion=cr.date=cr.boolean=cr.bigint=cr.array=cr.any=cr.coerce=cr.ZodFirstPartyTypeKind=cr.late=cr.ZodSchema=cr.Schema=cr.ZodReadonly=cr.ZodPipeline=cr.ZodBranded=cr.BRAND=cr.ZodNaN=cr.ZodCatch=cr.ZodDefault=cr.ZodNullable=cr.ZodOptional=cr.ZodTransformer=cr.ZodEffects=cr.ZodPromise=cr.ZodNativeEnum=cr.ZodEnum=cr.ZodLiteral=cr.ZodLazy=cr.ZodFunction=cr.ZodSet=cr.ZodMap=cr.ZodRecord=cr.ZodTuple=cr.ZodIntersection=cr.ZodDiscriminatedUnion=cr.ZodUnion=cr.ZodObject=cr.ZodArray=cr.ZodVoid=cr.ZodNever=cr.ZodUnknown=cr.ZodAny=cr.ZodNull=cr.ZodUndefined=cr.ZodSymbol=cr.ZodDate=cr.ZodBoolean=cr.ZodBigInt=cr.ZodNumber=cr.ZodString=cr.ZodType=void 0;cr.NEVER=cr.void=cr.unknown=cr.union=cr.undefined=cr.tuple=cr.transformer=cr.symbol=cr.string=cr.strictObject=cr.set=cr.record=cr.promise=cr.preprocess=cr.pipeline=cr.ostring=cr.optional=cr.onumber=cr.oboolean=cr.object=cr.number=cr.nullable=cr.null=cr.never=cr.nativeEnum=cr.nan=cr.map=cr.literal=cr.lazy=cr.intersection=cr.instanceof=cr.function=cr.enum=cr.effect=void 0;cr.datetimeRegex=R8e;cr.custom=N8e;var Xn=aY(),lY=cY(),ys=k8e(),fr=pfe(),si=zq(),Db=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}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}},T8e=(t,e)=>{if((0,fr.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Xn.ZodError(t.common.issues);return this._error=r,this._error}}};function ra(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,u)=>{var f,h;let{message:p}=t;return c.code==="invalid_enum_value"?{message:p!=null?p:u.defaultError}:typeof u.data>"u"?{message:(f=p!=null?p:n)!=null?f:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(h=p!=null?p:r)!=null?h:u.defaultError}},description:o}}var na=class{get description(){return this._def.description}_getType(e){return(0,si.getParsedType)(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:(0,si.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new fr.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,si.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if((0,fr.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!=null?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,si.getParsedType)(e)},o=this._parseSync({data:e,path:n.path,parent:n});return T8e(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,si.getParsedType)(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return(0,fr.isValid)(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(o=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>(0,fr.isValid)(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,si.getParsedType)(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await((0,fr.isAsync)(o)?o:Promise.resolve(o));return T8e(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let c=e(o),u=()=>s.addIssue({code:Xn.ZodIssueCode.custom,...n(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new gx({schema:this,typeName:yo.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:r=>this["~validate"](r)}}optional(){return Bb.create(this,this._def)}nullable(){return z_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return B2.create(this)}promise(){return yT.create(this,this._def)}or(e){return iR.create([this,e],this._def)}and(e){return sR.create(this,e,this._def)}transform(e){return new gx({...ra(this._def),schema:this,typeName:yo.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new lR({...ra(this._def),innerType:this,defaultValue:r,typeName:yo.ZodDefault})}brand(){return new Hq({typeName:yo.ZodBranded,type:this,...ra(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new pR({...ra(this._def),innerType:this,catchValue:r,typeName:yo.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Vq.create(this,e)}readonly(){return fR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};cr.ZodType=na;cr.Schema=na;cr.ZodSchema=na;var Xnr=/^c[^\s-]{8,}$/i,Znr=/^[0-9a-z]+$/,eir=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tir=/^[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,rir=/^[a-z0-9_-]{21}$/i,nir=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,iir=/^[-+]?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)?)??$/,sir=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oir="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ffe,air=/^(?:(?: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])$/,cir=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,uir=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,lir=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pir=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,fir=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,D8e="((\\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])))",dir=new RegExp(`^${D8e}$`);function P8e(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function hir(t){return new RegExp(`^${P8e(t)}$`)}function R8e(t){let e=`${D8e}T${P8e(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function mir(t,e){return!!((e==="v4"||!e)&&air.test(t)||(e==="v6"||!e)&&uir.test(t))}function gir(t,e){if(!nir.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Air(t,e){return!!((e==="v4"||!e)&&cir.test(t)||(e==="v6"||!e)&&lir.test(t))}var gT=class t extends na{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==si.ZodParsedType.string){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.string,received:s.parsedType}),fr.INVALID}let n=new fr.ParseStatus,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,u=e.data.length<s.value;(c||u)&&(o=this._getOrReturnCtx(e,o),c?(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")sir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"email",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")ffe||(ffe=new RegExp(oir,"u")),ffe.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"emoji",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")tir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"uuid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")rir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"nanoid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Xnr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"cuid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Znr.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"cuid2",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")eir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"ulid",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"url",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"regex",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?R8e(s).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?dir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?hir(s).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?iir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"duration",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?mir(e.data,s.version)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"ip",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?gir(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"jwt",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Air(e.data,s.version)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"cidr",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?pir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"base64",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?fir.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{validation:"base64url",code:Xn.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):si.util.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:Xn.ZodIssueCode.invalid_string,...ys.errorUtil.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ys.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ys.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ys.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ys.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ys.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ys.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ys.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ys.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ys.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ys.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ys.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ys.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ys.errorUtil.errToObj(e)})}datetime(e){var r,n;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:(r=e==null?void 0:e.offset)!=null?r:!1,local:(n=e==null?void 0:e.local)!=null?n:!1,...ys.errorUtil.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,...ys.errorUtil.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ys.errorUtil.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ys.errorUtil.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...ys.errorUtil.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ys.errorUtil.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ys.errorUtil.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ys.errorUtil.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ys.errorUtil.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ys.errorUtil.errToObj(r)})}nonempty(e){return this.min(1,ys.errorUtil.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};cr.ZodString=gT;gT.create=t=>{var e;return new gT({checks:[],typeName:yo.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...ra(t)})};function yir(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}var XP=class t extends na{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)!==si.ZodParsedType.number){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.number,received:s.parsedType}),fr.INVALID}let n,o=new fr.ParseStatus;for(let s of this._def.checks)s.kind==="int"?si.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?yir(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.not_finite,message:s.message}),o.dirty()):si.util.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ys.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ys.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ys.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ys.errorUtil.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ys.errorUtil.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ys.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ys.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ys.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ys.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ys.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ys.errorUtil.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ys.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ys.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ys.errorUtil.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&si.util.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};cr.ZodNumber=XP;XP.create=t=>new XP({checks:[],typeName:yo.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ra(t)});var ZP=class t extends na{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)!==si.ZodParsedType.bigint)return this._getInvalidInput(e);let n,o=new fr.ParseStatus;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):si.util.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.bigint,received:r.parsedType}),fr.INVALID}gte(e,r){return this.setLimit("min",e,!0,ys.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ys.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ys.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ys.errorUtil.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:ys.errorUtil.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ys.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ys.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ys.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ys.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ys.errorUtil.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};cr.ZodBigInt=ZP;ZP.create=t=>{var e;return new ZP({checks:[],typeName:yo.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...ra(t)})};var eR=class extends na{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==si.ZodParsedType.boolean){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.boolean,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodBoolean=eR;eR.create=t=>new eR({typeName:yo.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ra(t)});var tR=class t extends na{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==si.ZodParsedType.date){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.date,received:s.parsedType}),fr.INVALID}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(s,{code:Xn.ZodIssueCode.invalid_date}),fr.INVALID}let n=new fr.ParseStatus,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),(0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):si.util.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:ys.errorUtil.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ys.errorUtil.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};cr.ZodDate=tR;tR.create=t=>new tR({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:yo.ZodDate,...ra(t)});var s4=class extends na{_parse(e){if(this._getType(e)!==si.ZodParsedType.symbol){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.symbol,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodSymbol=s4;s4.create=t=>new s4({typeName:yo.ZodSymbol,...ra(t)});var rR=class extends na{_parse(e){if(this._getType(e)!==si.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.undefined,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodUndefined=rR;rR.create=t=>new rR({typeName:yo.ZodUndefined,...ra(t)});var nR=class extends na{_parse(e){if(this._getType(e)!==si.ZodParsedType.null){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.null,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodNull=nR;nR.create=t=>new nR({typeName:yo.ZodNull,...ra(t)});var AT=class extends na{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,fr.OK)(e.data)}};cr.ZodAny=AT;AT.create=t=>new AT({typeName:yo.ZodAny,...ra(t)});var T2=class extends na{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,fr.OK)(e.data)}};cr.ZodUnknown=T2;T2.create=t=>new T2({typeName:yo.ZodUnknown,...ra(t)});var C1=class extends na{_parse(e){let r=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.never,received:r.parsedType}),fr.INVALID}};cr.ZodNever=C1;C1.create=t=>new C1({typeName:yo.ZodNever,...ra(t)});var o4=class extends na{_parse(e){if(this._getType(e)!==si.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.void,received:n.parsedType}),fr.INVALID}return(0,fr.OK)(e.data)}};cr.ZodVoid=o4;o4.create=t=>new o4({typeName:yo.ZodVoid,...ra(t)});var B2=class t extends na{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==si.ZodParsedType.array)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.array,received:r.parsedType}),fr.INVALID;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,u=r.data.length<o.exactLength.value;(c||u)&&((0,fr.addIssueToContext)(r,{code:c?Xn.ZodIssueCode.too_big:Xn.ZodIssueCode.too_small,minimum:u?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&((0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&((0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,u)=>o.type._parseAsync(new Db(r,c,r.path,u)))).then(c=>fr.ParseStatus.mergeArray(n,c));let s=[...r.data].map((c,u)=>o.type._parseSync(new Db(r,c,r.path,u)));return fr.ParseStatus.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:ys.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:ys.errorUtil.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:ys.errorUtil.toString(r)}})}nonempty(e){return this.min(1,e)}};cr.ZodArray=B2;B2.create=(t,e)=>new B2({type:t,minLength:null,maxLength:null,exactLength:null,typeName:yo.ZodArray,...ra(e)});function i4(t){if(t instanceof jy){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Bb.create(i4(n))}return new jy({...t._def,shape:()=>e})}else return t instanceof B2?new B2({...t._def,type:i4(t.element)}):t instanceof Bb?Bb.create(i4(t.unwrap())):t instanceof z_?z_.create(i4(t.unwrap())):t instanceof U_?U_.create(t.items.map(e=>i4(e))):t}var jy=class t extends na{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=si.util.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==si.ZodParsedType.object){let f=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(f,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.object,received:f.parsedType}),fr.INVALID}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof C1&&this._def.unknownKeys==="strip"))for(let f in o.data)c.includes(f)||u.push(f);let p=[];for(let f of c){let h=s[f],g=o.data[f];p.push({key:{status:"valid",value:f},value:h._parse(new Db(o,g,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof C1){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)p.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&((0,fr.addIssueToContext)(o,{code:Xn.ZodIssueCode.unrecognized_keys,keys:u}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of u){let g=o.data[h];p.push({key:{status:"valid",value:h},value:f._parse(new Db(o,g,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of p){let g=await h.key,y=await h.value;f.push({key:g,value:y,alwaysSet:h.alwaysSet})}return f}).then(f=>fr.ParseStatus.mergeObjectSync(n,f)):fr.ParseStatus.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return ys.errorUtil.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,c,u,p;let o=(u=(c=(s=this._def).errorMap)==null?void 0:c.call(s,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(p=ys.errorUtil.errToObj(e).message)!=null?p:o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:yo.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of si.util.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of si.util.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return i4(this)}partial(e){let r={};for(let n of si.util.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of si.util.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Bb;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return O8e(si.util.objectKeys(this.shape))}};cr.ZodObject=jy;jy.create=(t,e)=>new jy({shape:()=>t,unknownKeys:"strip",catchall:C1.create(),typeName:yo.ZodObject,...ra(e)});jy.strictCreate=(t,e)=>new jy({shape:()=>t,unknownKeys:"strict",catchall:C1.create(),typeName:yo.ZodObject,...ra(e)});jy.lazycreate=(t,e)=>new jy({shape:t,unknownKeys:"strip",catchall:C1.create(),typeName:yo.ZodObject,...ra(e)});var iR=class extends na{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let c=s.map(u=>new Xn.ZodError(u.ctx.common.issues));return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_union,unionErrors:c}),fr.INVALID}if(r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let p of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=p._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=c.map(p=>new Xn.ZodError(p));return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_union,unionErrors:u}),fr.INVALID}}get options(){return this._def.options}};cr.ZodUnion=iR;iR.create=(t,e)=>new iR({options:t,typeName:yo.ZodUnion,...ra(e)});var k2=t=>t instanceof oR?k2(t.schema):t instanceof gx?k2(t.innerType()):t instanceof aR?[t.value]:t instanceof cR?t.options:t instanceof uR?si.util.objectValues(t.enum):t instanceof lR?k2(t._def.innerType):t instanceof rR?[void 0]:t instanceof nR?[null]:t instanceof Bb?[void 0,...k2(t.unwrap())]:t instanceof z_?[null,...k2(t.unwrap())]:t instanceof Hq||t instanceof fR?k2(t.unwrap()):t instanceof pR?k2(t._def.innerType):[],pY=class t extends na{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==si.ZodParsedType.object)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.object,received:r.parsedType}),fr.INVALID;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):((0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),fr.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=k2(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of c){if(o.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);o.set(u,s)}}return new t({typeName:yo.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...ra(n)})}};cr.ZodDiscriminatedUnion=pY;function dfe(t,e){let r=(0,si.getParsedType)(t),n=(0,si.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(r===si.ZodParsedType.object&&n===si.ZodParsedType.object){let o=si.util.objectKeys(e),s=si.util.objectKeys(t).filter(u=>o.indexOf(u)!==-1),c={...t,...e};for(let u of s){let p=dfe(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(r===si.ZodParsedType.array&&n===si.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let c=t[s],u=e[s],p=dfe(c,u);if(!p.valid)return{valid:!1};o.push(p.data)}return{valid:!0,data:o}}else return r===si.ZodParsedType.date&&n===si.ZodParsedType.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var sR=class extends na{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,c)=>{if((0,fr.isAborted)(s)||(0,fr.isAborted)(c))return fr.INVALID;let u=dfe(s.value,c.value);return u.valid?(((0,fr.isDirty)(s)||(0,fr.isDirty)(c))&&r.dirty(),{status:r.value,value:u.data}):((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_intersection_types}),fr.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};cr.ZodIntersection=sR;sR.create=(t,e,r)=>new sR({left:t,right:e,typeName:yo.ZodIntersection,...ra(r)});var U_=class t extends na{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==si.ZodParsedType.array)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.array,received:n.parsedType}),fr.INVALID;if(n.data.length<this._def.items.length)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),fr.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,u)=>{let p=this._def.items[u]||this._def.rest;return p?p._parse(new Db(n,c,n.path,u)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>fr.ParseStatus.mergeArray(r,c)):fr.ParseStatus.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};cr.ZodTuple=U_;U_.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new U_({items:t,typeName:yo.ZodTuple,rest:null,...ra(e)})};var fY=class t extends na{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==si.ZodParsedType.object)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.object,received:n.parsedType}),fr.INVALID;let o=[],s=this._def.keyType,c=this._def.valueType;for(let u in n.data)o.push({key:s._parse(new Db(n,u,n.path,u)),value:c._parse(new Db(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?fr.ParseStatus.mergeObjectAsync(r,o):fr.ParseStatus.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof na?new t({keyType:e,valueType:r,typeName:yo.ZodRecord,...ra(n)}):new t({keyType:gT.create(),valueType:e,typeName:yo.ZodRecord,...ra(r)})}};cr.ZodRecord=fY;var a4=class extends na{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==si.ZodParsedType.map)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.map,received:n.parsedType}),fr.INVALID;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([u,p],f)=>({key:o._parse(new Db(n,u,n.path,[f,"key"])),value:s._parse(new Db(n,p,n.path,[f,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let p of c){let f=await p.key,h=await p.value;if(f.status==="aborted"||h.status==="aborted")return fr.INVALID;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let p of c){let f=p.key,h=p.value;if(f.status==="aborted"||h.status==="aborted")return fr.INVALID;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}}}};cr.ZodMap=a4;a4.create=(t,e,r)=>new a4({valueType:e,keyType:t,typeName:yo.ZodMap,...ra(r)});var c4=class t extends na{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==si.ZodParsedType.set)return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.set,received:n.parsedType}),fr.INVALID;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&((0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(p){let f=new Set;for(let h of p){if(h.status==="aborted")return fr.INVALID;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}let u=[...n.data.values()].map((p,f)=>s._parse(new Db(n,p,n.path,f)));return n.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,r){return new t({...this._def,minSize:{value:e,message:ys.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:ys.errorUtil.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};cr.ZodSet=c4;c4.create=(t,e)=>new c4({valueType:t,minSize:null,maxSize:null,typeName:yo.ZodSet,...ra(e)});var dY=class t extends na{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==si.ZodParsedType.function)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.function,received:r.parsedType}),fr.INVALID;function n(u,p){return(0,fr.makeIssue)({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,lY.getErrorMap)(),lY.defaultErrorMap].filter(f=>!!f),issueData:{code:Xn.ZodIssueCode.invalid_arguments,argumentsError:p}})}function o(u,p){return(0,fr.makeIssue)({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,lY.getErrorMap)(),lY.defaultErrorMap].filter(f=>!!f),issueData:{code:Xn.ZodIssueCode.invalid_return_type,returnTypeError:p}})}let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof yT){let u=this;return(0,fr.OK)(async function(...p){let f=new Xn.ZodError([]),h=await u._def.args.parseAsync(p,s).catch(b=>{throw f.addIssue(n(p,b)),f}),g=await Reflect.apply(c,this,h);return await u._def.returns._def.type.parseAsync(g,s).catch(b=>{throw f.addIssue(o(g,b)),f})})}else{let u=this;return(0,fr.OK)(function(...p){let f=u._def.args.safeParse(p,s);if(!f.success)throw new Xn.ZodError([n(p,f.error)]);let h=Reflect.apply(c,this,f.data),g=u._def.returns.safeParse(h,s);if(!g.success)throw new Xn.ZodError([o(h,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:U_.create(e).rest(T2.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||U_.create([]).rest(T2.create()),returns:r||T2.create(),typeName:yo.ZodFunction,...ra(n)})}};cr.ZodFunction=dY;var oR=class extends na{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};cr.ZodLazy=oR;oR.create=(t,e)=>new oR({getter:t,typeName:yo.ZodLazy,...ra(e)});var aR=class extends na{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(r,{received:r.data,code:Xn.ZodIssueCode.invalid_literal,expected:this._def.value}),fr.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};cr.ZodLiteral=aR;aR.create=(t,e)=>new aR({value:t,typeName:yo.ZodLiteral,...ra(e)});function O8e(t,e){return new cR({values:t,typeName:yo.ZodEnum,...ra(e)})}var cR=class t extends na{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,fr.addIssueToContext)(r,{expected:si.util.joinValues(n),received:r.parsedType,code:Xn.ZodIssueCode.invalid_type}),fr.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,fr.addIssueToContext)(r,{received:r.data,code:Xn.ZodIssueCode.invalid_enum_value,options:n}),fr.INVALID}return(0,fr.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};cr.ZodEnum=cR;cR.create=O8e;var uR=class extends na{_parse(e){let r=si.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==si.ZodParsedType.string&&n.parsedType!==si.ZodParsedType.number){let o=si.util.objectValues(r);return(0,fr.addIssueToContext)(n,{expected:si.util.joinValues(o),received:n.parsedType,code:Xn.ZodIssueCode.invalid_type}),fr.INVALID}if(this._cache||(this._cache=new Set(si.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=si.util.objectValues(r);return(0,fr.addIssueToContext)(n,{received:n.data,code:Xn.ZodIssueCode.invalid_enum_value,options:o}),fr.INVALID}return(0,fr.OK)(e.data)}get enum(){return this._def.values}};cr.ZodNativeEnum=uR;uR.create=(t,e)=>new uR({values:t,typeName:yo.ZodNativeEnum,...ra(e)});var yT=class extends na{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==si.ZodParsedType.promise&&r.common.async===!1)return(0,fr.addIssueToContext)(r,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.promise,received:r.parsedType}),fr.INVALID;let n=r.parsedType===si.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,fr.OK)(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};cr.ZodPromise=yT;yT.create=(t,e)=>new yT({type:t,typeName:yo.ZodPromise,...ra(e)});var gx=class extends na{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===yo.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:c=>{(0,fr.addIssueToContext)(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async u=>{if(r.value==="aborted")return fr.INVALID;let p=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return p.status==="aborted"?fr.INVALID:p.status==="dirty"||r.value==="dirty"?(0,fr.DIRTY)(p.value):p});{if(r.value==="aborted")return fr.INVALID;let u=this._def.schema._parseSync({data:c,path:n.path,parent:n});return u.status==="aborted"?fr.INVALID:u.status==="dirty"||r.value==="dirty"?(0,fr.DIRTY)(u.value):u}}if(o.type==="refinement"){let c=u=>{let p=o.refinement(u,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?fr.INVALID:(u.status==="dirty"&&r.dirty(),c(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?fr.INVALID:(u.status==="dirty"&&r.dirty(),c(u.value).then(()=>({status:r.value,value:u.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,fr.isValid)(c))return fr.INVALID;let u=o.transform(c.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>(0,fr.isValid)(c)?Promise.resolve(o.transform(c.value,s)).then(u=>({status:r.value,value:u})):fr.INVALID);si.util.assertNever(o)}};cr.ZodEffects=gx;cr.ZodTransformer=gx;gx.create=(t,e,r)=>new gx({schema:t,typeName:yo.ZodEffects,effect:e,...ra(r)});gx.createWithPreprocess=(t,e,r)=>new gx({schema:e,effect:{type:"preprocess",transform:t},typeName:yo.ZodEffects,...ra(r)});var Bb=class extends na{_parse(e){return this._getType(e)===si.ZodParsedType.undefined?(0,fr.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};cr.ZodOptional=Bb;Bb.create=(t,e)=>new Bb({innerType:t,typeName:yo.ZodOptional,...ra(e)});var z_=class extends na{_parse(e){return this._getType(e)===si.ZodParsedType.null?(0,fr.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};cr.ZodNullable=z_;z_.create=(t,e)=>new z_({innerType:t,typeName:yo.ZodNullable,...ra(e)});var lR=class extends na{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===si.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};cr.ZodDefault=lR;lR.create=(t,e)=>new lR({innerType:t,typeName:yo.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ra(e)});var pR=class extends na{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,fr.isAsync)(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Xn.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Xn.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};cr.ZodCatch=pR;pR.create=(t,e)=>new pR({innerType:t,typeName:yo.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ra(e)});var u4=class extends na{_parse(e){if(this._getType(e)!==si.ZodParsedType.nan){let n=this._getOrReturnCtx(e);return(0,fr.addIssueToContext)(n,{code:Xn.ZodIssueCode.invalid_type,expected:si.ZodParsedType.nan,received:n.parsedType}),fr.INVALID}return{status:"valid",value:e.data}}};cr.ZodNaN=u4;u4.create=t=>new u4({typeName:yo.ZodNaN,...ra(t)});cr.BRAND=Symbol("zod_brand");var Hq=class extends na{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};cr.ZodBranded=Hq;var Vq=class t extends na{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?fr.INVALID:s.status==="dirty"?(r.dirty(),(0,fr.DIRTY)(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?fr.INVALID:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:yo.ZodPipeline})}};cr.ZodPipeline=Vq;var fR=class extends na{_parse(e){let r=this._def.innerType._parse(e),n=o=>((0,fr.isValid)(o)&&(o.value=Object.freeze(o.value)),o);return(0,fr.isAsync)(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};cr.ZodReadonly=fR;fR.create=(t,e)=>new fR({innerType:t,typeName:yo.ZodReadonly,...ra(e)});function B8e(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function N8e(t,e={},r){return t?AT.create().superRefine((n,o)=>{var c,u;let s=t(n);if(s instanceof Promise)return s.then(p=>{var f,h;if(!p){let g=B8e(e,n),y=(h=(f=g.fatal)!=null?f:r)!=null?h:!0;o.addIssue({code:"custom",...g,fatal:y})}});if(!s){let p=B8e(e,n),f=(u=(c=p.fatal)!=null?c:r)!=null?u:!0;o.addIssue({code:"custom",...p,fatal:f})}}):AT.create()}cr.late={object:jy.lazycreate};var yo;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(yo||(cr.ZodFirstPartyTypeKind=yo={}));var vir=(t,e={message:`Input not instance of ${t.name}`})=>N8e(r=>r instanceof t,e);cr.instanceof=vir;var F8e=gT.create;cr.string=F8e;var L8e=XP.create;cr.number=L8e;var xir=u4.create;cr.nan=xir;var bir=ZP.create;cr.bigint=bir;var j8e=eR.create;cr.boolean=j8e;var Eir=tR.create;cr.date=Eir;var wir=s4.create;cr.symbol=wir;var _ir=rR.create;cr.undefined=_ir;var Sir=nR.create;cr.null=Sir;var Cir=AT.create;cr.any=Cir;var Iir=T2.create;cr.unknown=Iir;var kir=C1.create;cr.never=kir;var Tir=o4.create;cr.void=Tir;var Bir=B2.create;cr.array=Bir;var Dir=jy.create;cr.object=Dir;var Pir=jy.strictCreate;cr.strictObject=Pir;var Rir=iR.create;cr.union=Rir;var Oir=pY.create;cr.discriminatedUnion=Oir;var Nir=sR.create;cr.intersection=Nir;var Fir=U_.create;cr.tuple=Fir;var Lir=fY.create;cr.record=Lir;var jir=a4.create;cr.map=jir;var Mir=c4.create;cr.set=Mir;var Qir=dY.create;cr.function=Qir;var qir=oR.create;cr.lazy=qir;var Uir=aR.create;cr.literal=Uir;var zir=cR.create;cr.enum=zir;var $ir=uR.create;cr.nativeEnum=$ir;var Hir=yT.create;cr.promise=Hir;var M8e=gx.create;cr.effect=M8e;cr.transformer=M8e;var Vir=Bb.create;cr.optional=Vir;var Gir=z_.create;cr.nullable=Gir;var Wir=gx.createWithPreprocess;cr.preprocess=Wir;var Yir=Vq.create;cr.pipeline=Yir;var Jir=()=>F8e().optional();cr.ostring=Jir;var Kir=()=>L8e().optional();cr.onumber=Kir;var Xir=()=>j8e().optional();cr.oboolean=Xir;cr.coerce={string:t=>gT.create({...t,coerce:!0}),number:t=>XP.create({...t,coerce:!0}),boolean:t=>eR.create({...t,coerce:!0}),bigint:t=>ZP.create({...t,coerce:!0}),date:t=>tR.create({...t,coerce:!0})};cr.NEVER=fr.INVALID});var hfe=P(Pb=>{"use strict";var Zir=Pb&&Pb.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),l4=Pb&&Pb.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Zir(e,t,r)};Object.defineProperty(Pb,"__esModule",{value:!0});l4(cY(),Pb);l4(pfe(),Pb);l4(C8e(),Pb);l4(zq(),Pb);l4(Q8e(),Pb);l4(aY(),Pb)});var z8e=P(My=>{"use strict";var q8e=My&&My.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),esr=My&&My.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),tsr=My&&My.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&q8e(e,t,r);return esr(e,t),e},rsr=My&&My.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&q8e(e,t,r)};Object.defineProperty(My,"__esModule",{value:!0});My.z=void 0;var U8e=tsr(hfe());My.z=U8e;rsr(hfe(),My);My.default=U8e});var vfe=P((Soi,r6e)=>{var Afe=Object.defineProperty,nsr=Object.getOwnPropertyDescriptor,isr=Object.getOwnPropertyNames,ssr=Object.prototype.hasOwnProperty,osr=(t,e)=>{for(var r in e)Afe(t,r,{get:e[r],enumerable:!0})},asr=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of isr(e))!ssr.call(t,o)&&o!==r&&Afe(t,o,{get:()=>e[o],enumerable:!(n=nsr(e,o))||n.enumerable});return t},csr=t=>asr(Afe({},"__esModule",{value:!0}),t),V8e={};osr(V8e,{defineConfig:()=>Csr,envConfigSchema:()=>Ssr,filteredTefConfigSchema:()=>wsr,nodeFunctionsConfigSchema:()=>Z8e,pathMatch:()=>p4,sandboxConfigSchema:()=>t6e,showError:()=>Gq,tefBuildConfigSchema:()=>G8e,tefConfCachesSchema:()=>e6e,tefConfigSchema:()=>yfe,tefDevConfigSchema:()=>Y8e,tefDevSiteConfigSchema:()=>W8e,tefPublishConfigSchema:()=>X8e,tefRuleConditionSchema:()=>J8e,tefRuleConfigSchema:()=>K8e,validateConfig:()=>Isr});r6e.exports=csr(V8e);var _r=z8e(),G8e=_r.z.object({monitor:_r.z.array(_r.z.string()).optional(),command:_r.z.string().optional(),cwd:_r.z.string().optional(),target_file:_r.z.string()}),W8e=_r.z.object({assets_dir:_r.z.string().optional(),proxy_path:_r.z.string().optional()}),Y8e=_r.z.object({port:_r.z.union([_r.z.number(),_r.z.string()]).optional(),origin:_r.z.string().optional(),timeout:_r.z.union([_r.z.number(),_r.z.string()]).optional(),sandbox:_r.z.boolean().optional(),favicon:_r.z.boolean().optional(),minify:_r.z.boolean().optional(),site:W8e.optional()}),J8e=_r.z.object({target:_r.z.string(),operator:_r.z.union([_r.z.literal("equal"),_r.z.literal("notequal")]),values:_r.z.array(_r.z.string())}),K8e=_r.z.object({condition:_r.z.array(J8e)}),X8e=_r.z.object({minify:_r.z.boolean().optional(),rule:_r.z.array(K8e).optional()}),Z8e=_r.z.object({maxDuration:_r.z.number().min(10).max(120).optional()}),_oi=_r.z.object({type:_r.z.enum(["header","cookie","host","query"]),key:_r.z.string(),value:_r.z.string().optional()}),p4=(t,e)=>{var o,s;let r=t.replace(/\\([?*])/g,"$1");return r.length===0?e.addIssue({code:_r.z.ZodIssueCode.custom,message:"length match error"}):/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(r)?e.addIssue({code:_r.z.ZodIssueCode.custom,message:"char match error"}):((s=(o=r.match(/\*/g))==null?void 0:o.length)!=null?s:0)>1?e.addIssue({code:_r.z.ZodIssueCode.custom,message:"* match error"}):/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(r)||/:(?![a-zA-Z0-9]+)/.test(r)?e.addIssue({code:_r.z.ZodIssueCode.custom,message:": match error"}):!0},mY=_r.z.object({source:_r.z.string().superRefine(p4)});function usr(t){let e=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of e){let n=r.indexOf("="),o=n===-1?r.trim().toLowerCase():r.slice(0,n).trim().toLowerCase();if(o==="stale-while-revalidate"||o==="stale-if-error"){let s=`${o}=86400`;if(n===-1)return`value match error: Cache-Control directive "${o}" must be in k=v form (e.g. ${s})`;if(!r.slice(n+1).trim())return`value match error: Cache-Control directive "${r}" must have a value (e.g. ${s})`}}}var lsr=_r.z.object({key:_r.z.string().min(1).max(100).superRefine((t,e)=>/[^a-zA-Z0-9-]/.test(t)?e.addIssue({code:_r.z.ZodIssueCode.custom,message:"char match error"}):!0),value:_r.z.string().min(1).max(1e3).superRefine((t,e)=>/[\u4e00-\u9fa5]/.test(t)?e.addIssue({code:_r.z.ZodIssueCode.custom,message:"char match error"}):!0)}).superRefine((t,e)=>{if(t.key.toLowerCase()==="cache-control"){let r=usr(t.value);r&&e.addIssue({code:_r.z.ZodIssueCode.custom,path:["value"],message:r})}}),psr=lsr.array().min(1),fsr=mY.merge(_r.z.object({headers:psr})).array(),dsr=_r.z.union([_r.z.literal(307),_r.z.literal(301),_r.z.literal(302),_r.z.literal(308),_r.z.literal(303),_r.z.literal(304)]),hsr=mY.merge(_r.z.object({destination:_r.z.string().superRefine(p4),permanent:_r.z.boolean().optional(),statusCode:dsr.optional()})).array(),msr=mY.merge(_r.z.object({destination:_r.z.string().superRefine(p4)})),gsr=_r.z.object({src:_r.z.string().superRefine(p4),dest:_r.z.string().superRefine(p4)}),Asr=_r.z.union([msr,gsr]).array(),e6e=mY.merge(_r.z.object({cacheTtl:_r.z.number()})).array(),$8e=_r.z.object({included_files:_r.z.array(_r.z.string()).optional().describe("Glob patterns for files to include in the function bundle"),included_files_base_path:_r.z.string().optional().describe("Base path for included_files patterns, defaults to project root"),external_node_modules:_r.z.array(_r.z.string()).optional().describe("Node modules to be treated as external dependencies")}),ysr=_r.z.object({includeFiles:_r.z.array(_r.z.string()).optional().describe("Glob patterns for files to include in the function bundle"),externalNodeModules:_r.z.array(_r.z.string()).optional().describe("Node modules to be treated as external dependencies"),maxDuration:_r.z.number().min(10).max(120).optional().describe("Maximum execution duration for a single invocation (seconds)")}),H8e=_r.z.object({maxDuration:_r.z.number().min(10).max(120).optional().describe("Maximum execution duration for a single invocation (seconds)")}),vsr=_r.z.object({dir:_r.z.string().optional().describe("Directory containing agent route files, relative to project root"),framework:_r.z.enum(["claude-agent-sdk","openai-sdk","openai-agents-sdk","langgraph","crewai","deepagents"]).optional().describe("Agent framework hint for runtime adapters"),runtime:_r.z.string().regex(/^(agent-node|agent-python):(\d+|\d+\.\d+\.\d+)(\|(agent-node|agent-python):(\d+|\d+\.\d+\.\d+))*$/).optional().describe("Agent runtime image tag, e.g. agent-node:1 or agent-python:1.2.0"),timeout:_r.z.number().min(1).max(1800).optional().describe("Maximum execution duration for a single agent run (seconds)"),idleTimeout:_r.z.number().int().min(1).max(21600).optional().describe("Maximum idle time for an agent session before recycling (seconds)"),maxLifetime:_r.z.number().int().min(1).max(604800).optional().describe("Maximum lifetime of an agent session (seconds)"),memoryQuota:_r.z.object({maxMessagesPerConversation:_r.z.number().int().positive().optional().describe("Maximum messages allowed in a single memory conversation")}).optional().describe("Agent memory quota settings"),includeFiles:_r.z.array(_r.z.string()).optional().describe("Glob patterns for files to include in the agent bundle"),sandbox:_r.z.object({timeout:_r.z.number().int().positive().optional().describe("Sandbox instance lifetime/idle timeout in seconds")}).optional().describe("Sandbox configuration for agent runtime"),externalNodeModules:_r.z.array(_r.z.string()).optional().describe("Node modules to be treated as external dependencies for agent runtime"),auth:_r.z.object({type:_r.z.literal("jwt").optional().describe("Auth type. Only 'jwt' is supported; defaults to 'jwt' when omitted."),algorithm:_r.z.enum(["RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512"]).optional().describe("JWT signing algorithm (asymmetric only). Defaults to RS256."),verificationKeys:_r.z.array(_r.z.string().min(1)).min(1).describe("Array of PEM public keys for JWT verification. At least one required.")}).optional().describe('JWT auth config (agent-level, covers all routes including /mcp). Verification is done at the edge controller; the agent runtime exposes the verified identity as the "makers-user-id" request header.')}),t6e=_r.z.object({timeout:_r.z.number().int().positive().optional().describe("Sandbox instance lifetime/idle timeout in seconds")}),xsr=_r.z.object({maxDuration:_r.z.number().min(10).max(120).optional().describe("Maximum execution duration for a single invocation (seconds)"),regions:_r.z.object({mainland:_r.z.array(_r.z.string()).optional().describe('\u56FD\u5185 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-beijing"]'),overseas:_r.z.array(_r.z.string()).optional().describe('\u6D77\u5916 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-tokyo"]')}).optional(),includeFiles:_r.z.array(_r.z.string()).optional().describe("Glob patterns for files to include in the function bundle"),externalNodeModules:_r.z.array(_r.z.string()).optional().describe("Node modules to be treated as external dependencies"),nodejs:ysr.optional(),python:H8e.optional(),go:H8e.optional(),mainlandRegions:_r.z.array(_r.z.string()).optional().describe('\u56FD\u5185 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-shanghai"]'),overseasRegions:_r.z.array(_r.z.string()).optional().describe('\u6D77\u5916 SCF \u90E8\u7F72\u5730\u57DF, \u5982 ["ap-bangkok"]')}),bsr=_r.z.object({name:_r.z.string().min(1).max(128).describe("Unique name for the schedule task within the project"),cron:_r.z.string().min(1).describe("Standard 5-field cron expression, e.g. */5 * * * *"),timezone:_r.z.string().optional().describe("Timezone for cron parsing, e.g. Asia/Shanghai. Defaults to local system timezone at build time"),method:_r.z.enum(["GET","POST","PUT","DELETE","PATCH","HEAD"]).optional().default("POST").describe("HTTP method for the trigger request. Defaults to POST"),path:_r.z.string().min(1).describe("HTTP path of the cloud function to trigger, e.g. /api/cron/tick"),payload:_r.z.record(_r.z.unknown()).optional().describe("JSON payload to send with the trigger request")}),Esr=_r.z.array(bsr).max(10),yfe=_r.z.object({name:_r.z.string().optional(),main:_r.z.string().optional(),zone_id:_r.z.string().optional(),create_date:_r.z.string().optional(),dev:Y8e.optional(),publish:X8e.optional(),build:G8e.optional(),$schema:_r.z.string().transform(t=>"").optional(),outputDirectory:_r.z.string().optional().describe("the output directory relative to project root directory after run build command."),installCommand:_r.z.string().optional().describe("the install command to run."),buildCommand:_r.z.string().optional().describe("the build command to run."),nodeVersion:_r.z.string().optional().describe("the node version to use."),nodeFunctionsConfig:Z8e.optional(),cloudFunctions:xsr.optional(),agents:vsr.optional(),sandbox:t6e.optional(),headers:fsr.optional(),redirects:hsr.optional(),rewrites:Asr.optional(),caches:e6e.optional(),"node-functions":$8e.optional().describe("Node function specific configuration"),"edge-functions":$8e.optional().describe("Edge function specific configuration"),schedules:Esr.optional().describe("Cron schedule tasks that trigger cloud functions"),isr:_r.z.object({bypassToken:_r.z.string().optional().describe("bypass token for x-prerender-revalidate header")}).optional()}),mfe=Symbol("filteredSchema"),hY=Symbol("symFilteredValue"),wsr=gfe(yfe);function _sr(t){return t.errors.map(e=>`${e.message}`).join(`
|
|
19
19
|
`)}function Gq(){return!0}function gfe(t,e=["root"]){if(t[mfe])return t;let r=t;if((t instanceof _r.z.ZodOptional||t instanceof _r.z.ZodNullable||t instanceof _r.z.ZodReadonly||t instanceof _r.z.ZodPromise||t instanceof _r.z.ZodBranded)&&(r=t.unwrap()),r[mfe])return r;let n=null;try{if(r instanceof _r.z.ZodArray){let o=gfe(r.element,[...e,"[]"]);return n=_r.z.array(_r.z.any()).optional().transform(s=>{if(e.length===4&&e.includes("headers")&&(s?s!=null&&s.length||console.warn('"error in root.headers.[].headers": length is invalid, min 1 length error'):console.warn('"error in root.headers.[].headers": undefined is invalid, Required')),!s)return;if(!s.length)return[];let c=[];for(let p=0;p<s.length;p++){let f=s[p];if(f===hY)continue;let h=o.safeParse(f,{path:[...e,`[${p}]`]});if(!h.success){Gq();continue}!h.data||h.data===hY||c.push(h.data)}let u=30;return e.length===4&&e[3]==="headers"&&c.length>3?(console.warn(`"error in root.headers.[].headers": length is invalid, max ${u} length error`),c.slice(0,u)):c}),n}return r instanceof _r.z.ZodObject?(n=_r.z.object(Object.fromEntries(Object.entries(r.shape).map(([o,s])=>[o,gfe(s,[...e,o])]))).transform(o=>{let s=t.safeParse(o,{path:e});return s.success?s.data:(Gq(),hY)}),n):(n=_r.z.any().transform(o=>{if(o===hY)return;let s=t.safeParse(o,{path:e});if(!s.success){Gq()&&console.warn(`"error in ${e.join(".")}": ${JSON.stringify(o)} is invalid, ${_sr(s.error)}`);return}return s.data}),n)}catch(o){Gq()&&console.error("%c [ e ]-220","font-size:13px; background:pink; color:#bf2c9f;",o)}finally{n&&(n[mfe]=!0)}return n}var Ssr=_r.z.object({TENCENT_SECRET_KEY:_r.z.string(),TENCENT_SECRET_ID:_r.z.string(),DEV_SERVER_ENDPOINT:_r.z.string().optional(),DEV_SERVER_PORT:_r.z.union([_r.z.number(),_r.z.string()]).optional()});function Csr(t){return t}function Isr(t){return yfe.safeParse(t)}});var e0={};Cq(e0,{default:()=>xfe});var gY,xfe,AY=su(()=>{gY=Pt(vfe());Iq(e0,Pt(vfe()));xfe={tefConfigSchema:gY.tefConfigSchema,envConfigSchema:gY.envConfigSchema}});function ksr(t){return t.length===1?t[0].toString():t.reduce((e,r)=>{if(typeof r=="number")return`${e}[${r.toString()}]`;if(r.includes('"'))return`${e}["${r.replace(/"/g,'\\"')}"]`;if(!/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u.test(r))return`${e}["${r}"]`;let n=e.length===0?"":".";return e+n+r},"")}function n6e(t,e,r){var n;if(t.code==="invalid_union")return t.unionErrors.reduce((o,s)=>{let c=s.issues.map(u=>n6e(u,e,r)).join(e);return o.includes(c)||o.push(c),o},[]).join(r);if(((n=t.path)==null?void 0:n.length)!==0){if(t.path.length===1){let o=t.path[0];if(typeof o=="number")return`${t.message} at index ${o}`}return`${t.message} at "${ksr(t.path)}"`}return t.message}function Tsr(t,e,r){return t.length>0?[e,t].join(r):e}function Bsr(t,e){let{issueSeparator:r=`
|
|
20
20
|
`,unionSeparator:n=", or ",prefixSeparator:o=`
|
|
21
|
-
`,prefix:s}=e,c=t.errors.map(u=>n6e(u,r,n)).join(r);return Tsr(c,s,o)}var Wq,dR,yY,vY,bfe=su(()=>{Wq=class extends Error{handled;constructor(e){super(e),this.handled=!0,this.name=this.constructor.name}},dR=class extends Wq{constructor(e){super(`[ConfigLoadError] ${e}`)}},yY=class extends Wq{constructor(e){super(`[ConfigSaveError] ${e}`)}};vY=class extends Wq{details;constructor(e,r){let n=Bsr(r,{prefix:`${e}:`});super(`[ValidationError] ${n}`),this.details=r.errors}}});var Efe,koi,i6e=su(()=>{Efe=class{log(e,r){try{let n=this.format(r),o=JSON.stringify({key:e,value:n});process.send(o)}catch{}}format(e){return typeof e=="object"?JSON.stringify(e):typeof e=="number"?String(e):e}},koi=new Efe});function Zm(t){return Object.prototype.toString.call(t)==="[object Object]"}function D2(t){return Object.prototype.toString.call(t)==="[object Array]"}function Qy(t){return Object.prototype.toString.call(t)==="[object String]"}function kfe(t){return Object.prototype.toString.call(t)==="[object Number]"}function u6e(t){return Object.prototype.toString.call(t)==="[object Undefined]"}function Kq(t){var n;let e=t.replace(/\\([?*])/g,"$1");if(t.length===0)return Ss.min_string;if(e.length>500)return Ss.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(e)||((n=e.match(/\*/g))==null?void 0:n.length)>1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(e)||/:(?![a-zA-Z0-9]+)/.test(e))return Ss.char_match;if(e.length){let o=e.split("/");if(o.some(u=>u.includes(":")&&(u.includes("*")||u.includes(".")))||o.some(u=>u.split(":").length>2))return Ss.char_match}}function Ife(t){var r;if(t=t.replace(/^https?:\/\//,""),t.length===0)return Ss.min_string;if(t.length>500)return Ss.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(t)||((r=t.match(/\*/g))==null?void 0:r.length)>=1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(t)||/:(?![a-zA-Z0-9]+)/.test(t))return Ss.char_match}function Dsr(t){if(t.length===0)return Ss.min_string;if(t.length>100)return Ss.max_string;if(/[^a-zA-Z0-9-]/.test(t))return Ss.char_match}function Psr(t){if(t.length===0)return Ss.min_string;if(t.length>1e3)return Ss.max_string;if(/[\u4e00-\u9fa5]/.test(t))return Ss.char_match}function Rsr(t){let e=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of e){let n=r.indexOf("="),o=n===-1?r.trim().toLowerCase():r.slice(0,n).trim().toLowerCase();if(o==="stale-while-revalidate"||o==="stale-if-error"){let s=`${o}=86400`;if(n===-1)return`${Ss.value_match}: Cache-Control directive "${o}" must be in k=v form (e.g. ${s})`;if(!r.slice(n+1).trim())return`${Ss.value_match}: Cache-Control directive "${r}" must have a value (e.g. ${s})`}}}function Osr(t){if(![301,302,303,304,307,308].includes(t))return Ss.value_match}function Nsr(t){if(typeof t!="number"||!Number.isInteger(t)||t<0)return Ss.value_match}function Fsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{key:c,value:u}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"key"],message:Ss.invalid_type});continue}let p=Dsr(c);if(p){n.push({path:[...e,`[${o}]`,"key"],message:p});continue}if(!Qy(u)){n.push({path:[...e,`[${o}]`,"value"],message:Ss.invalid_type});continue}let f=Psr(u);if(f){n.push({path:[...e,`[${o}]`,"value"],message:f});continue}if(c.toLowerCase()==="cache-control"){let h=Rsr(u);if(h){n.push({path:[...e,`[${o}]`,"value"],message:h});continue}}r.push({key:c,value:u})}return[r,n]}function Lsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{source:c,headers:u}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let p=Kq(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}let[f,h]=Fsr(u,[...e,`[${o}]`,"headers"]);f.length>100&&(h.push({path:[...e,`[${o}]`,"headers"],message:Ss.max_length}),f=f.slice(0,100)),(u==null?void 0:u.length)<1&&f.length<1&&h.push({path:[...e,`[${o}]`,"headers"],message:Ss.min_length}),f.length&&r.push({source:c,headers:f}),n.push(...h)}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function jsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{source:c,destination:u,statusCode:p}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let f=Kq(c);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!Qy(u)){n.push({path:[...e,`[${o}]`,"destination"],message:Ss.invalid_type});continue}let h=Ife(u);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}if(!kfe(p)){n.push({path:[...e,`[${o}]`,"statusCode"],message:Ss.invalid_type});continue}let g=Osr(p);if(g){n.push({path:[...e,`[${o}]`,"statusCode"],message:g});continue}r.push({source:c,destination:u,statusCode:p})}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function Msr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}if("src"in s||"dest"in s){let{src:g,dest:y}=s;if(!Qy(g)){n.push({path:[...e,`[${o}]`,"src"],message:Ss.invalid_type});continue}let b=Kq(g);if(b){n.push({path:[...e,`[${o}]`,"src"],message:b});continue}if(!Qy(y)){n.push({path:[...e,`[${o}]`,"dest"],message:Ss.invalid_type});continue}let A=Ife(y);if(A){n.push({path:[...e,`[${o}]`,"dest"],message:A});continue}r.push({src:g,dest:y});continue}let{source:u,destination:p}=s;if(!Qy(u)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let f=Kq(u);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!Qy(p)){n.push({path:[...e,`[${o}]`,"destination"],message:Ss.invalid_type});continue}let h=Ife(p);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}r.push({source:u,destination:p})}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function Qsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{source:c,cacheTtl:u}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let p=Kq(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}if(!kfe(u)){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:Ss.invalid_type});continue}let f=Nsr(u);if(f){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:f});continue}r.push({source:c,cacheTtl:u})}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function vT(t){if(!D2(t))return;let e=t.filter(r=>Qy(r)&&r.trim().length>0);return e.length>0?e:[]}function Yq(t){if(!Qy(t))return;let e=t.trim();return e.length>0?e:void 0}function xY(t,e,r,n){let o=[],s=[];if(u6e(t))return[void 0,s];if(!D2(t))return s.push({path:[...e],message:Ss.invalid_type}),[void 0,s];for(let c in t){let u=t[c];if(!Qy(u)){s.push({path:[...e,`[${c}]`],message:Ss.invalid_type});continue}let p=u.trim();if(!r.has(p)){s.push({code:"invalid_region",path:[...e,`[${c}]`],message:`${Ss.value_match}: region id must be one of [${n.join(", ")}]`});continue}o.push(p)}return[o,s]}function l6e(t,e){return D2(t)&&D2(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t===e}function c6e({newValue:t,newPath:e,legacySources:r,path:n}){let o=[],s=vT(t),c=s!==void 0?e:void 0;for(let u of r){let p=vT(u.value);if(p!==void 0){if(o.push({code:"deprecated_config",path:[...n,...u.path],message:u.deprecatedMessage}),s===void 0){s=p,c=u.displayPath;continue}u.checkConflict!==!1&&!l6e(s,p)&&o.push({code:Jq.conflict,path:[...n,...u.path],message:`[CONFIG_CONFLICT] ${c} and ${u.displayPath} have conflicting values. Please keep only ${e}.`})}}return[s,o]}function wfe(t,e,r){if(!u6e(t)){if(!kfe(t)||!Number.isFinite(t)){r.push({path:[...e],message:Ss.invalid_type});return}return t}}function qsr(t,e){var ze,kt,Tt;let r=Zm(t.cloudFunctions)?t.cloudFunctions:{},n=Zm(r.nodejs)?r.nodejs:{},o=Zm(r.regions)?r.regions:{},s=Zm(t["node-functions"])?t["node-functions"]:{},c=Zm(t.nodeFunctionsConfig)?t.nodeFunctionsConfig:{},u=[];!a6e&&Qy(s.included_files_base_path)&&s.included_files_base_path.trim()&&(a6e=!0,console.warn("`node-functions.included_files_base_path` is deprecated and no longer takes effect. `cloudFunctions.includeFiles` is always resolved from the project root."));let[p,f]=c6e({newValue:r.includeFiles,newPath:"cloudFunctions.includeFiles",path:e,legacySources:[{value:n.includeFiles,path:["cloudFunctions","nodejs","includeFiles"],displayPath:"cloudFunctions.nodejs.includeFiles",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.includeFiles, please migrate to cloudFunctions.includeFiles. The old field will be removed in a future version."},{value:s.included_files,path:["node-functions","included_files"],displayPath:"node-functions.included_files",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.included_files, which has been mapped to cloudFunctions.includeFiles. Please migrate to the new field."}]}),[h,g]=c6e({newValue:r.externalNodeModules,newPath:"cloudFunctions.externalNodeModules",path:e,legacySources:[{value:n.externalNodeModules,path:["cloudFunctions","nodejs","externalNodeModules"],displayPath:"cloudFunctions.nodejs.externalNodeModules",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.externalNodeModules, please migrate to cloudFunctions.externalNodeModules. The old field will be removed in a future version."},{value:s.external_node_modules,path:["node-functions","external_node_modules"],displayPath:"node-functions.external_node_modules",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.external_node_modules, which has been mapped to cloudFunctions.externalNodeModules. Please migrate to the new field."}]});u.push(...f,...g);let y={};p!==void 0&&(y.includeFiles=p),h!==void 0&&(y.externalNodeModules=h);let b=wfe(r.maxDuration,[...e,"cloudFunctions","maxDuration"],u),A=[];for(let ut of["nodejs","python","go"]){let qe=Zm(r[ut])?r[ut]:{},Ke=wfe(qe.maxDuration,[...e,"cloudFunctions",ut,"maxDuration"],u);Ke!==void 0&&(A.push({runtime:ut,value:Ke,displayPath:`cloudFunctions.${ut}.maxDuration`}),u.push({code:"deprecated_config",path:[...e,"cloudFunctions",ut,"maxDuration"],message:`[DEPRECATED] Detected cloudFunctions.${ut}.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field.`}))}let I=wfe(c.maxDuration,[...e,"nodeFunctionsConfig","maxDuration"],u);I!==void 0&&u.push({code:"deprecated_config",path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[DEPRECATED] Detected nodeFunctionsConfig.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field."});let S=A.find(({runtime:ut})=>ut==="nodejs");S&&I!==void 0&&S.value!==I&&u.push({code:Jq.conflict,path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[CONFIG_CONFLICT] cloudFunctions.nodejs.maxDuration and nodeFunctionsConfig.maxDuration have conflicting values. Please keep only cloudFunctions.maxDuration."});let k=[...A];I!==void 0&&S===void 0&&k.push({runtime:"nodejs",value:I,displayPath:"nodeFunctionsConfig.maxDuration"});let R=b;if(b!==void 0)for(let{displayPath:ut,value:qe}of k)qe!==b&&u.push({code:Jq.conflict,path:[...e,...ut.split(".")],message:`[CONFIG_CONFLICT] cloudFunctions.maxDuration and ${ut} have conflicting values. Please keep only cloudFunctions.maxDuration.`});else if(k.length>0)if(new Set(k.map(({value:qe})=>qe)).size>1){let qe=k.map(({runtime:Ke,value:rt})=>`${Ke}: ${rt}`).join(", ");u.push({code:Jq.migrationRequired,path:[...e,"cloudFunctions"],message:`[MIGRATION_REQUIRED] Detected conflicting cloudFunctions.*.maxDuration values (${qe}). The new structure only supports a single cloudFunctions.maxDuration; please choose one value and migrate.`})}else R=k[0].value;R!==void 0&&(y.maxDuration=R);let[M,Q]=xY(o.mainland,[...e,"cloudFunctions","regions","mainland"],s6e,Sfe),[V,re]=xY(r.mainlandRegions,[...e,"cloudFunctions","mainlandRegions"],s6e,Sfe),[X,xe]=xY(o.overseas,[...e,"cloudFunctions","regions","overseas"],o6e,Cfe),[le,he]=xY(r.overseasRegions,[...e,"cloudFunctions","overseasRegions"],o6e,Cfe);u.push(...Q,...re,...xe,...he);function ne({newValue:ut,legacyValue:qe,legacyField:Ke,newField:rt}){return qe!==void 0&&(u.push({code:"deprecated_config",path:[...e,...Ke.split(".")],message:`[DEPRECATED] Detected ${Ke}, please migrate to ${rt}. The old field will be removed in a future version.`}),ut!==void 0&&!l6e(ut,qe)&&u.push({code:Jq.conflict,path:[...e,...Ke.split(".")],message:`[CONFIG_CONFLICT] ${Ke} and ${rt} have conflicting values. Please keep only ${rt}.`})),ut!==void 0?ut:qe}let be=ne({newValue:M,legacyValue:V,legacyField:"cloudFunctions.mainlandRegions",newField:"cloudFunctions.regions.mainland"}),ae=ne({newValue:X,legacyValue:le,legacyField:"cloudFunctions.overseasRegions",newField:"cloudFunctions.regions.overseas"});(be!==void 0||ae!==void 0)&&(y.regions={},be!==void 0&&(y.regions.mainland=be),ae!==void 0&&(y.regions.overseas=ae));let H={},me=(ze=vT(n.includeFiles))!=null?ze:vT(s.included_files),Ce=(kt=vT(n.externalNodeModules))!=null?kt:vT(s.external_node_modules);me!==void 0&&(H.includeFiles=me),Ce!==void 0&&(H.externalNodeModules=Ce);let Te=(Tt=S==null?void 0:S.value)!=null?Tt:I;Te!==void 0&&(H.maxDuration=Te),Object.keys(H).length>0&&Object.defineProperty(y,"nodejs",{configurable:!0,value:H});for(let ut of["python","go"]){let qe=A.find(Ke=>Ke.runtime===ut);qe&&Object.defineProperty(y,ut,{configurable:!0,value:{maxDuration:qe.value}})}return V!==void 0&&Object.defineProperty(y,"mainlandRegions",{configurable:!0,value:V}),le!==void 0&&Object.defineProperty(y,"overseasRegions",{configurable:!0,value:le}),[y,u]}function _fe(t,e,r){return typeof t!="number"||!Number.isFinite(t)?e:Math.min(Math.max(Math.floor(t),1),r)}function zsr(){let t=process.env.EDGEONE_EMIT_AGENT_LIFECYCLE_FIELDS;return t==="1"||(t==null?void 0:t.toLowerCase())==="true"?!0:t==="0"||(t==null?void 0:t.toLowerCase())==="false"?!1:Usr}function $sr(t){let e=Zm(t.agents),r=e?t.agents:{},n=zsr(),o=Yq(r.dir),s=Yq(r.framework),c=Yq(r.runtime),u=e?_fe(r.timeout,300,1800):void 0,p=n&&e&&r.idleTimeout!==void 0?_fe(r.idleTimeout,void 0,21600):void 0,f=n&&e&&r.maxLifetime!==void 0?_fe(r.maxLifetime,void 0,604800):void 0,h=vT(r.includeFiles),g=vT(r.externalNodeModules),y=Zm(r.sandbox)?r.sandbox:void 0,b=p6e(y==null?void 0:y.timeout),A=Zm(r.memoryQuota)?r.memoryQuota:void 0,I=A&&typeof A.maxMessagesPerConversation=="number"?A.maxMessagesPerConversation:void 0,S={},k=Zm(r.auth)?r.auth:void 0;if(k!==void 0){let R=Yq(k.type);if(R!==void 0&&R!=="jwt"){let xe=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.type "${R}" is not supported. Only "jwt" is available.`);throw xe.code="BLOCKING_CONFIG_ERROR",xe}let M=new Set(["RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512"]),Q=Yq(k.algorithm);if(Q!==void 0&&!M.has(Q)){let xe=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.algorithm "${Q}" is not supported. Only asymmetric algorithms are allowed (RS256/RS384/RS512/ES256/ES384/ES512/PS256/PS384/PS512). Symmetric algorithms (HS*) are not supported because the edge controller would have to hold the signing key.`);throw xe.code="BLOCKING_CONFIG_ERROR",xe}let V=Q||"RS256",X=(Array.isArray(k.verificationKeys)?k.verificationKeys:[]).filter(xe=>typeof xe=="string"&&xe.trim().length>0).map(xe=>xe.trim()).filter((xe,le,he)=>he.indexOf(xe)===le);if(X.length===0){let xe=new Error("[BLOCKING_CONFIG_ERROR] agents.auth.verificationKeys must contain at least one non-empty PEM public key.");throw xe.code="BLOCKING_CONFIG_ERROR",xe}S.auth={type:"jwt",algorithm:V,verificationKeys:X}}return o!==void 0&&(S.dir=o),s!==void 0&&(S.framework=s),c!==void 0&&(S.runtime=c),u!==void 0&&(S.timeout=u),p!==void 0&&(S.idleTimeout=p),f!==void 0&&(S.maxLifetime=f),I!==void 0&&(S.memoryQuota={maxMessagesPerConversation:I}),b!==void 0&&(S.sandbox={timeout:b}),h!==void 0&&(S.includeFiles=h),g!==void 0&&(S.externalNodeModules=g),S}function p6e(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.floor(t);return e>0?e:void 0}function Hsr(t){let e=Zm(t.sandbox)?t.sandbox:void 0,r={};if(!e)return r;let n=p6e(e.timeout);return n!==void 0?r.timeout=n:e.timeout!==void 0&&(r.timeout=e.timeout),r}function Xq(t,e){let r={headers:[],redirects:[],rewrites:[],caches:[]},n=[];if(!Zm(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];let{headers:o=[],redirects:s=[],rewrites:c=[],caches:u=[]}=t,[p,f]=Lsr(o,[...e,"headers"]),[h,g]=jsr(s,[...e,"redirects"]),[y,b]=Msr(c,[...e,"rewrites"]),[A,I]=Qsr(u,[...e,"caches"]);r.headers=p,r.redirects=h,r.rewrites=y,r.caches=A;let[S,k]=qsr(t,e),R=k.filter(X=>(X==null?void 0:X.code)==="deprecated_config"),M=k.filter(X=>(X==null?void 0:X.code)!=="deprecated_config"),Q=$sr(t),V=Hsr(t);r["edge-functions"]=t["edge-functions"],r.trailingSlash=t.trailingSlash,Object.keys(S).length>0&&(r.cloudFunctions=S),Object.keys(Q).length>0&&(r.agents=Q),Object.keys(V).length>0&&(r.sandbox=V);let re=["outputDirectory","installCommand","buildCommand","nodeVersion","schedules","isr"];for(let X in t)re.includes(X)&&t[X]&&(r[X]=t[X]);return n.push(...M,...f,...g,...b,...I),[r,n,R]}var Ss,Sfe,Cfe,s6e,o6e,a6e,Jq,Usr,Tfe=su(()=>{Ss={invalid_type:"invalid type error",max_length:"max length error",min_length:"min length error",min_string:"string min error",max_string:"string max error",char_match:"char match error",value_match:"value match error"},Sfe=["ap-guangzhou","ap-shanghai","ap-nanjing","ap-beijing","ap-chengdu"],Cfe=["ap-singapore","ap-hongkong","ap-bangkok","ap-jakarta","ap-seoul","ap-tokyo","eu-frankfurt","na-ashburn","na-siliconvalley"],s6e=new Set(Sfe),o6e=new Set(Cfe);a6e=!1,Jq={conflict:"config_conflict",migrationRequired:"migration_required"};Usr=!1});var Ja,Bfe,Ci,$_,Zq=su(()=>{(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),c={};for(let u of s)c[u]=o[u];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Ja||(Ja={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Bfe||(Bfe={}));Ci=Ja.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$_=t=>{switch(typeof t){case"undefined":return Ci.undefined;case"string":return Ci.string;case"number":return Number.isNaN(t)?Ci.nan:Ci.number;case"boolean":return Ci.boolean;case"function":return Ci.function;case"bigint":return Ci.bigint;case"symbol":return Ci.symbol;case"object":return Array.isArray(t)?Ci.array:t===null?Ci.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ci.promise:typeof Map<"u"&&t instanceof Map?Ci.map:typeof Set<"u"&&t instanceof Set?Ci.set:typeof Date<"u"&&t instanceof Date?Ci.date:Ci.object;default:return Ci.unknown}}});var Nn,Vsr,qy,bY=su(()=>{Zq();Nn=Ja.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"]),Vsr=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),qy=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let u=n,p=0;for(;p<c.path.length;){let f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(r(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return o(this),n}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,Ja.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};qy.create=t=>new qy(t)});var Gsr,P2,Dfe=su(()=>{bY();Zq();Gsr=(t,e)=>{let r;switch(t.code){case Nn.invalid_type:t.received===Ci.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Nn.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ja.jsonStringifyReplacer)}`;break;case Nn.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ja.joinValues(t.keys,", ")}`;break;case Nn.invalid_union:r="Invalid input";break;case Nn.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ja.joinValues(t.options)}`;break;case Nn.invalid_enum_value:r=`Invalid enum value. Expected ${Ja.joinValues(t.options)}, received '${t.received}'`;break;case Nn.invalid_arguments:r="Invalid function arguments";break;case Nn.invalid_return_type:r="Invalid function return type";break;case Nn.invalid_date:r="Invalid date";break;case Nn.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ja.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Nn.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Nn.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Nn.custom:r="Invalid input";break;case Nn.invalid_intersection_types:r="Intersection results could not be merged";break;case Nn.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Nn.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ja.assertNever(t)}return{message:r}},P2=Gsr});function Wsr(t){f6e=t}function f4(){return f6e}var f6e,EY=su(()=>{Dfe();f6e=P2});function gi(t,e){let r=f4(),n=e5({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===P2?void 0:P2].filter(o=>!!o)});t.common.issues.push(n)}var e5,Ysr,eg,Zs,hR,t0,wY,_Y,xT,d4,Pfe=su(()=>{EY();Dfe();e5=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let u="",p=n.filter(f=>!!f).slice().reverse();for(let f of p)u=f(c,{data:e,defaultError:u}).message;return{...o,path:s,message:u}},Ysr=[];eg=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return Zs;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return Zs;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}},Zs=Object.freeze({status:"aborted"}),hR=t=>({status:"dirty",value:t}),t0=t=>({status:"valid",value:t}),wY=t=>t.status==="aborted",_Y=t=>t.status==="dirty",xT=t=>t.status==="valid",d4=t=>typeof Promise<"u"&&t instanceof Promise});var d6e=su(()=>{});var as,h6e=su(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(as||(as={}))});function ia(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,u)=>{var f,h;let{message:p}=t;return c.code==="invalid_enum_value"?{message:p!=null?p:u.defaultError}:typeof u.data>"u"?{message:(f=p!=null?p:n)!=null?f:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(h=p!=null?p:r)!=null?h:u.defaultError}},description:o}}function y6e(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function dor(t){return new RegExp(`^${y6e(t)}$`)}function v6e(t){let e=`${A6e}T${y6e(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function hor(t,e){return!!((e==="v4"||!e)&&sor.test(t)||(e==="v6"||!e)&&aor.test(t))}function mor(t,e){if(!tor.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function gor(t,e){return!!((e==="v4"||!e)&&oor.test(t)||(e==="v6"||!e)&&cor.test(t))}function Aor(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}function h4(t){if(t instanceof Uy){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Rb.create(h4(n))}return new Uy({...t._def,shape:()=>e})}else return t instanceof N2?new N2({...t._def,type:h4(t.element)}):t instanceof Rb?Rb.create(h4(t.unwrap())):t instanceof V_?V_.create(h4(t.unwrap())):t instanceof H_?H_.create(t.items.map(e=>h4(e))):t}function Ofe(t,e){let r=$_(t),n=$_(e);if(t===e)return{valid:!0,data:t};if(r===Ci.object&&n===Ci.object){let o=Ja.objectKeys(e),s=Ja.objectKeys(t).filter(u=>o.indexOf(u)!==-1),c={...t,...e};for(let u of s){let p=Ofe(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(r===Ci.array&&n===Ci.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let c=t[s],u=e[s],p=Ofe(c,u);if(!p.valid)return{valid:!1};o.push(p.data)}return{valid:!0,data:o}}else return r===Ci.date&&n===Ci.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function x6e(t,e){return new SR({values:t,typeName:fo.ZodEnum,...ia(e)})}function g6e(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function b6e(t,e={},r){return t?ET.create().superRefine((n,o)=>{var c,u;let s=t(n);if(s instanceof Promise)return s.then(p=>{var f,h;if(!p){let g=g6e(e,n),y=(h=(f=g.fatal)!=null?f:r)!=null?h:!0;o.addIssue({code:"custom",...g,fatal:y})}});if(!s){let p=g6e(e,n),f=(u=(c=p.fatal)!=null?c:r)!=null?u:!0;o.addIssue({code:"custom",...p,fatal:f})}}):ET.create()}var Ob,m6e,va,Jsr,Ksr,Xsr,Zsr,eor,tor,ror,nor,ior,Rfe,sor,oor,aor,cor,uor,lor,A6e,por,bT,mR,gR,AR,yR,m4,vR,xR,ET,O2,I1,g4,N2,Uy,bR,R2,SY,ER,H_,CY,A4,y4,IY,wR,_R,SR,CR,wT,Nb,Rb,V_,IR,kR,v4,yor,t5,r5,TR,vor,fo,xor,E6e,w6e,bor,Eor,_6e,wor,_or,Sor,Cor,Ior,kor,Tor,Bor,Dor,Por,Ror,Oor,Nor,For,Lor,jor,Mor,Qor,qor,Uor,zor,$or,Hor,Vor,Gor,Wor,Yor,Jor,Kor,Xor,Zor,ear,tar,rar,S6e=su(()=>{bY();EY();h6e();Pfe();Zq();Ob=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}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}},m6e=(t,e)=>{if(xT(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new qy(t.common.issues);return this._error=r,this._error}}};va=class{get description(){return this._def.description}_getType(e){return $_(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:$_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new eg,ctx:{common:e.parent.common,data:e.data,parsedType:$_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(d4(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!=null?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$_(e)},o=this._parseSync({data:e,path:n.path,parent:n});return m6e(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$_(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return xT(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(o=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>xT(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$_(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(d4(o)?o:Promise.resolve(o));return m6e(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let c=e(o),u=()=>s.addIssue({code:Nn.custom,...n(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new Nb({schema:this,typeName:fo.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:r=>this["~validate"](r)}}optional(){return Rb.create(this,this._def)}nullable(){return V_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N2.create(this)}promise(){return wT.create(this,this._def)}or(e){return bR.create([this,e],this._def)}and(e){return ER.create(this,e,this._def)}transform(e){return new Nb({...ia(this._def),schema:this,typeName:fo.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new IR({...ia(this._def),innerType:this,defaultValue:r,typeName:fo.ZodDefault})}brand(){return new t5({typeName:fo.ZodBranded,type:this,...ia(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new kR({...ia(this._def),innerType:this,catchValue:r,typeName:fo.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return r5.create(this,e)}readonly(){return TR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Jsr=/^c[^\s-]{8,}$/i,Ksr=/^[0-9a-z]+$/,Xsr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Zsr=/^[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,eor=/^[a-z0-9_-]{21}$/i,tor=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ror=/^[-+]?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)?)??$/,nor=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ior="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",sor=/^(?:(?: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])$/,oor=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,aor=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,cor=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uor=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lor=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,A6e="((\\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])))",por=new RegExp(`^${A6e}$`);bT=class t extends va{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ci.string){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_type,expected:Ci.string,received:s.parsedType}),Zs}let n=new eg,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,u=e.data.length<s.value;(c||u)&&(o=this._getOrReturnCtx(e,o),c?gi(o,{code:Nn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&gi(o,{code:Nn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")nor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"email",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Rfe||(Rfe=new RegExp(ior,"u")),Rfe.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"emoji",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Zsr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"uuid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")eor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"nanoid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Jsr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"cuid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Ksr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"cuid2",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Xsr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"ulid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),gi(o,{validation:"url",code:Nn.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"regex",code:Nn.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?v6e(s).test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?por.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?dor(s).test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?ror.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"duration",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?hor(e.data,s.version)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"ip",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?mor(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"jwt",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?gor(e.data,s.version)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"cidr",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?uor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"base64",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?lor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"base64url",code:Nn.invalid_string,message:s.message}),n.dirty()):Ja.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:Nn.invalid_string,...as.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...as.errToObj(e)})}url(e){return this._addCheck({kind:"url",...as.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...as.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...as.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...as.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...as.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...as.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...as.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...as.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...as.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...as.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...as.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...as.errToObj(e)})}datetime(e){var r,n;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:(r=e==null?void 0:e.offset)!=null?r:!1,local:(n=e==null?void 0:e.local)!=null?n:!1,...as.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,...as.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...as.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...as.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...as.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...as.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...as.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...as.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...as.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...as.errToObj(r)})}nonempty(e){return this.min(1,as.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};bT.create=t=>{var e;return new bT({checks:[],typeName:fo.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...ia(t)})};mR=class t extends va{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)!==Ci.number){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_type,expected:Ci.number,received:s.parsedType}),Zs}let n,o=new eg;for(let s of this._def.checks)s.kind==="int"?Ja.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Aor(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.not_finite,message:s.message}),o.dirty()):Ja.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,as.toString(r))}gt(e,r){return this.setLimit("min",e,!1,as.toString(r))}lte(e,r){return this.setLimit("max",e,!0,as.toString(r))}lt(e,r){return this.setLimit("max",e,!1,as.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:as.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:as.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:as.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:as.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:as.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:as.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:as.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:as.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:as.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:as.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ja.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};mR.create=t=>new mR({checks:[],typeName:fo.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ia(t)});gR=class t extends va{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)!==Ci.bigint)return this._getInvalidInput(e);let n,o=new eg;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Ja.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return gi(r,{code:Nn.invalid_type,expected:Ci.bigint,received:r.parsedType}),Zs}gte(e,r){return this.setLimit("min",e,!0,as.toString(r))}gt(e,r){return this.setLimit("min",e,!1,as.toString(r))}lte(e,r){return this.setLimit("max",e,!0,as.toString(r))}lt(e,r){return this.setLimit("max",e,!1,as.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:as.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:as.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:as.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:as.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:as.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:as.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};gR.create=t=>{var e;return new gR({checks:[],typeName:fo.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...ia(t)})};AR=class extends va{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ci.boolean){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.boolean,received:n.parsedType}),Zs}return t0(e.data)}};AR.create=t=>new AR({typeName:fo.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ia(t)});yR=class t extends va{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ci.date){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_type,expected:Ci.date,received:s.parsedType}),Zs}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_date}),Zs}let n=new eg,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ja.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:as.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:as.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};yR.create=t=>new yR({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:fo.ZodDate,...ia(t)});m4=class extends va{_parse(e){if(this._getType(e)!==Ci.symbol){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.symbol,received:n.parsedType}),Zs}return t0(e.data)}};m4.create=t=>new m4({typeName:fo.ZodSymbol,...ia(t)});vR=class extends va{_parse(e){if(this._getType(e)!==Ci.undefined){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.undefined,received:n.parsedType}),Zs}return t0(e.data)}};vR.create=t=>new vR({typeName:fo.ZodUndefined,...ia(t)});xR=class extends va{_parse(e){if(this._getType(e)!==Ci.null){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.null,received:n.parsedType}),Zs}return t0(e.data)}};xR.create=t=>new xR({typeName:fo.ZodNull,...ia(t)});ET=class extends va{constructor(){super(...arguments),this._any=!0}_parse(e){return t0(e.data)}};ET.create=t=>new ET({typeName:fo.ZodAny,...ia(t)});O2=class extends va{constructor(){super(...arguments),this._unknown=!0}_parse(e){return t0(e.data)}};O2.create=t=>new O2({typeName:fo.ZodUnknown,...ia(t)});I1=class extends va{_parse(e){let r=this._getOrReturnCtx(e);return gi(r,{code:Nn.invalid_type,expected:Ci.never,received:r.parsedType}),Zs}};I1.create=t=>new I1({typeName:fo.ZodNever,...ia(t)});g4=class extends va{_parse(e){if(this._getType(e)!==Ci.undefined){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.void,received:n.parsedType}),Zs}return t0(e.data)}};g4.create=t=>new g4({typeName:fo.ZodVoid,...ia(t)});N2=class t extends va{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==Ci.array)return gi(r,{code:Nn.invalid_type,expected:Ci.array,received:r.parsedType}),Zs;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,u=r.data.length<o.exactLength.value;(c||u)&&(gi(r,{code:c?Nn.too_big:Nn.too_small,minimum:u?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(gi(r,{code:Nn.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(gi(r,{code:Nn.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,u)=>o.type._parseAsync(new Ob(r,c,r.path,u)))).then(c=>eg.mergeArray(n,c));let s=[...r.data].map((c,u)=>o.type._parseSync(new Ob(r,c,r.path,u)));return eg.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:as.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:as.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:as.toString(r)}})}nonempty(e){return this.min(1,e)}};N2.create=(t,e)=>new N2({type:t,minLength:null,maxLength:null,exactLength:null,typeName:fo.ZodArray,...ia(e)});Uy=class t extends va{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Ja.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Ci.object){let f=this._getOrReturnCtx(e);return gi(f,{code:Nn.invalid_type,expected:Ci.object,received:f.parsedType}),Zs}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof I1&&this._def.unknownKeys==="strip"))for(let f in o.data)c.includes(f)||u.push(f);let p=[];for(let f of c){let h=s[f],g=o.data[f];p.push({key:{status:"valid",value:f},value:h._parse(new Ob(o,g,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof I1){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)p.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&(gi(o,{code:Nn.unrecognized_keys,keys:u}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of u){let g=o.data[h];p.push({key:{status:"valid",value:h},value:f._parse(new Ob(o,g,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of p){let g=await h.key,y=await h.value;f.push({key:g,value:y,alwaysSet:h.alwaysSet})}return f}).then(f=>eg.mergeObjectSync(n,f)):eg.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return as.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,c,u,p;let o=(u=(c=(s=this._def).errorMap)==null?void 0:c.call(s,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(p=as.errToObj(e).message)!=null?p:o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:fo.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Ja.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of Ja.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return h4(this)}partial(e){let r={};for(let n of Ja.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of Ja.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Rb;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return x6e(Ja.objectKeys(this.shape))}};Uy.create=(t,e)=>new Uy({shape:()=>t,unknownKeys:"strip",catchall:I1.create(),typeName:fo.ZodObject,...ia(e)});Uy.strictCreate=(t,e)=>new Uy({shape:()=>t,unknownKeys:"strict",catchall:I1.create(),typeName:fo.ZodObject,...ia(e)});Uy.lazycreate=(t,e)=>new Uy({shape:t,unknownKeys:"strip",catchall:I1.create(),typeName:fo.ZodObject,...ia(e)});bR=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let c=s.map(u=>new qy(u.ctx.common.issues));return gi(r,{code:Nn.invalid_union,unionErrors:c}),Zs}if(r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let p of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=p._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=c.map(p=>new qy(p));return gi(r,{code:Nn.invalid_union,unionErrors:u}),Zs}}get options(){return this._def.options}};bR.create=(t,e)=>new bR({options:t,typeName:fo.ZodUnion,...ia(e)});R2=t=>t instanceof wR?R2(t.schema):t instanceof Nb?R2(t.innerType()):t instanceof _R?[t.value]:t instanceof SR?t.options:t instanceof CR?Ja.objectValues(t.enum):t instanceof IR?R2(t._def.innerType):t instanceof vR?[void 0]:t instanceof xR?[null]:t instanceof Rb?[void 0,...R2(t.unwrap())]:t instanceof V_?[null,...R2(t.unwrap())]:t instanceof t5||t instanceof TR?R2(t.unwrap()):t instanceof kR?R2(t._def.innerType):[],SY=class t extends va{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ci.object)return gi(r,{code:Nn.invalid_type,expected:Ci.object,received:r.parsedType}),Zs;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(gi(r,{code:Nn.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Zs)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=R2(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of c){if(o.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);o.set(u,s)}}return new t({typeName:fo.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...ia(n)})}};ER=class extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,c)=>{if(wY(s)||wY(c))return Zs;let u=Ofe(s.value,c.value);return u.valid?((_Y(s)||_Y(c))&&r.dirty(),{status:r.value,value:u.data}):(gi(n,{code:Nn.invalid_intersection_types}),Zs)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ER.create=(t,e,r)=>new ER({left:t,right:e,typeName:fo.ZodIntersection,...ia(r)});H_=class t extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.array)return gi(n,{code:Nn.invalid_type,expected:Ci.array,received:n.parsedType}),Zs;if(n.data.length<this._def.items.length)return gi(n,{code:Nn.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Zs;!this._def.rest&&n.data.length>this._def.items.length&&(gi(n,{code:Nn.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,u)=>{let p=this._def.items[u]||this._def.rest;return p?p._parse(new Ob(n,c,n.path,u)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>eg.mergeArray(r,c)):eg.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};H_.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new H_({items:t,typeName:fo.ZodTuple,rest:null,...ia(e)})};CY=class t extends va{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.object)return gi(n,{code:Nn.invalid_type,expected:Ci.object,received:n.parsedType}),Zs;let o=[],s=this._def.keyType,c=this._def.valueType;for(let u in n.data)o.push({key:s._parse(new Ob(n,u,n.path,u)),value:c._parse(new Ob(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?eg.mergeObjectAsync(r,o):eg.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof va?new t({keyType:e,valueType:r,typeName:fo.ZodRecord,...ia(n)}):new t({keyType:bT.create(),valueType:e,typeName:fo.ZodRecord,...ia(r)})}},A4=class extends va{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.map)return gi(n,{code:Nn.invalid_type,expected:Ci.map,received:n.parsedType}),Zs;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([u,p],f)=>({key:o._parse(new Ob(n,u,n.path,[f,"key"])),value:s._parse(new Ob(n,p,n.path,[f,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let p of c){let f=await p.key,h=await p.value;if(f.status==="aborted"||h.status==="aborted")return Zs;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let p of c){let f=p.key,h=p.value;if(f.status==="aborted"||h.status==="aborted")return Zs;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}}}};A4.create=(t,e,r)=>new A4({valueType:e,keyType:t,typeName:fo.ZodMap,...ia(r)});y4=class t extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.set)return gi(n,{code:Nn.invalid_type,expected:Ci.set,received:n.parsedType}),Zs;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(gi(n,{code:Nn.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(gi(n,{code:Nn.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(p){let f=new Set;for(let h of p){if(h.status==="aborted")return Zs;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}let u=[...n.data.values()].map((p,f)=>s._parse(new Ob(n,p,n.path,f)));return n.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,r){return new t({...this._def,minSize:{value:e,message:as.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:as.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};y4.create=(t,e)=>new y4({valueType:t,minSize:null,maxSize:null,typeName:fo.ZodSet,...ia(e)});IY=class t extends va{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ci.function)return gi(r,{code:Nn.invalid_type,expected:Ci.function,received:r.parsedType}),Zs;function n(u,p){return e5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f4(),P2].filter(f=>!!f),issueData:{code:Nn.invalid_arguments,argumentsError:p}})}function o(u,p){return e5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f4(),P2].filter(f=>!!f),issueData:{code:Nn.invalid_return_type,returnTypeError:p}})}let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof wT){let u=this;return t0(async function(...p){let f=new qy([]),h=await u._def.args.parseAsync(p,s).catch(b=>{throw f.addIssue(n(p,b)),f}),g=await Reflect.apply(c,this,h);return await u._def.returns._def.type.parseAsync(g,s).catch(b=>{throw f.addIssue(o(g,b)),f})})}else{let u=this;return t0(function(...p){let f=u._def.args.safeParse(p,s);if(!f.success)throw new qy([n(p,f.error)]);let h=Reflect.apply(c,this,f.data),g=u._def.returns.safeParse(h,s);if(!g.success)throw new qy([o(h,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:H_.create(e).rest(O2.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||H_.create([]).rest(O2.create()),returns:r||O2.create(),typeName:fo.ZodFunction,...ia(n)})}},wR=class extends va{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};wR.create=(t,e)=>new wR({getter:t,typeName:fo.ZodLazy,...ia(e)});_R=class extends va{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return gi(r,{received:r.data,code:Nn.invalid_literal,expected:this._def.value}),Zs}return{status:"valid",value:e.data}}get value(){return this._def.value}};_R.create=(t,e)=>new _R({value:t,typeName:fo.ZodLiteral,...ia(e)});SR=class t extends va{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return gi(r,{expected:Ja.joinValues(n),received:r.parsedType,code:Nn.invalid_type}),Zs}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return gi(r,{received:r.data,code:Nn.invalid_enum_value,options:n}),Zs}return t0(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};SR.create=x6e;CR=class extends va{_parse(e){let r=Ja.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ci.string&&n.parsedType!==Ci.number){let o=Ja.objectValues(r);return gi(n,{expected:Ja.joinValues(o),received:n.parsedType,code:Nn.invalid_type}),Zs}if(this._cache||(this._cache=new Set(Ja.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Ja.objectValues(r);return gi(n,{received:n.data,code:Nn.invalid_enum_value,options:o}),Zs}return t0(e.data)}get enum(){return this._def.values}};CR.create=(t,e)=>new CR({values:t,typeName:fo.ZodNativeEnum,...ia(e)});wT=class extends va{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ci.promise&&r.common.async===!1)return gi(r,{code:Nn.invalid_type,expected:Ci.promise,received:r.parsedType}),Zs;let n=r.parsedType===Ci.promise?r.data:Promise.resolve(r.data);return t0(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};wT.create=(t,e)=>new wT({type:t,typeName:fo.ZodPromise,...ia(e)});Nb=class extends va{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fo.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:c=>{gi(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async u=>{if(r.value==="aborted")return Zs;let p=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return p.status==="aborted"?Zs:p.status==="dirty"?hR(p.value):r.value==="dirty"?hR(p.value):p});{if(r.value==="aborted")return Zs;let u=this._def.schema._parseSync({data:c,path:n.path,parent:n});return u.status==="aborted"?Zs:u.status==="dirty"?hR(u.value):r.value==="dirty"?hR(u.value):u}}if(o.type==="refinement"){let c=u=>{let p=o.refinement(u,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?Zs:(u.status==="dirty"&&r.dirty(),c(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?Zs:(u.status==="dirty"&&r.dirty(),c(u.value).then(()=>({status:r.value,value:u.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!xT(c))return Zs;let u=o.transform(c.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>xT(c)?Promise.resolve(o.transform(c.value,s)).then(u=>({status:r.value,value:u})):Zs);Ja.assertNever(o)}};Nb.create=(t,e,r)=>new Nb({schema:t,typeName:fo.ZodEffects,effect:e,...ia(r)});Nb.createWithPreprocess=(t,e,r)=>new Nb({schema:e,effect:{type:"preprocess",transform:t},typeName:fo.ZodEffects,...ia(r)});Rb=class extends va{_parse(e){return this._getType(e)===Ci.undefined?t0(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Rb.create=(t,e)=>new Rb({innerType:t,typeName:fo.ZodOptional,...ia(e)});V_=class extends va{_parse(e){return this._getType(e)===Ci.null?t0(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};V_.create=(t,e)=>new V_({innerType:t,typeName:fo.ZodNullable,...ia(e)});IR=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===Ci.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};IR.create=(t,e)=>new IR({innerType:t,typeName:fo.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ia(e)});kR=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return d4(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new qy(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new qy(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};kR.create=(t,e)=>new kR({innerType:t,typeName:fo.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ia(e)});v4=class extends va{_parse(e){if(this._getType(e)!==Ci.nan){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.nan,received:n.parsedType}),Zs}return{status:"valid",value:e.data}}};v4.create=t=>new v4({typeName:fo.ZodNaN,...ia(t)});yor=Symbol("zod_brand"),t5=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},r5=class t extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Zs:s.status==="dirty"?(r.dirty(),hR(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Zs:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:fo.ZodPipeline})}},TR=class extends va{_parse(e){let r=this._def.innerType._parse(e),n=o=>(xT(o)&&(o.value=Object.freeze(o.value)),o);return d4(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};TR.create=(t,e)=>new TR({innerType:t,typeName:fo.ZodReadonly,...ia(e)});vor={object:Uy.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(fo||(fo={}));xor=(t,e={message:`Input not instance of ${t.name}`})=>b6e(r=>r instanceof t,e),E6e=bT.create,w6e=mR.create,bor=v4.create,Eor=gR.create,_6e=AR.create,wor=yR.create,_or=m4.create,Sor=vR.create,Cor=xR.create,Ior=ET.create,kor=O2.create,Tor=I1.create,Bor=g4.create,Dor=N2.create,Por=Uy.create,Ror=Uy.strictCreate,Oor=bR.create,Nor=SY.create,For=ER.create,Lor=H_.create,jor=CY.create,Mor=A4.create,Qor=y4.create,qor=IY.create,Uor=wR.create,zor=_R.create,$or=SR.create,Hor=CR.create,Vor=wT.create,Gor=Nb.create,Wor=Rb.create,Yor=V_.create,Jor=Nb.createWithPreprocess,Kor=r5.create,Xor=()=>E6e().optional(),Zor=()=>w6e().optional(),ear=()=>_6e().optional(),tar={string:t=>bT.create({...t,coerce:!0}),number:t=>mR.create({...t,coerce:!0}),boolean:t=>AR.create({...t,coerce:!0}),bigint:t=>gR.create({...t,coerce:!0}),date:t=>yR.create({...t,coerce:!0})},rar=Zs});var Ax={};Cq(Ax,{BRAND:()=>yor,DIRTY:()=>hR,EMPTY_PATH:()=>Ysr,INVALID:()=>Zs,NEVER:()=>rar,OK:()=>t0,ParseStatus:()=>eg,Schema:()=>va,ZodAny:()=>ET,ZodArray:()=>N2,ZodBigInt:()=>gR,ZodBoolean:()=>AR,ZodBranded:()=>t5,ZodCatch:()=>kR,ZodDate:()=>yR,ZodDefault:()=>IR,ZodDiscriminatedUnion:()=>SY,ZodEffects:()=>Nb,ZodEnum:()=>SR,ZodError:()=>qy,ZodFirstPartyTypeKind:()=>fo,ZodFunction:()=>IY,ZodIntersection:()=>ER,ZodIssueCode:()=>Nn,ZodLazy:()=>wR,ZodLiteral:()=>_R,ZodMap:()=>A4,ZodNaN:()=>v4,ZodNativeEnum:()=>CR,ZodNever:()=>I1,ZodNull:()=>xR,ZodNullable:()=>V_,ZodNumber:()=>mR,ZodObject:()=>Uy,ZodOptional:()=>Rb,ZodParsedType:()=>Ci,ZodPipeline:()=>r5,ZodPromise:()=>wT,ZodReadonly:()=>TR,ZodRecord:()=>CY,ZodSchema:()=>va,ZodSet:()=>y4,ZodString:()=>bT,ZodSymbol:()=>m4,ZodTransformer:()=>Nb,ZodTuple:()=>H_,ZodType:()=>va,ZodUndefined:()=>vR,ZodUnion:()=>bR,ZodUnknown:()=>O2,ZodVoid:()=>g4,addIssueToContext:()=>gi,any:()=>Ior,array:()=>Dor,bigint:()=>Eor,boolean:()=>_6e,coerce:()=>tar,custom:()=>b6e,date:()=>wor,datetimeRegex:()=>v6e,defaultErrorMap:()=>P2,discriminatedUnion:()=>Nor,effect:()=>Gor,enum:()=>$or,function:()=>qor,getErrorMap:()=>f4,getParsedType:()=>$_,instanceof:()=>xor,intersection:()=>For,isAborted:()=>wY,isAsync:()=>d4,isDirty:()=>_Y,isValid:()=>xT,late:()=>vor,lazy:()=>Uor,literal:()=>zor,makeIssue:()=>e5,map:()=>Mor,nan:()=>bor,nativeEnum:()=>Hor,never:()=>Tor,null:()=>Cor,nullable:()=>Yor,number:()=>w6e,object:()=>Por,objectUtil:()=>Bfe,oboolean:()=>ear,onumber:()=>Zor,optional:()=>Wor,ostring:()=>Xor,pipeline:()=>Kor,preprocess:()=>Jor,promise:()=>Vor,quotelessJson:()=>Vsr,record:()=>jor,set:()=>Qor,setErrorMap:()=>Wsr,strictObject:()=>Ror,string:()=>E6e,symbol:()=>_or,transformer:()=>Gor,tuple:()=>Lor,undefined:()=>Sor,union:()=>Oor,unknown:()=>kor,util:()=>Ja,void:()=>Bor});var Nfe=su(()=>{EY();Pfe();d6e();Zq();S6e();bY()});var C6e=su(()=>{Nfe();Nfe()});var nar,I6e,iar,sar,oar,aar,car,uar,lar,k6e,T6e=su(()=>{C6e();nar=/^(?=.{2,30}$)[a-z0-9]+(-[a-z0-9]+)*-?[a-z0-9]+$/,I6e=Ax.string().refine(t=>nar.test(t)),iar=Ax.enum(["vps-react-ts","vps-react","vps-vue-ts","vps-vue","manaia-demo","manaia-demo-ts"]),sar=Ax.object({name:I6e}),oar=Ax.object({name:I6e,template:iar}),aar=Ax.object({script:Ax.string().optional()}),car=Ax.object({script:Ax.string().optional()}),uar=Ax.object({}),lar=Ax.object({}),k6e={initArgsSchema:sar,generateArgsSchema:oar,devArgsSchema:aar,publishArgsSchema:car,deleteArgsSchema:uar,testArgsSchema:lar}});function par(t,e){return r=>{try{t.parse(r)}catch(n){throw new vY(`Failed to validate ${e}`,n)}}}function far(){let t={};return Object.entries({...k6e,...xfe}).forEach(([e,r])=>{let n=e.replace("Schema","");t[n]=par(r,n)}),t}var cai,B6e=su(()=>{T6e();AY();bfe();cai=far()});function BR(t="",e={confPath:""}){try{t=t||process.cwd();let[r,n]=i5(t);if(e.exists=n,!n)return e.showError||(0,e0.showError)(),{headers:[],redirects:[],rewrites:[]};if(e.confPath=r,r.endsWith(".ts"))return har(r);let o=iY(r);return R6e.default.parse(o)}catch{e.showError||(0,e0.showError)()}}function har(t){var g,y,b,A,I,S,k,R,M;let e=Ffe.default.statSync(t),r=D6e.get(t);if(r&&r.mtimeMs===e.mtimeMs)return r.config;let n=(0,n5.createRequire)("file:///Users/jesper/Desktop/develop/full-stack-deployment/ef-dev-tools/packages/tef-cli/edgeone-dist/cli.js"),o=yx.default.join(yx.default.dirname((0,O6e.fileURLToPath)("file:///Users/jesper/Desktop/develop/full-stack-deployment/ef-dev-tools/packages/tef-cli/edgeone-dist/cli.js")),"config-schema.js"),s=Ffe.default.existsSync(o)?o:n.resolve("@edgeone/types/config"),c;try{c=(0,P6e.buildSync)({entryPoints:[t],bundle:!0,platform:"node",format:"cjs",write:!1,target:"node12",logLevel:"silent",absWorkingDir:yx.default.dirname(t),alias:{"@edgeone/types/config":s},external:[]})}catch(Q){throw new dR(`Failed to load ${yx.default.basename(t)}:
|
|
21
|
+
`,prefix:s}=e,c=t.errors.map(u=>n6e(u,r,n)).join(r);return Tsr(c,s,o)}var Wq,dR,yY,vY,bfe=su(()=>{Wq=class extends Error{handled;constructor(e){super(e),this.handled=!0,this.name=this.constructor.name}},dR=class extends Wq{constructor(e){super(`[ConfigLoadError] ${e}`)}},yY=class extends Wq{constructor(e){super(`[ConfigSaveError] ${e}`)}};vY=class extends Wq{details;constructor(e,r){let n=Bsr(r,{prefix:`${e}:`});super(`[ValidationError] ${n}`),this.details=r.errors}}});var Efe,koi,i6e=su(()=>{Efe=class{log(e,r){try{let n=this.format(r),o=JSON.stringify({key:e,value:n});process.send(o)}catch{}}format(e){return typeof e=="object"?JSON.stringify(e):typeof e=="number"?String(e):e}},koi=new Efe});function Zm(t){return Object.prototype.toString.call(t)==="[object Object]"}function D2(t){return Object.prototype.toString.call(t)==="[object Array]"}function Qy(t){return Object.prototype.toString.call(t)==="[object String]"}function kfe(t){return Object.prototype.toString.call(t)==="[object Number]"}function u6e(t){return Object.prototype.toString.call(t)==="[object Undefined]"}function Kq(t){var n;let e=t.replace(/\\([?*])/g,"$1");if(t.length===0)return Ss.min_string;if(e.length>500)return Ss.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(e)||((n=e.match(/\*/g))==null?void 0:n.length)>1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(e)||/:(?![a-zA-Z0-9]+)/.test(e))return Ss.char_match;if(e.length){let o=e.split("/");if(o.some(u=>u.includes(":")&&(u.includes("*")||u.includes(".")))||o.some(u=>u.split(":").length>2))return Ss.char_match}}function Ife(t){var r;if(t=t.replace(/^https?:\/\//,""),t.length===0)return Ss.min_string;if(t.length>500)return Ss.max_string;if(/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]/.test(t)||((r=t.match(/\*/g))==null?void 0:r.length)>=1||/[^a-zA-Z0-9_\-/:*.~=?#!$&+,;%@ ]:/.test(t)||/:(?![a-zA-Z0-9]+)/.test(t))return Ss.char_match}function Dsr(t){if(t.length===0)return Ss.min_string;if(t.length>100)return Ss.max_string;if(/[^a-zA-Z0-9-]/.test(t))return Ss.char_match}function Psr(t){if(t.length===0)return Ss.min_string;if(t.length>1e3)return Ss.max_string;if(/[\u4e00-\u9fa5]/.test(t))return Ss.char_match}function Rsr(t){let e=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of e){let n=r.indexOf("="),o=n===-1?r.trim().toLowerCase():r.slice(0,n).trim().toLowerCase();if(o==="stale-while-revalidate"||o==="stale-if-error"){let s=`${o}=86400`;if(n===-1)return`${Ss.value_match}: Cache-Control directive "${o}" must be in k=v form (e.g. ${s})`;if(!r.slice(n+1).trim())return`${Ss.value_match}: Cache-Control directive "${r}" must have a value (e.g. ${s})`}}}function Osr(t){if(![301,302,303,304,307,308].includes(t))return Ss.value_match}function Nsr(t){if(typeof t!="number"||!Number.isInteger(t)||t<0)return Ss.value_match}function Fsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{key:c,value:u}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"key"],message:Ss.invalid_type});continue}let p=Dsr(c);if(p){n.push({path:[...e,`[${o}]`,"key"],message:p});continue}if(!Qy(u)){n.push({path:[...e,`[${o}]`,"value"],message:Ss.invalid_type});continue}let f=Psr(u);if(f){n.push({path:[...e,`[${o}]`,"value"],message:f});continue}if(c.toLowerCase()==="cache-control"){let h=Rsr(u);if(h){n.push({path:[...e,`[${o}]`,"value"],message:h});continue}}r.push({key:c,value:u})}return[r,n]}function Lsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{source:c,headers:u}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let p=Kq(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}let[f,h]=Fsr(u,[...e,`[${o}]`,"headers"]);f.length>100&&(h.push({path:[...e,`[${o}]`,"headers"],message:Ss.max_length}),f=f.slice(0,100)),(u==null?void 0:u.length)<1&&f.length<1&&h.push({path:[...e,`[${o}]`,"headers"],message:Ss.min_length}),f.length&&r.push({source:c,headers:f}),n.push(...h)}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function jsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{source:c,destination:u,statusCode:p}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let f=Kq(c);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!Qy(u)){n.push({path:[...e,`[${o}]`,"destination"],message:Ss.invalid_type});continue}let h=Ife(u);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}if(!kfe(p)){n.push({path:[...e,`[${o}]`,"statusCode"],message:Ss.invalid_type});continue}let g=Osr(p);if(g){n.push({path:[...e,`[${o}]`,"statusCode"],message:g});continue}r.push({source:c,destination:u,statusCode:p})}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function Msr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}if("src"in s||"dest"in s){let{src:g,dest:y}=s;if(!Qy(g)){n.push({path:[...e,`[${o}]`,"src"],message:Ss.invalid_type});continue}let b=Kq(g);if(b){n.push({path:[...e,`[${o}]`,"src"],message:b});continue}if(!Qy(y)){n.push({path:[...e,`[${o}]`,"dest"],message:Ss.invalid_type});continue}let A=Ife(y);if(A){n.push({path:[...e,`[${o}]`,"dest"],message:A});continue}r.push({src:g,dest:y});continue}let{source:u,destination:p}=s;if(!Qy(u)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let f=Kq(u);if(f){n.push({path:[...e,`[${o}]`,"source"],message:f});continue}if(!Qy(p)){n.push({path:[...e,`[${o}]`,"destination"],message:Ss.invalid_type});continue}let h=Ife(p);if(h){n.push({path:[...e,`[${o}]`,"destination"],message:h});continue}r.push({source:u,destination:p})}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function Qsr(t,e){let r=[],n=[];if(!D2(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];for(let o in t){let s=t[o];if(!Zm(s)){n.push({path:[...e,`[${o}]`],message:Ss.invalid_type});continue}let{source:c,cacheTtl:u}=s;if(!Qy(c)){n.push({path:[...e,`[${o}]`,"source"],message:Ss.invalid_type});continue}let p=Kq(c);if(p){n.push({path:[...e,`[${o}]`,"source"],message:p});continue}if(!kfe(u)){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:Ss.invalid_type});continue}let f=Nsr(u);if(f){n.push({path:[...e,`[${o}]`,"cacheTtl"],message:f});continue}r.push({source:c,cacheTtl:u})}return r.length>100&&(n.push({path:[...e],message:Ss.max_length}),r=r.slice(0,100)),[r,n]}function vT(t){if(!D2(t))return;let e=t.filter(r=>Qy(r)&&r.trim().length>0);return e.length>0?e:[]}function Yq(t){if(!Qy(t))return;let e=t.trim();return e.length>0?e:void 0}function xY(t,e,r,n){let o=[],s=[];if(u6e(t))return[void 0,s];if(!D2(t))return s.push({path:[...e],message:Ss.invalid_type}),[void 0,s];for(let c in t){let u=t[c];if(!Qy(u)){s.push({path:[...e,`[${c}]`],message:Ss.invalid_type});continue}let p=u.trim();if(!r.has(p)){s.push({code:"invalid_region",path:[...e,`[${c}]`],message:`${Ss.value_match}: region id must be one of [${n.join(", ")}]`});continue}o.push(p)}return[o,s]}function l6e(t,e){return D2(t)&&D2(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t===e}function c6e({newValue:t,newPath:e,legacySources:r,path:n}){let o=[],s=vT(t),c=s!==void 0?e:void 0;for(let u of r){let p=vT(u.value);if(p!==void 0){if(o.push({code:"deprecated_config",path:[...n,...u.path],message:u.deprecatedMessage}),s===void 0){s=p,c=u.displayPath;continue}u.checkConflict!==!1&&!l6e(s,p)&&o.push({code:Jq.conflict,path:[...n,...u.path],message:`[CONFIG_CONFLICT] ${c} and ${u.displayPath} have conflicting values. Please keep only ${e}.`})}}return[s,o]}function wfe(t,e,r){if(!u6e(t)){if(!kfe(t)||!Number.isFinite(t)){r.push({path:[...e],message:Ss.invalid_type});return}return t}}function qsr(t,e){var ze,kt,Tt;let r=Zm(t.cloudFunctions)?t.cloudFunctions:{},n=Zm(r.nodejs)?r.nodejs:{},o=Zm(r.regions)?r.regions:{},s=Zm(t["node-functions"])?t["node-functions"]:{},c=Zm(t.nodeFunctionsConfig)?t.nodeFunctionsConfig:{},u=[];!a6e&&Qy(s.included_files_base_path)&&s.included_files_base_path.trim()&&(a6e=!0,console.warn("`node-functions.included_files_base_path` is deprecated and no longer takes effect. `cloudFunctions.includeFiles` is always resolved from the project root."));let[p,f]=c6e({newValue:r.includeFiles,newPath:"cloudFunctions.includeFiles",path:e,legacySources:[{value:n.includeFiles,path:["cloudFunctions","nodejs","includeFiles"],displayPath:"cloudFunctions.nodejs.includeFiles",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.includeFiles, please migrate to cloudFunctions.includeFiles. The old field will be removed in a future version."},{value:s.included_files,path:["node-functions","included_files"],displayPath:"node-functions.included_files",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.included_files, which has been mapped to cloudFunctions.includeFiles. Please migrate to the new field."}]}),[h,g]=c6e({newValue:r.externalNodeModules,newPath:"cloudFunctions.externalNodeModules",path:e,legacySources:[{value:n.externalNodeModules,path:["cloudFunctions","nodejs","externalNodeModules"],displayPath:"cloudFunctions.nodejs.externalNodeModules",deprecatedMessage:"[DEPRECATED] Detected cloudFunctions.nodejs.externalNodeModules, please migrate to cloudFunctions.externalNodeModules. The old field will be removed in a future version."},{value:s.external_node_modules,path:["node-functions","external_node_modules"],displayPath:"node-functions.external_node_modules",checkConflict:!1,deprecatedMessage:"[DEPRECATED] Detected node-functions.external_node_modules, which has been mapped to cloudFunctions.externalNodeModules. Please migrate to the new field."}]});u.push(...f,...g);let y={};p!==void 0&&(y.includeFiles=p),h!==void 0&&(y.externalNodeModules=h);let b=wfe(r.maxDuration,[...e,"cloudFunctions","maxDuration"],u),A=[];for(let ut of["nodejs","python","go"]){let qe=Zm(r[ut])?r[ut]:{},Ke=wfe(qe.maxDuration,[...e,"cloudFunctions",ut,"maxDuration"],u);Ke!==void 0&&(A.push({runtime:ut,value:Ke,displayPath:`cloudFunctions.${ut}.maxDuration`}),u.push({code:"deprecated_config",path:[...e,"cloudFunctions",ut,"maxDuration"],message:`[DEPRECATED] Detected cloudFunctions.${ut}.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field.`}))}let I=wfe(c.maxDuration,[...e,"nodeFunctionsConfig","maxDuration"],u);I!==void 0&&u.push({code:"deprecated_config",path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[DEPRECATED] Detected nodeFunctionsConfig.maxDuration, which has been mapped to cloudFunctions.maxDuration. Please migrate to the top-level field."});let S=A.find(({runtime:ut})=>ut==="nodejs");S&&I!==void 0&&S.value!==I&&u.push({code:Jq.conflict,path:[...e,"nodeFunctionsConfig","maxDuration"],message:"[CONFIG_CONFLICT] cloudFunctions.nodejs.maxDuration and nodeFunctionsConfig.maxDuration have conflicting values. Please keep only cloudFunctions.maxDuration."});let k=[...A];I!==void 0&&S===void 0&&k.push({runtime:"nodejs",value:I,displayPath:"nodeFunctionsConfig.maxDuration"});let R=b;if(b!==void 0)for(let{displayPath:ut,value:qe}of k)qe!==b&&u.push({code:Jq.conflict,path:[...e,...ut.split(".")],message:`[CONFIG_CONFLICT] cloudFunctions.maxDuration and ${ut} have conflicting values. Please keep only cloudFunctions.maxDuration.`});else if(k.length>0)if(new Set(k.map(({value:qe})=>qe)).size>1){let qe=k.map(({runtime:Ke,value:rt})=>`${Ke}: ${rt}`).join(", ");u.push({code:Jq.migrationRequired,path:[...e,"cloudFunctions"],message:`[MIGRATION_REQUIRED] Detected conflicting cloudFunctions.*.maxDuration values (${qe}). The new structure only supports a single cloudFunctions.maxDuration; please choose one value and migrate.`})}else R=k[0].value;R!==void 0&&(y.maxDuration=R);let[M,Q]=xY(o.mainland,[...e,"cloudFunctions","regions","mainland"],s6e,Sfe),[V,re]=xY(r.mainlandRegions,[...e,"cloudFunctions","mainlandRegions"],s6e,Sfe),[X,xe]=xY(o.overseas,[...e,"cloudFunctions","regions","overseas"],o6e,Cfe),[le,he]=xY(r.overseasRegions,[...e,"cloudFunctions","overseasRegions"],o6e,Cfe);u.push(...Q,...re,...xe,...he);function ne({newValue:ut,legacyValue:qe,legacyField:Ke,newField:rt}){return qe!==void 0&&(u.push({code:"deprecated_config",path:[...e,...Ke.split(".")],message:`[DEPRECATED] Detected ${Ke}, please migrate to ${rt}. The old field will be removed in a future version.`}),ut!==void 0&&!l6e(ut,qe)&&u.push({code:Jq.conflict,path:[...e,...Ke.split(".")],message:`[CONFIG_CONFLICT] ${Ke} and ${rt} have conflicting values. Please keep only ${rt}.`})),ut!==void 0?ut:qe}let be=ne({newValue:M,legacyValue:V,legacyField:"cloudFunctions.mainlandRegions",newField:"cloudFunctions.regions.mainland"}),ae=ne({newValue:X,legacyValue:le,legacyField:"cloudFunctions.overseasRegions",newField:"cloudFunctions.regions.overseas"});(be!==void 0||ae!==void 0)&&(y.regions={},be!==void 0&&(y.regions.mainland=be),ae!==void 0&&(y.regions.overseas=ae));let H={},me=(ze=vT(n.includeFiles))!=null?ze:vT(s.included_files),Ce=(kt=vT(n.externalNodeModules))!=null?kt:vT(s.external_node_modules);me!==void 0&&(H.includeFiles=me),Ce!==void 0&&(H.externalNodeModules=Ce);let Te=(Tt=S==null?void 0:S.value)!=null?Tt:I;Te!==void 0&&(H.maxDuration=Te),Object.keys(H).length>0&&Object.defineProperty(y,"nodejs",{configurable:!0,value:H});for(let ut of["python","go"]){let qe=A.find(Ke=>Ke.runtime===ut);qe&&Object.defineProperty(y,ut,{configurable:!0,value:{maxDuration:qe.value}})}return V!==void 0&&Object.defineProperty(y,"mainlandRegions",{configurable:!0,value:V}),le!==void 0&&Object.defineProperty(y,"overseasRegions",{configurable:!0,value:le}),[y,u]}function _fe(t,e,r){return typeof t!="number"||!Number.isFinite(t)?e:Math.min(Math.max(Math.floor(t),1),r)}function zsr(){let t=process.env.EDGEONE_EMIT_AGENT_LIFECYCLE_FIELDS;return t==="1"||(t==null?void 0:t.toLowerCase())==="true"?!0:t==="0"||(t==null?void 0:t.toLowerCase())==="false"?!1:Usr}function $sr(t){let e=Zm(t.agents),r=e?t.agents:{},n=zsr(),o=Yq(r.dir),s=Yq(r.framework),c=Yq(r.runtime),u=e?_fe(r.timeout,300,1800):void 0,p=n&&e&&r.idleTimeout!==void 0?_fe(r.idleTimeout,void 0,21600):void 0,f=n&&e&&r.maxLifetime!==void 0?_fe(r.maxLifetime,void 0,604800):void 0,h=vT(r.includeFiles),g=vT(r.externalNodeModules),y=Zm(r.sandbox)?r.sandbox:void 0,b=p6e(y==null?void 0:y.timeout),A=Zm(r.memoryQuota)?r.memoryQuota:void 0,I=A&&typeof A.maxMessagesPerConversation=="number"?A.maxMessagesPerConversation:void 0,S={},k=Zm(r.auth)?r.auth:void 0;if(k!==void 0){let R=Yq(k.type);if(R!==void 0&&R!=="jwt"){let xe=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.type "${R}" is not supported. Only "jwt" is available.`);throw xe.code="BLOCKING_CONFIG_ERROR",xe}let M=new Set(["RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512"]),Q=Yq(k.algorithm);if(Q!==void 0&&!M.has(Q)){let xe=new Error(`[BLOCKING_CONFIG_ERROR] agents.auth.algorithm "${Q}" is not supported. Only asymmetric algorithms are allowed (RS256/RS384/RS512/ES256/ES384/ES512/PS256/PS384/PS512). Symmetric algorithms (HS*) are not supported because the edge controller would have to hold the signing key.`);throw xe.code="BLOCKING_CONFIG_ERROR",xe}let V=Q||"RS256",X=(Array.isArray(k.verificationKeys)?k.verificationKeys:[]).filter(xe=>typeof xe=="string"&&xe.trim().length>0).map(xe=>xe.trim()).filter((xe,le,he)=>he.indexOf(xe)===le);if(X.length===0){let xe=new Error("[BLOCKING_CONFIG_ERROR] agents.auth.verificationKeys must contain at least one non-empty PEM public key.");throw xe.code="BLOCKING_CONFIG_ERROR",xe}S.auth={type:"jwt",algorithm:V,verificationKeys:X}}return o!==void 0&&(S.dir=o),s!==void 0&&(S.framework=s),c!==void 0&&(S.runtime=c),u!==void 0&&(S.timeout=u),p!==void 0&&(S.idleTimeout=p),f!==void 0&&(S.maxLifetime=f),I!==void 0&&(S.memoryQuota={maxMessagesPerConversation:I}),b!==void 0&&(S.sandbox={timeout:b}),h!==void 0&&(S.includeFiles=h),g!==void 0&&(S.externalNodeModules=g),S}function p6e(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.floor(t);return e>0?e:void 0}function Hsr(t){let e=Zm(t.sandbox)?t.sandbox:void 0,r={};if(!e)return r;let n=p6e(e.timeout);return n!==void 0?r.timeout=n:e.timeout!==void 0&&(r.timeout=e.timeout),r}function Xq(t,e){let r={headers:[],redirects:[],rewrites:[],caches:[]},n=[];if(!Zm(t))return n.push({path:[...e],message:Ss.invalid_type}),[r,n];let{headers:o=[],redirects:s=[],rewrites:c=[],caches:u=[]}=t,[p,f]=Lsr(o,[...e,"headers"]),[h,g]=jsr(s,[...e,"redirects"]),[y,b]=Msr(c,[...e,"rewrites"]),[A,I]=Qsr(u,[...e,"caches"]);r.headers=p,r.redirects=h,r.rewrites=y,r.caches=A;let[S,k]=qsr(t,e),R=k.filter(X=>(X==null?void 0:X.code)==="deprecated_config"),M=k.filter(X=>(X==null?void 0:X.code)!=="deprecated_config"),Q=$sr(t),V=Hsr(t);r["edge-functions"]=t["edge-functions"],r.trailingSlash=t.trailingSlash,Object.keys(S).length>0&&(r.cloudFunctions=S),Object.keys(Q).length>0&&(r.agents=Q),Object.keys(V).length>0&&(r.sandbox=V);let re=["outputDirectory","installCommand","buildCommand","nodeVersion","schedules","isr"];for(let X in t)re.includes(X)&&t[X]&&(r[X]=t[X]);return n.push(...M,...f,...g,...b,...I),[r,n,R]}var Ss,Sfe,Cfe,s6e,o6e,a6e,Jq,Usr,Tfe=su(()=>{Ss={invalid_type:"invalid type error",max_length:"max length error",min_length:"min length error",min_string:"string min error",max_string:"string max error",char_match:"char match error",value_match:"value match error"},Sfe=["ap-guangzhou","ap-shanghai","ap-nanjing","ap-beijing","ap-chengdu"],Cfe=["ap-singapore","ap-hongkong","ap-bangkok","ap-jakarta","ap-seoul","ap-tokyo","eu-frankfurt","na-ashburn","na-siliconvalley"],s6e=new Set(Sfe),o6e=new Set(Cfe);a6e=!1,Jq={conflict:"config_conflict",migrationRequired:"migration_required"};Usr=!1});var Ja,Bfe,Ci,$_,Zq=su(()=>{(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let c of o)s[c]=c;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),c={};for(let u of s)c[u]=o[u];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},t.find=(o,s)=>{for(let c of o)if(s(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Ja||(Ja={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Bfe||(Bfe={}));Ci=Ja.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$_=t=>{switch(typeof t){case"undefined":return Ci.undefined;case"string":return Ci.string;case"number":return Number.isNaN(t)?Ci.nan:Ci.number;case"boolean":return Ci.boolean;case"function":return Ci.function;case"bigint":return Ci.bigint;case"symbol":return Ci.symbol;case"object":return Array.isArray(t)?Ci.array:t===null?Ci.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ci.promise:typeof Map<"u"&&t instanceof Map?Ci.map:typeof Set<"u"&&t instanceof Set?Ci.set:typeof Date<"u"&&t instanceof Date?Ci.date:Ci.object;default:return Ci.unknown}}});var Nn,Vsr,qy,bY=su(()=>{Zq();Nn=Ja.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"]),Vsr=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),qy=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let u=n,p=0;for(;p<c.path.length;){let f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(r(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return o(this),n}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,Ja.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};qy.create=t=>new qy(t)});var Gsr,P2,Dfe=su(()=>{bY();Zq();Gsr=(t,e)=>{let r;switch(t.code){case Nn.invalid_type:t.received===Ci.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Nn.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ja.jsonStringifyReplacer)}`;break;case Nn.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ja.joinValues(t.keys,", ")}`;break;case Nn.invalid_union:r="Invalid input";break;case Nn.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ja.joinValues(t.options)}`;break;case Nn.invalid_enum_value:r=`Invalid enum value. Expected ${Ja.joinValues(t.options)}, received '${t.received}'`;break;case Nn.invalid_arguments:r="Invalid function arguments";break;case Nn.invalid_return_type:r="Invalid function return type";break;case Nn.invalid_date:r="Invalid date";break;case Nn.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ja.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Nn.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Nn.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Nn.custom:r="Invalid input";break;case Nn.invalid_intersection_types:r="Intersection results could not be merged";break;case Nn.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Nn.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ja.assertNever(t)}return{message:r}},P2=Gsr});function Wsr(t){f6e=t}function f4(){return f6e}var f6e,EY=su(()=>{Dfe();f6e=P2});function gi(t,e){let r=f4(),n=e5({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===P2?void 0:P2].filter(o=>!!o)});t.common.issues.push(n)}var e5,Ysr,eg,Zs,hR,t0,wY,_Y,xT,d4,Pfe=su(()=>{EY();Dfe();e5=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],c={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let u="",p=n.filter(f=>!!f).slice().reverse();for(let f of p)u=f(c,{data:e,defaultError:u}).message;return{...o,path:s,message:u}},Ysr=[];eg=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return Zs;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,c=await o.value;n.push({key:s,value:c})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:c}=o;if(s.status==="aborted"||c.status==="aborted")return Zs;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(n[s.value]=c.value)}return{status:e.value,value:n}}},Zs=Object.freeze({status:"aborted"}),hR=t=>({status:"dirty",value:t}),t0=t=>({status:"valid",value:t}),wY=t=>t.status==="aborted",_Y=t=>t.status==="dirty",xT=t=>t.status==="valid",d4=t=>typeof Promise<"u"&&t instanceof Promise});var d6e=su(()=>{});var as,h6e=su(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(as||(as={}))});function ia(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(c,u)=>{var f,h;let{message:p}=t;return c.code==="invalid_enum_value"?{message:p!=null?p:u.defaultError}:typeof u.data>"u"?{message:(f=p!=null?p:n)!=null?f:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(h=p!=null?p:r)!=null?h:u.defaultError}},description:o}}function y6e(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function dor(t){return new RegExp(`^${y6e(t)}$`)}function v6e(t){let e=`${A6e}T${y6e(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function hor(t,e){return!!((e==="v4"||!e)&&sor.test(t)||(e==="v6"||!e)&&aor.test(t))}function mor(t,e){if(!tor.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function gor(t,e){return!!((e==="v4"||!e)&&oor.test(t)||(e==="v6"||!e)&&cor.test(t))}function Aor(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(e.toFixed(o).replace(".",""));return s%c/10**o}function h4(t){if(t instanceof Uy){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Rb.create(h4(n))}return new Uy({...t._def,shape:()=>e})}else return t instanceof N2?new N2({...t._def,type:h4(t.element)}):t instanceof Rb?Rb.create(h4(t.unwrap())):t instanceof V_?V_.create(h4(t.unwrap())):t instanceof H_?H_.create(t.items.map(e=>h4(e))):t}function Ofe(t,e){let r=$_(t),n=$_(e);if(t===e)return{valid:!0,data:t};if(r===Ci.object&&n===Ci.object){let o=Ja.objectKeys(e),s=Ja.objectKeys(t).filter(u=>o.indexOf(u)!==-1),c={...t,...e};for(let u of s){let p=Ofe(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(r===Ci.array&&n===Ci.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let c=t[s],u=e[s],p=Ofe(c,u);if(!p.valid)return{valid:!1};o.push(p.data)}return{valid:!0,data:o}}else return r===Ci.date&&n===Ci.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function x6e(t,e){return new SR({values:t,typeName:fo.ZodEnum,...ia(e)})}function g6e(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function b6e(t,e={},r){return t?ET.create().superRefine((n,o)=>{var c,u;let s=t(n);if(s instanceof Promise)return s.then(p=>{var f,h;if(!p){let g=g6e(e,n),y=(h=(f=g.fatal)!=null?f:r)!=null?h:!0;o.addIssue({code:"custom",...g,fatal:y})}});if(!s){let p=g6e(e,n),f=(u=(c=p.fatal)!=null?c:r)!=null?u:!0;o.addIssue({code:"custom",...p,fatal:f})}}):ET.create()}var Ob,m6e,va,Jsr,Ksr,Xsr,Zsr,eor,tor,ror,nor,ior,Rfe,sor,oor,aor,cor,uor,lor,A6e,por,bT,mR,gR,AR,yR,m4,vR,xR,ET,O2,I1,g4,N2,Uy,bR,R2,SY,ER,H_,CY,A4,y4,IY,wR,_R,SR,CR,wT,Nb,Rb,V_,IR,kR,v4,yor,t5,r5,TR,vor,fo,xor,E6e,w6e,bor,Eor,_6e,wor,_or,Sor,Cor,Ior,kor,Tor,Bor,Dor,Por,Ror,Oor,Nor,For,Lor,jor,Mor,Qor,qor,Uor,zor,$or,Hor,Vor,Gor,Wor,Yor,Jor,Kor,Xor,Zor,ear,tar,rar,S6e=su(()=>{bY();EY();h6e();Pfe();Zq();Ob=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}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}},m6e=(t,e)=>{if(xT(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new qy(t.common.issues);return this._error=r,this._error}}};va=class{get description(){return this._def.description}_getType(e){return $_(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:$_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new eg,ctx:{common:e.parent.common,data:e.data,parsedType:$_(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(d4(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!=null?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$_(e)},o=this._parseSync({data:e,path:n.path,parent:n});return m6e(n,o)}"~validate"(e){var n,o;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$_(e)};if(!this["~standard"].async)try{let s=this._parseSync({data:e,path:[],parent:r});return xT(s)?{value:s.value}:{issues:r.common.issues}}catch(s){(o=(n=s==null?void 0:s.message)==null?void 0:n.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(s=>xT(s)?{value:s.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$_(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(d4(o)?o:Promise.resolve(o));return m6e(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let c=e(o),u=()=>s.addIssue({code:Nn.custom,...n(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new Nb({schema:this,typeName:fo.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:r=>this["~validate"](r)}}optional(){return Rb.create(this,this._def)}nullable(){return V_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N2.create(this)}promise(){return wT.create(this,this._def)}or(e){return bR.create([this,e],this._def)}and(e){return ER.create(this,e,this._def)}transform(e){return new Nb({...ia(this._def),schema:this,typeName:fo.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new IR({...ia(this._def),innerType:this,defaultValue:r,typeName:fo.ZodDefault})}brand(){return new t5({typeName:fo.ZodBranded,type:this,...ia(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new kR({...ia(this._def),innerType:this,catchValue:r,typeName:fo.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return r5.create(this,e)}readonly(){return TR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Jsr=/^c[^\s-]{8,}$/i,Ksr=/^[0-9a-z]+$/,Xsr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Zsr=/^[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,eor=/^[a-z0-9_-]{21}$/i,tor=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ror=/^[-+]?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)?)??$/,nor=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ior="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",sor=/^(?:(?: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])$/,oor=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,aor=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,cor=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uor=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lor=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,A6e="((\\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])))",por=new RegExp(`^${A6e}$`);bT=class t extends va{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ci.string){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_type,expected:Ci.string,received:s.parsedType}),Zs}let n=new eg,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let c=e.data.length>s.value,u=e.data.length<s.value;(c||u)&&(o=this._getOrReturnCtx(e,o),c?gi(o,{code:Nn.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):u&&gi(o,{code:Nn.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")nor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"email",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Rfe||(Rfe=new RegExp(ior,"u")),Rfe.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"emoji",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Zsr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"uuid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")eor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"nanoid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Jsr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"cuid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Ksr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"cuid2",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Xsr.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"ulid",code:Nn.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),gi(o,{validation:"url",code:Nn.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"regex",code:Nn.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?v6e(s).test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?por.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?dor(s).test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?ror.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"duration",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?hor(e.data,s.version)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"ip",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?mor(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"jwt",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?gor(e.data,s.version)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"cidr",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?uor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"base64",code:Nn.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?lor.test(e.data)||(o=this._getOrReturnCtx(e,o),gi(o,{validation:"base64url",code:Nn.invalid_string,message:s.message}),n.dirty()):Ja.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:Nn.invalid_string,...as.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...as.errToObj(e)})}url(e){return this._addCheck({kind:"url",...as.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...as.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...as.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...as.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...as.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...as.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...as.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...as.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...as.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...as.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...as.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...as.errToObj(e)})}datetime(e){var r,n;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:(r=e==null?void 0:e.offset)!=null?r:!1,local:(n=e==null?void 0:e.local)!=null?n:!1,...as.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,...as.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...as.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...as.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...as.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...as.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...as.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...as.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...as.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...as.errToObj(r)})}nonempty(e){return this.min(1,as.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};bT.create=t=>{var e;return new bT({checks:[],typeName:fo.ZodString,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...ia(t)})};mR=class t extends va{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)!==Ci.number){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_type,expected:Ci.number,received:s.parsedType}),Zs}let n,o=new eg;for(let s of this._def.checks)s.kind==="int"?Ja.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Aor(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.not_finite,message:s.message}),o.dirty()):Ja.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,as.toString(r))}gt(e,r){return this.setLimit("min",e,!1,as.toString(r))}lte(e,r){return this.setLimit("max",e,!0,as.toString(r))}lt(e,r){return this.setLimit("max",e,!1,as.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:as.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:as.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:as.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:as.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:as.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:as.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:as.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:as.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:as.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:as.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ja.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};mR.create=t=>new mR({checks:[],typeName:fo.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ia(t)});gR=class t extends va{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)!==Ci.bigint)return this._getInvalidInput(e);let n,o=new eg;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),gi(n,{code:Nn.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Ja.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return gi(r,{code:Nn.invalid_type,expected:Ci.bigint,received:r.parsedType}),Zs}gte(e,r){return this.setLimit("min",e,!0,as.toString(r))}gt(e,r){return this.setLimit("min",e,!1,as.toString(r))}lte(e,r){return this.setLimit("max",e,!0,as.toString(r))}lt(e,r){return this.setLimit("max",e,!1,as.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:as.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:as.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:as.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:as.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:as.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:as.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};gR.create=t=>{var e;return new gR({checks:[],typeName:fo.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!=null?e:!1,...ia(t)})};AR=class extends va{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ci.boolean){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.boolean,received:n.parsedType}),Zs}return t0(e.data)}};AR.create=t=>new AR({typeName:fo.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ia(t)});yR=class t extends va{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ci.date){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_type,expected:Ci.date,received:s.parsedType}),Zs}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return gi(s,{code:Nn.invalid_date}),Zs}let n=new eg,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),gi(o,{code:Nn.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ja.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:as.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:as.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};yR.create=t=>new yR({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:fo.ZodDate,...ia(t)});m4=class extends va{_parse(e){if(this._getType(e)!==Ci.symbol){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.symbol,received:n.parsedType}),Zs}return t0(e.data)}};m4.create=t=>new m4({typeName:fo.ZodSymbol,...ia(t)});vR=class extends va{_parse(e){if(this._getType(e)!==Ci.undefined){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.undefined,received:n.parsedType}),Zs}return t0(e.data)}};vR.create=t=>new vR({typeName:fo.ZodUndefined,...ia(t)});xR=class extends va{_parse(e){if(this._getType(e)!==Ci.null){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.null,received:n.parsedType}),Zs}return t0(e.data)}};xR.create=t=>new xR({typeName:fo.ZodNull,...ia(t)});ET=class extends va{constructor(){super(...arguments),this._any=!0}_parse(e){return t0(e.data)}};ET.create=t=>new ET({typeName:fo.ZodAny,...ia(t)});O2=class extends va{constructor(){super(...arguments),this._unknown=!0}_parse(e){return t0(e.data)}};O2.create=t=>new O2({typeName:fo.ZodUnknown,...ia(t)});I1=class extends va{_parse(e){let r=this._getOrReturnCtx(e);return gi(r,{code:Nn.invalid_type,expected:Ci.never,received:r.parsedType}),Zs}};I1.create=t=>new I1({typeName:fo.ZodNever,...ia(t)});g4=class extends va{_parse(e){if(this._getType(e)!==Ci.undefined){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.void,received:n.parsedType}),Zs}return t0(e.data)}};g4.create=t=>new g4({typeName:fo.ZodVoid,...ia(t)});N2=class t extends va{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==Ci.array)return gi(r,{code:Nn.invalid_type,expected:Ci.array,received:r.parsedType}),Zs;if(o.exactLength!==null){let c=r.data.length>o.exactLength.value,u=r.data.length<o.exactLength.value;(c||u)&&(gi(r,{code:c?Nn.too_big:Nn.too_small,minimum:u?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(gi(r,{code:Nn.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(gi(r,{code:Nn.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((c,u)=>o.type._parseAsync(new Ob(r,c,r.path,u)))).then(c=>eg.mergeArray(n,c));let s=[...r.data].map((c,u)=>o.type._parseSync(new Ob(r,c,r.path,u)));return eg.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:as.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:as.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:as.toString(r)}})}nonempty(e){return this.min(1,e)}};N2.create=(t,e)=>new N2({type:t,minLength:null,maxLength:null,exactLength:null,typeName:fo.ZodArray,...ia(e)});Uy=class t extends va{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Ja.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Ci.object){let f=this._getOrReturnCtx(e);return gi(f,{code:Nn.invalid_type,expected:Ci.object,received:f.parsedType}),Zs}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof I1&&this._def.unknownKeys==="strip"))for(let f in o.data)c.includes(f)||u.push(f);let p=[];for(let f of c){let h=s[f],g=o.data[f];p.push({key:{status:"valid",value:f},value:h._parse(new Ob(o,g,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof I1){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)p.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&(gi(o,{code:Nn.unrecognized_keys,keys:u}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of u){let g=o.data[h];p.push({key:{status:"valid",value:h},value:f._parse(new Ob(o,g,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of p){let g=await h.key,y=await h.value;f.push({key:g,value:y,alwaysSet:h.alwaysSet})}return f}).then(f=>eg.mergeObjectSync(n,f)):eg.mergeObjectSync(n,p)}get shape(){return this._def.shape()}strict(e){return as.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var s,c,u,p;let o=(u=(c=(s=this._def).errorMap)==null?void 0:c.call(s,r,n).message)!=null?u:n.defaultError;return r.code==="unrecognized_keys"?{message:(p=as.errToObj(e).message)!=null?p:o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:fo.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Ja.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of Ja.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return h4(this)}partial(e){let r={};for(let n of Ja.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of Ja.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Rb;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return x6e(Ja.objectKeys(this.shape))}};Uy.create=(t,e)=>new Uy({shape:()=>t,unknownKeys:"strip",catchall:I1.create(),typeName:fo.ZodObject,...ia(e)});Uy.strictCreate=(t,e)=>new Uy({shape:()=>t,unknownKeys:"strict",catchall:I1.create(),typeName:fo.ZodObject,...ia(e)});Uy.lazycreate=(t,e)=>new Uy({shape:t,unknownKeys:"strip",catchall:I1.create(),typeName:fo.ZodObject,...ia(e)});bR=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let c=s.map(u=>new qy(u.ctx.common.issues));return gi(r,{code:Nn.invalid_union,unionErrors:c}),Zs}if(r.common.async)return Promise.all(n.map(async s=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(o);{let s,c=[];for(let p of n){let f={...r,common:{...r.common,issues:[]},parent:null},h=p._parseSync({data:r.data,path:r.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=c.map(p=>new qy(p));return gi(r,{code:Nn.invalid_union,unionErrors:u}),Zs}}get options(){return this._def.options}};bR.create=(t,e)=>new bR({options:t,typeName:fo.ZodUnion,...ia(e)});R2=t=>t instanceof wR?R2(t.schema):t instanceof Nb?R2(t.innerType()):t instanceof _R?[t.value]:t instanceof SR?t.options:t instanceof CR?Ja.objectValues(t.enum):t instanceof IR?R2(t._def.innerType):t instanceof vR?[void 0]:t instanceof xR?[null]:t instanceof Rb?[void 0,...R2(t.unwrap())]:t instanceof V_?[null,...R2(t.unwrap())]:t instanceof t5||t instanceof TR?R2(t.unwrap()):t instanceof kR?R2(t._def.innerType):[],SY=class t extends va{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ci.object)return gi(r,{code:Nn.invalid_type,expected:Ci.object,received:r.parsedType}),Zs;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(gi(r,{code:Nn.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Zs)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let c=R2(s.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let u of c){if(o.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);o.set(u,s)}}return new t({typeName:fo.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...ia(n)})}};ER=class extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,c)=>{if(wY(s)||wY(c))return Zs;let u=Ofe(s.value,c.value);return u.valid?((_Y(s)||_Y(c))&&r.dirty(),{status:r.value,value:u.data}):(gi(n,{code:Nn.invalid_intersection_types}),Zs)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,c])=>o(s,c)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ER.create=(t,e,r)=>new ER({left:t,right:e,typeName:fo.ZodIntersection,...ia(r)});H_=class t extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.array)return gi(n,{code:Nn.invalid_type,expected:Ci.array,received:n.parsedType}),Zs;if(n.data.length<this._def.items.length)return gi(n,{code:Nn.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Zs;!this._def.rest&&n.data.length>this._def.items.length&&(gi(n,{code:Nn.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((c,u)=>{let p=this._def.items[u]||this._def.rest;return p?p._parse(new Ob(n,c,n.path,u)):null}).filter(c=>!!c);return n.common.async?Promise.all(s).then(c=>eg.mergeArray(r,c)):eg.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};H_.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new H_({items:t,typeName:fo.ZodTuple,rest:null,...ia(e)})};CY=class t extends va{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.object)return gi(n,{code:Nn.invalid_type,expected:Ci.object,received:n.parsedType}),Zs;let o=[],s=this._def.keyType,c=this._def.valueType;for(let u in n.data)o.push({key:s._parse(new Ob(n,u,n.path,u)),value:c._parse(new Ob(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?eg.mergeObjectAsync(r,o):eg.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof va?new t({keyType:e,valueType:r,typeName:fo.ZodRecord,...ia(n)}):new t({keyType:bT.create(),valueType:e,typeName:fo.ZodRecord,...ia(r)})}},A4=class extends va{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.map)return gi(n,{code:Nn.invalid_type,expected:Ci.map,received:n.parsedType}),Zs;let o=this._def.keyType,s=this._def.valueType,c=[...n.data.entries()].map(([u,p],f)=>({key:o._parse(new Ob(n,u,n.path,[f,"key"])),value:s._parse(new Ob(n,p,n.path,[f,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let p of c){let f=await p.key,h=await p.value;if(f.status==="aborted"||h.status==="aborted")return Zs;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let p of c){let f=p.key,h=p.value;if(f.status==="aborted"||h.status==="aborted")return Zs;(f.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(f.value,h.value)}return{status:r.value,value:u}}}};A4.create=(t,e,r)=>new A4({valueType:e,keyType:t,typeName:fo.ZodMap,...ia(r)});y4=class t extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ci.set)return gi(n,{code:Nn.invalid_type,expected:Ci.set,received:n.parsedType}),Zs;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(gi(n,{code:Nn.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(gi(n,{code:Nn.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function c(p){let f=new Set;for(let h of p){if(h.status==="aborted")return Zs;h.status==="dirty"&&r.dirty(),f.add(h.value)}return{status:r.value,value:f}}let u=[...n.data.values()].map((p,f)=>s._parse(new Ob(n,p,n.path,f)));return n.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,r){return new t({...this._def,minSize:{value:e,message:as.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:as.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};y4.create=(t,e)=>new y4({valueType:t,minSize:null,maxSize:null,typeName:fo.ZodSet,...ia(e)});IY=class t extends va{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ci.function)return gi(r,{code:Nn.invalid_type,expected:Ci.function,received:r.parsedType}),Zs;function n(u,p){return e5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f4(),P2].filter(f=>!!f),issueData:{code:Nn.invalid_arguments,argumentsError:p}})}function o(u,p){return e5({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f4(),P2].filter(f=>!!f),issueData:{code:Nn.invalid_return_type,returnTypeError:p}})}let s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof wT){let u=this;return t0(async function(...p){let f=new qy([]),h=await u._def.args.parseAsync(p,s).catch(b=>{throw f.addIssue(n(p,b)),f}),g=await Reflect.apply(c,this,h);return await u._def.returns._def.type.parseAsync(g,s).catch(b=>{throw f.addIssue(o(g,b)),f})})}else{let u=this;return t0(function(...p){let f=u._def.args.safeParse(p,s);if(!f.success)throw new qy([n(p,f.error)]);let h=Reflect.apply(c,this,f.data),g=u._def.returns.safeParse(h,s);if(!g.success)throw new qy([o(h,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:H_.create(e).rest(O2.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||H_.create([]).rest(O2.create()),returns:r||O2.create(),typeName:fo.ZodFunction,...ia(n)})}},wR=class extends va{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};wR.create=(t,e)=>new wR({getter:t,typeName:fo.ZodLazy,...ia(e)});_R=class extends va{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return gi(r,{received:r.data,code:Nn.invalid_literal,expected:this._def.value}),Zs}return{status:"valid",value:e.data}}get value(){return this._def.value}};_R.create=(t,e)=>new _R({value:t,typeName:fo.ZodLiteral,...ia(e)});SR=class t extends va{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return gi(r,{expected:Ja.joinValues(n),received:r.parsedType,code:Nn.invalid_type}),Zs}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return gi(r,{received:r.data,code:Nn.invalid_enum_value,options:n}),Zs}return t0(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};SR.create=x6e;CR=class extends va{_parse(e){let r=Ja.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ci.string&&n.parsedType!==Ci.number){let o=Ja.objectValues(r);return gi(n,{expected:Ja.joinValues(o),received:n.parsedType,code:Nn.invalid_type}),Zs}if(this._cache||(this._cache=new Set(Ja.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Ja.objectValues(r);return gi(n,{received:n.data,code:Nn.invalid_enum_value,options:o}),Zs}return t0(e.data)}get enum(){return this._def.values}};CR.create=(t,e)=>new CR({values:t,typeName:fo.ZodNativeEnum,...ia(e)});wT=class extends va{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ci.promise&&r.common.async===!1)return gi(r,{code:Nn.invalid_type,expected:Ci.promise,received:r.parsedType}),Zs;let n=r.parsedType===Ci.promise?r.data:Promise.resolve(r.data);return t0(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};wT.create=(t,e)=>new wT({type:t,typeName:fo.ZodPromise,...ia(e)});Nb=class extends va{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fo.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:c=>{gi(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let c=o.transform(n.data,s);if(n.common.async)return Promise.resolve(c).then(async u=>{if(r.value==="aborted")return Zs;let p=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return p.status==="aborted"?Zs:p.status==="dirty"?hR(p.value):r.value==="dirty"?hR(p.value):p});{if(r.value==="aborted")return Zs;let u=this._def.schema._parseSync({data:c,path:n.path,parent:n});return u.status==="aborted"?Zs:u.status==="dirty"?hR(u.value):r.value==="dirty"?hR(u.value):u}}if(o.type==="refinement"){let c=u=>{let p=o.refinement(u,s);if(n.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?Zs:(u.status==="dirty"&&r.dirty(),c(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?Zs:(u.status==="dirty"&&r.dirty(),c(u.value).then(()=>({status:r.value,value:u.value}))))}if(o.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!xT(c))return Zs;let u=o.transform(c.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>xT(c)?Promise.resolve(o.transform(c.value,s)).then(u=>({status:r.value,value:u})):Zs);Ja.assertNever(o)}};Nb.create=(t,e,r)=>new Nb({schema:t,typeName:fo.ZodEffects,effect:e,...ia(r)});Nb.createWithPreprocess=(t,e,r)=>new Nb({schema:e,effect:{type:"preprocess",transform:t},typeName:fo.ZodEffects,...ia(r)});Rb=class extends va{_parse(e){return this._getType(e)===Ci.undefined?t0(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Rb.create=(t,e)=>new Rb({innerType:t,typeName:fo.ZodOptional,...ia(e)});V_=class extends va{_parse(e){return this._getType(e)===Ci.null?t0(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};V_.create=(t,e)=>new V_({innerType:t,typeName:fo.ZodNullable,...ia(e)});IR=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===Ci.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};IR.create=(t,e)=>new IR({innerType:t,typeName:fo.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ia(e)});kR=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return d4(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new qy(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new qy(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};kR.create=(t,e)=>new kR({innerType:t,typeName:fo.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ia(e)});v4=class extends va{_parse(e){if(this._getType(e)!==Ci.nan){let n=this._getOrReturnCtx(e);return gi(n,{code:Nn.invalid_type,expected:Ci.nan,received:n.parsedType}),Zs}return{status:"valid",value:e.data}}};v4.create=t=>new v4({typeName:fo.ZodNaN,...ia(t)});yor=Symbol("zod_brand"),t5=class extends va{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},r5=class t extends va{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Zs:s.status==="dirty"?(r.dirty(),hR(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Zs:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:fo.ZodPipeline})}},TR=class extends va{_parse(e){let r=this._def.innerType._parse(e),n=o=>(xT(o)&&(o.value=Object.freeze(o.value)),o);return d4(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};TR.create=(t,e)=>new TR({innerType:t,typeName:fo.ZodReadonly,...ia(e)});vor={object:Uy.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(fo||(fo={}));xor=(t,e={message:`Input not instance of ${t.name}`})=>b6e(r=>r instanceof t,e),E6e=bT.create,w6e=mR.create,bor=v4.create,Eor=gR.create,_6e=AR.create,wor=yR.create,_or=m4.create,Sor=vR.create,Cor=xR.create,Ior=ET.create,kor=O2.create,Tor=I1.create,Bor=g4.create,Dor=N2.create,Por=Uy.create,Ror=Uy.strictCreate,Oor=bR.create,Nor=SY.create,For=ER.create,Lor=H_.create,jor=CY.create,Mor=A4.create,Qor=y4.create,qor=IY.create,Uor=wR.create,zor=_R.create,$or=SR.create,Hor=CR.create,Vor=wT.create,Gor=Nb.create,Wor=Rb.create,Yor=V_.create,Jor=Nb.createWithPreprocess,Kor=r5.create,Xor=()=>E6e().optional(),Zor=()=>w6e().optional(),ear=()=>_6e().optional(),tar={string:t=>bT.create({...t,coerce:!0}),number:t=>mR.create({...t,coerce:!0}),boolean:t=>AR.create({...t,coerce:!0}),bigint:t=>gR.create({...t,coerce:!0}),date:t=>yR.create({...t,coerce:!0})},rar=Zs});var Ax={};Cq(Ax,{BRAND:()=>yor,DIRTY:()=>hR,EMPTY_PATH:()=>Ysr,INVALID:()=>Zs,NEVER:()=>rar,OK:()=>t0,ParseStatus:()=>eg,Schema:()=>va,ZodAny:()=>ET,ZodArray:()=>N2,ZodBigInt:()=>gR,ZodBoolean:()=>AR,ZodBranded:()=>t5,ZodCatch:()=>kR,ZodDate:()=>yR,ZodDefault:()=>IR,ZodDiscriminatedUnion:()=>SY,ZodEffects:()=>Nb,ZodEnum:()=>SR,ZodError:()=>qy,ZodFirstPartyTypeKind:()=>fo,ZodFunction:()=>IY,ZodIntersection:()=>ER,ZodIssueCode:()=>Nn,ZodLazy:()=>wR,ZodLiteral:()=>_R,ZodMap:()=>A4,ZodNaN:()=>v4,ZodNativeEnum:()=>CR,ZodNever:()=>I1,ZodNull:()=>xR,ZodNullable:()=>V_,ZodNumber:()=>mR,ZodObject:()=>Uy,ZodOptional:()=>Rb,ZodParsedType:()=>Ci,ZodPipeline:()=>r5,ZodPromise:()=>wT,ZodReadonly:()=>TR,ZodRecord:()=>CY,ZodSchema:()=>va,ZodSet:()=>y4,ZodString:()=>bT,ZodSymbol:()=>m4,ZodTransformer:()=>Nb,ZodTuple:()=>H_,ZodType:()=>va,ZodUndefined:()=>vR,ZodUnion:()=>bR,ZodUnknown:()=>O2,ZodVoid:()=>g4,addIssueToContext:()=>gi,any:()=>Ior,array:()=>Dor,bigint:()=>Eor,boolean:()=>_6e,coerce:()=>tar,custom:()=>b6e,date:()=>wor,datetimeRegex:()=>v6e,defaultErrorMap:()=>P2,discriminatedUnion:()=>Nor,effect:()=>Gor,enum:()=>$or,function:()=>qor,getErrorMap:()=>f4,getParsedType:()=>$_,instanceof:()=>xor,intersection:()=>For,isAborted:()=>wY,isAsync:()=>d4,isDirty:()=>_Y,isValid:()=>xT,late:()=>vor,lazy:()=>Uor,literal:()=>zor,makeIssue:()=>e5,map:()=>Mor,nan:()=>bor,nativeEnum:()=>Hor,never:()=>Tor,null:()=>Cor,nullable:()=>Yor,number:()=>w6e,object:()=>Por,objectUtil:()=>Bfe,oboolean:()=>ear,onumber:()=>Zor,optional:()=>Wor,ostring:()=>Xor,pipeline:()=>Kor,preprocess:()=>Jor,promise:()=>Vor,quotelessJson:()=>Vsr,record:()=>jor,set:()=>Qor,setErrorMap:()=>Wsr,strictObject:()=>Ror,string:()=>E6e,symbol:()=>_or,transformer:()=>Gor,tuple:()=>Lor,undefined:()=>Sor,union:()=>Oor,unknown:()=>kor,util:()=>Ja,void:()=>Bor});var Nfe=su(()=>{EY();Pfe();d6e();Zq();S6e();bY()});var C6e=su(()=>{Nfe();Nfe()});var nar,I6e,iar,sar,oar,aar,car,uar,lar,k6e,T6e=su(()=>{C6e();nar=/^(?=.{2,30}$)[a-z0-9]+(-[a-z0-9]+)*-?[a-z0-9]+$/,I6e=Ax.string().refine(t=>nar.test(t)),iar=Ax.enum(["vps-react-ts","vps-react","vps-vue-ts","vps-vue","manaia-demo","manaia-demo-ts"]),sar=Ax.object({name:I6e}),oar=Ax.object({name:I6e,template:iar}),aar=Ax.object({script:Ax.string().optional()}),car=Ax.object({script:Ax.string().optional()}),uar=Ax.object({}),lar=Ax.object({}),k6e={initArgsSchema:sar,generateArgsSchema:oar,devArgsSchema:aar,publishArgsSchema:car,deleteArgsSchema:uar,testArgsSchema:lar}});function par(t,e){return r=>{try{t.parse(r)}catch(n){throw new vY(`Failed to validate ${e}`,n)}}}function far(){let t={};return Object.entries({...k6e,...xfe}).forEach(([e,r])=>{let n=e.replace("Schema","");t[n]=par(r,n)}),t}var cai,B6e=su(()=>{T6e();AY();bfe();cai=far()});function BR(t="",e={confPath:""}){try{t=t||process.cwd();let[r,n]=i5(t);if(e.exists=n,!n)return e.showError||(0,e0.showError)(),{headers:[],redirects:[],rewrites:[]};if(e.confPath=r,r.endsWith(".ts"))return har(r);let o=iY(r);return R6e.default.parse(o)}catch{e.showError||(0,e0.showError)()}}function har(t){var g,y,b,A,I,S,k,R,M;let e=Ffe.default.statSync(t),r=D6e.get(t);if(r&&r.mtimeMs===e.mtimeMs)return r.config;let n=(0,n5.createRequire)("file:///data/__qci/root-workspaces/__qci-pipeline-11188016-1/packages/tef-cli/edgeone-dist/cli.js"),o=yx.default.join(yx.default.dirname((0,O6e.fileURLToPath)("file:///data/__qci/root-workspaces/__qci-pipeline-11188016-1/packages/tef-cli/edgeone-dist/cli.js")),"config-schema.js"),s=Ffe.default.existsSync(o)?o:n.resolve("@edgeone/types/config"),c;try{c=(0,P6e.buildSync)({entryPoints:[t],bundle:!0,platform:"node",format:"cjs",write:!1,target:"node12",logLevel:"silent",absWorkingDir:yx.default.dirname(t),alias:{"@edgeone/types/config":s},external:[]})}catch(Q){throw new dR(`Failed to load ${yx.default.basename(t)}:
|
|
22
22
|
${(g=Q==null?void 0:Q.message)!=null?g:Q}`)}if((y=c.errors)!=null&&y.length)throw new dR(`Failed to load ${yx.default.basename(t)}:
|
|
23
23
|
`+c.errors.map(Q=>`${Q.text}${Q.location?` (${Q.location.file}:${Q.location.line})`:""}`).join(`
|
|
24
24
|
`));let u=(I=(A=(b=c.outputFiles)==null?void 0:b[0])==null?void 0:A.text)!=null?I:"",p=new n5.default(t);p.filename=t,p.paths=n5.default._nodeModulePaths(yx.default.dirname(t)),p._compile(u,t);let f=(M=(R=(S=p.exports)==null?void 0:S.default)!=null?R:(k=p.exports)==null?void 0:k.config)!=null?M:p.exports,h=typeof f=="function"?f():f;if(!h||typeof h!="object"||Array.isArray(h))throw new dR(`${yx.default.basename(t)} must default-export a config object.`);return D6e.set(t,{mtimeMs:e.mtimeMs,config:h}),h}function gar(t){let e=new Error(t);return e.code=F6e,e}function Aar(t){if((t==null?void 0:t.code)===F6e)return!0;let e=typeof t=="string"?t:t==null?void 0:t.message;return e==null?void 0:e.includes(mar)}async function x4(t=!1){var s,c,u,p,f,h,g,y,b;!t&&console.log(`
|
|
@@ -564,7 +564,7 @@ caused by: `+Wc.fullStack(e):t.stack};Wc.errorFromList=function(t){return Xd.arr
|
|
|
564
564
|
`)}rowToString(e,r){return this.rasterize(e).forEach((n,o)=>{let s="";n.forEach((c,u)=>{let{width:p}=e[u],f=this.negatePadding(e[u]),h=c;if(f>px.stringWidth(c)&&(h+=" ".repeat(f-px.stringWidth(c))),e[u].align&&e[u].align!=="left"&&this.wrap){let y=cer[e[u].align];h=y(h,f),px.stringWidth(h)<f&&(h+=" ".repeat((p||0)-px.stringWidth(h)-1))}let g=e[u].padding||[0,0,0,0];g[NW]&&(s+=" ".repeat(g[NW])),s+=mje(e[u],h,"| "),s+=h,s+=mje(e[u],h," |"),g[OW]&&(s+=" ".repeat(g[OW])),o===0&&r.length>0&&(s=this.renderInline(s,r[r.length-1]))}),r.push({text:s.replace(/ +$/,""),span:e.span})}),r}renderInline(e,r){let n=e.match(/^ */),o=n?n[0].length:0,s=r.text,c=px.stringWidth(s.trimRight());return r.span?this.wrap?o<c?e:(r.hidden=!0,s.trimRight()+" ".repeat(o-c)+e.trimLeft()):(r.hidden=!0,s+e):e}rasterize(e){let r=[],n=this.columnWidths(e),o;return e.forEach((s,c)=>{s.width=n[c],this.wrap?o=px.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
|
|
565
565
|
`):o=s.text.split(`
|
|
566
566
|
`),s.border&&(o.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),o.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(o.unshift(...new Array(s.padding[uer]||0).fill("")),o.push(...new Array(s.padding[ler]||0).fill(""))),o.forEach((u,p)=>{r[p]||r.push([]);let f=r[p];for(let h=0;h<c;h++)f[h]===void 0&&f.push("");f.push(u)})}),r}negatePadding(e){let r=e.width||0;return e.padding&&(r-=(e.padding[NW]||0)+(e.padding[OW]||0)),e.border&&(r-=4),r}columnWidths(e){if(!this.wrap)return e.map(c=>c.width||px.stringWidth(c.text));let r=e.length,n=this.width,o=e.map(c=>{if(c.width)return r--,n-=c.width,c.width}),s=r?Math.floor(n/r):0;return o.map((c,u)=>c===void 0?Math.max(s,per(e[u])):c)}};function mje(t,e,r){return t.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?r:" ":""}function per(t){let e=t.padding||[],r=1+(e[NW]||0)+(e[OW]||0);return t.border?r+4:r}function fer(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function der(t,e){t=t.trim();let r=px.stringWidth(t);return r<e?" ".repeat(e-r)+t:t}function her(t,e){t=t.trim();let r=px.stringWidth(t);return r>=e?t:" ".repeat(e-r>>1)+t}var px;function gje(t,e){return px=e,new mpe({width:(t==null?void 0:t.width)||fer(),wrap:t==null?void 0:t.wrap})}var Aje=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function gpe(t){return t.replace(Aje,"")}function yje(t,e){let[r,n]=t.match(Aje)||["",""];t=gpe(t);let o="";for(let s=0;s<t.length;s++)s!==0&&s%e===0&&(o+=`
|
|
567
|
-
`),o+=t.charAt(s);return r&&n&&(o=`${r}${o}${n}`),o}function Ape(t){return gje(t,{stringWidth:e=>[...e].length,stripAnsi:gpe,wrap:yje})}var HL=require("path"),FW=require("fs");function vje(t,e){let r=(0,HL.resolve)(".",t),n;for((0,FW.statSync)(r).isDirectory()||(r=(0,HL.dirname)(r));;){if(n=e(r,(0,FW.readdirSync)(r)),n)return(0,HL.resolve)(r,n);if(r=(0,HL.dirname)(n=r),n===r)break}}var Cje=require("util"),Ije=require("fs"),kje=require("url");var w1=require("path");var VL=require("fs"),xje=require("util"),bje=require("path"),Eje={fs:{readFileSync:VL.readFileSync,writeFile:VL.writeFile},format:xje.format,resolve:bje.resolve,exists:t=>{try{return(0,VL.statSync)(t).isFile()}catch{return!1}}};var E1,ype=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),E1.format.apply(E1.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),o=e.shift(),s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let c=o===1?r:n;this.cache[this.locale][r]&&(c=this.cache[this.locale][r][o===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let u=[c];return~c.indexOf("%d")&&u.push(o),E1.format.apply(E1.format,u.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(o,s){let c=r[s+1];n+=o,typeof c<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,o=r.locale,s=r.cb,c=this._resolveLocaleFile(n,o),u=JSON.stringify(this.cache[o],null,2);E1.fs.writeFile(c,u,"utf-8",function(p){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(p)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{E1.fs.readFileSync&&(e=JSON.parse(E1.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=E1.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let o=E1.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(o)&&(n=o)}return n}_fileExistsSync(e){return E1.exists(e)}};function wje(t,e){E1=e;let r=new ype(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var mer=t=>wje(t,Eje),_je=mer;var ger="require is not supported by ESM",Sje="loading a directory of commands is not supported yet for ESM",Dq;try{Dq=(0,kje.fileURLToPath)("file:///Users/jesper/Desktop/develop/full-stack-deployment/ef-dev-tools/packages/tef-cli/edgeone-dist/cli.js")}catch{Dq=process.cwd()}var Aer=Dq.substring(0,Dq.lastIndexOf("node_modules")),vpe={assert:{notStrictEqual:LW.notStrictEqual,strictEqual:LW.strictEqual},cliui:Ape,findUp:vje,getEnv:t=>process.env[t],inspect:Cje.inspect,getCallerFile:()=>{throw new cp(Sje)},getProcessArgvBin:aje,mainFilename:Aer||process.cwd(),Parser:hpe,path:{basename:w1.basename,dirname:w1.dirname,extname:w1.extname,relative:w1.relative,resolve:w1.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Ije.readFileSync,require:()=>{throw new cp(ger)},requireDirectory:()=>{throw new cp(Sje)},stringWidth:t=>[...t].length,y18n:_je({directory:(0,w1.resolve)(Dq,"../../../locales"),updateFiles:!1})};function uA(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function xpe(t,e){e.assert.strictEqual(typeof t,"string")}function WL(t){return Object.keys(t)}function up(t){return!!t&&!!t.then&&typeof t.then=="function"}function sT(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,o=r.shift();if(!o)throw new Error(`No command found in: ${t}`);let s={cmd:o.replace(n,""),demanded:[],optional:[]};return r.forEach((c,u)=>{let p=!1;c=c.replace(/\s/g,""),/\.+[\]>]/.test(c)&&u===r.length-1&&(p=!0),/^\[/.test(c)?s.optional.push({cmd:c.replace(n,"").split("|"),variadic:p}):s.demanded.push({cmd:c.replace(n,"").split("|"),variadic:p})}),s}var yer=["first","second","third","fourth","fifth","sixth"];function Qi(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[sT(`cmd ${t}`),e,r]}try{let o=0,[s,c,u]=n(),p=[].slice.call(c);for(;p.length&&p[p.length-1]===void 0;)p.pop();let f=u||p.length;if(f<s.demanded.length)throw new cp(`Not enough arguments provided. Expected ${s.demanded.length} but received ${p.length}.`);let h=s.demanded.length+s.optional.length;if(f>h)throw new cp(`Too many arguments provided. Expected max ${h} but received ${f}.`);s.demanded.forEach(g=>{let y=p.shift(),b=Tje(y);g.cmd.filter(I=>I===b||I==="*").length===0&&Bje(b,g.cmd,o),o+=1}),s.optional.forEach(g=>{if(p.length===0)return;let y=p.shift(),b=Tje(y);g.cmd.filter(I=>I===b||I==="*").length===0&&Bje(b,g.cmd,o),o+=1})}catch(o){console.warn(o.stack)}}function Tje(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Bje(t,e,r){throw new cp(`Invalid ${yer[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var jW=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,o=!1){if(Qi("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s<e.length;s++){if(typeof e[s]!="function")throw Error("middleware must be a function");let c=e[s];c.applyBeforeValidation=r,c.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let s=e;s.applyBeforeValidation=r,s.global=n,s.mutates=o,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(o=>{let s=[...n[r]||[],r];return o.option?!s.includes(o.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function Dje(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function FP(t,e,r,n){return r.reduce((o,s)=>{if(s.applyBeforeValidation!==n)return o;if(s.mutates){if(s.applied)return o;s.applied=!0}if(up(o))return o.then(c=>Promise.all([c,s(c,e)])).then(([c,u])=>Object.assign(c,u));{let c=s(o,e);return up(c)?c.then(u=>Object.assign(o,u)):Object.assign(o,c)}},t)}function LP(t,e,r=n=>{throw n}){try{let n=ver(t)?t():t;return up(n)?n.then(o=>e(o)):e(n)}catch(n){return r(n)}}function ver(t){return typeof t=="function"}function bpe(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}var YL=/(^\*)|(^\$0)/,Epe=class{constructor(e,r,n,o){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=o,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,o){o=o||{},typeof o.recurse!="boolean"&&(o.recurse=!1),Array.isArray(o.extensions)||(o.extensions=["js"]);let s=typeof o.visit=="function"?o.visit:c=>c;o.visit=(c,u,p)=>{let f=s(c,u,p);if(f){if(this.requireCache.has(u))return f;this.requireCache.add(u),this.addHandler(f)}return f},this.shim.requireDirectory({require:r,filename:n},e,o)}addHandler(e,r,n,o,s,c){let u=[],p=Dje(s);if(o=o||(()=>{}),Array.isArray(e))if(xer(e))[e,...u]=e;else for(let f of e)this.addHandler(f);else if(Eer(e)){let f=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(f=[].concat(f).concat(e.aliases)),this.addHandler(f,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(Pje(n)){this.addHandler([e].concat(u),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let f=sT(e);u=u.map(y=>sT(y).cmd);let h=!1,g=[f.cmd].concat(u).filter(y=>YL.test(y)?(h=!0,!1):!0);g.length===0&&h&&g.push("$0"),h&&(f.cmd=g[0],u=g.slice(1),e=e.replace(YL,f.cmd)),u.forEach(y=>{this.aliasMap[y]=f.cmd}),r!==!1&&this.usage.command(e,r,h,u,c),this.handlers[f.cmd]={original:e,description:r,handler:o,builder:n||{},middlewares:p,deprecated:c,demanded:f.demanded,optional:f.optional},h&&(this.defaultCommand=this.handlers[f.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,o,s,c){let u=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,p=r.getInternalMethods().getContext(),f=p.commands.slice(),h=!e;e&&(p.commands.push(e),p.fullCommands.push(u.original));let g=this.applyBuilderUpdateUsageAndParse(h,u,r,n.aliases,f,o,s,c);return up(g)?g.then(y=>this.applyMiddlewareAndGetResult(h,u,y.innerArgv,p,s,y.aliases,r)):this.applyMiddlewareAndGetResult(h,u,g.innerArgv,p,s,g.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,o,s,c,u,p){let f=r.builder,h=n;if(MW(f)){n.getInternalMethods().getUsageInstance().freeze();let g=f(n.getInternalMethods().reset(o),p);if(up(g))return g.then(y=>(h=Oje(y)?y:n,this.parseAndUpdateUsage(e,r,h,s,c,u)))}else ber(f)&&(n.getInternalMethods().getUsageInstance().freeze(),h=n.getInternalMethods().reset(o),Object.keys(r.builder).forEach(g=>{h.option(g,f[g])}));return this.parseAndUpdateUsage(e,r,h,s,c,u)}parseAndUpdateUsage(e,r,n,o,s,c){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(o,r),r.description);let u=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,c);return up(u)?u.then(p=>({aliases:n.parsed.aliases,innerArgv:p})):{aliases:n.parsed.aliases,innerArgv:u}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=YL.test(r.original)?r.original.replace(YL,"").trim():r.original,o=e.filter(s=>!YL.test(s));return o.push(n),`$0 ${o.join(" ")}`}handleValidationAndGetResult(e,r,n,o,s,c,u,p){if(!c.getInternalMethods().getHasOutput()){let f=c.getInternalMethods().runValidation(s,p,c.parsed.error,e);n=LP(n,h=>(f(h),h))}if(r.handler&&!c.getInternalMethods().getHasOutput()){c.getInternalMethods().setHasOutput();let f=!!c.getOptions().configuration["populate--"];c.getInternalMethods().postProcess(n,f,!1,!1),n=FP(n,c,u,!1),n=LP(n,h=>{let g=r.handler(h);return up(g)?g.then(()=>h):h}),e||c.getInternalMethods().getUsageInstance().cacheHelpMessage(),up(n)&&!c.getInternalMethods().hasParseCallback()&&n.catch(h=>{try{c.getInternalMethods().getUsageInstance().fail(null,h)}catch{}})}return e||(o.commands.pop(),o.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,o,s,c,u){let p={};if(s)return n;u.getInternalMethods().getHasOutput()||(p=this.populatePositionals(r,n,o,u));let f=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),h=FP(n,u,f,!0);return up(h)?h.then(g=>this.handleValidationAndGetResult(e,r,g,o,c,u,f,p)):this.handleValidationAndGetResult(e,r,h,o,c,u,f,p)}populatePositionals(e,r,n,o){r._=r._.slice(n.commands.length);let s=e.demanded.slice(0),c=e.optional.slice(0),u={};for(this.validation.positionalCount(s.length,r._.length);s.length;){let p=s.shift();this.populatePositional(p,r,u)}for(;c.length;){let p=c.shift();this.populatePositional(p,r,u)}return r._=n.commands.concat(r._.map(p=>""+p)),this.postProcessPositionals(r,u,this.cmdToParseOptions(e.original),o),u}populatePositional(e,r,n){let o=e.cmd[0];e.variadic?n[o]=r._.splice(0).map(String):r._.length&&(n[o]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=sT(e);return n.demanded.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c,r.demand[s]=!0}),n.optional.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c}),r}postProcessPositionals(e,r,n,o){let s=Object.assign({},o.getOptions());s.default=Object.assign(n.default,s.default);for(let f of Object.keys(n.alias))s.alias[f]=(s.alias[f]||[]).concat(n.alias[f]);s.array=s.array.concat(n.array),s.config={};let c=[];if(Object.keys(r).forEach(f=>{r[f].map(h=>{s.configuration["unknown-options-as-args"]&&(s.key[f]=!0),c.push(`--${f}`),c.push(h)})}),!c.length)return;let u=Object.assign({},s.configuration,{"populate--":!1}),p=this.shim.Parser.detailed(c,Object.assign({},s,{configuration:u}));if(p.error)o.getInternalMethods().getUsageInstance().fail(p.error.message,p.error);else{let f=Object.keys(r);Object.keys(r).forEach(h=>{f.push(...p.aliases[h])}),Object.keys(p.argv).forEach(h=>{f.includes(h)&&(r[h]||(r[h]=p.argv[h]),!this.isInConfigs(o,h)&&!this.isDefaulted(o,h)&&Object.prototype.hasOwnProperty.call(e,h)&&Object.prototype.hasOwnProperty.call(p.argv,h)&&(Array.isArray(e[h])||Array.isArray(p.argv[h]))?e[h]=[].concat(e[h],p.argv[h]):e[h]=p.argv[h])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(o=>Object.prototype.hasOwnProperty.call(o,r))||n.some(o=>Object.prototype.hasOwnProperty.call(o,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=YL.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(MW(r))return r(e,!0);Pje(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=bpe(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let o of[e,r,n]){if(typeof o=="string"||o===!1)return o;uA(o,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();uA(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function Rje(t,e,r,n){return new Epe(t,e,r,n)}function Pje(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function xer(t){return t.every(e=>typeof e=="string")}function MW(t){return typeof t=="function"}function ber(t){return typeof t=="object"}function Eer(t){return typeof t=="object"&&!Array.isArray(t)}function oT(t={},e=()=>!0){let r={};return WL(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function aT(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function wer(t){return typeof t=="boolean"}function Fje(t,e){let r=e.y18n.__,n={},o=[];n.failFn=function(be){o.push(be)};let s=null,c=null,u=!0;n.showHelpOnFail=function(be=!0,ae){let[H,me]=typeof be=="string"?[!0,be]:[be,ae];return t.getInternalMethods().isGlobalContext()&&(c=me),s=me,u=H,n};let p=!1;n.fail=function(be,ae){let H=t.getInternalMethods().getLoggerInstance();if(o.length)for(let me=o.length-1;me>=0;--me){let Ce=o[me];if(wer(Ce)){if(ae)throw ae;if(be)throw Error(be)}else Ce(be,ae,n)}else{if(t.getExitProcess()&&aT(!0),!p){p=!0,u&&(t.showHelp("error"),H.error()),(be||ae)&&H.error(be||ae);let me=s||c;me&&((be||ae)&&H.error(""),H.error(me))}if(ae=ae||new cp(be),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,ae);throw ae}};let f=[],h=!1;n.usage=(ne,be)=>ne===null?(h=!0,f=[],n):(h=!1,f.push([ne,be||""]),n),n.getUsage=()=>f,n.getUsageDisabled=()=>h,n.getPositionalGroupName=()=>r("Positionals:");let g=[];n.example=(ne,be)=>{g.push([ne,be||""])};let y=[];n.command=function(be,ae,H,me,Ce=!1){H&&(y=y.map(Te=>(Te[2]=!1,Te))),y.push([be,ae||"",H,me,Ce])},n.getCommands=()=>y;let b={};n.describe=function(be,ae){Array.isArray(be)?be.forEach(H=>{n.describe(H,ae)}):typeof be=="object"?Object.keys(be).forEach(H=>{n.describe(H,be[H])}):b[be]=ae},n.getDescriptions=()=>b;let A=[];n.epilog=ne=>{A.push(ne)};let I=!1,S;n.wrap=ne=>{I=!0,S=ne},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(I||(S=xe(),I=!0),S);let k="__yargsString__:";n.deferY18nLookup=ne=>k+ne,n.help=function(){if(Q)return Q;M();let be=t.customScriptName?t.$0:e.path.basename(t.$0),ae=t.getDemandedOptions(),H=t.getDemandedCommands(),me=t.getDeprecatedOptions(),Ce=t.getGroups(),Te=t.getOptions(),ze=[];ze=ze.concat(Object.keys(b)),ze=ze.concat(Object.keys(ae)),ze=ze.concat(Object.keys(H)),ze=ze.concat(Object.keys(Te.default)),ze=ze.filter(re),ze=Object.keys(ze.reduce((ft,gt)=>(gt!=="_"&&(ft[gt]=!0),ft),{}));let kt=n.getWrap(),Tt=e.cliui({width:kt,wrap:!!kt});if(!h){if(f.length)f.forEach(ft=>{Tt.div({text:`${ft[0].replace(/\$0/g,be)}`}),ft[1]&&Tt.div({text:`${ft[1]}`,padding:[1,0,0,0]})}),Tt.div();else if(y.length){let ft=null;H._?ft=`${be} <${r("command")}>
|
|
567
|
+
`),o+=t.charAt(s);return r&&n&&(o=`${r}${o}${n}`),o}function Ape(t){return gje(t,{stringWidth:e=>[...e].length,stripAnsi:gpe,wrap:yje})}var HL=require("path"),FW=require("fs");function vje(t,e){let r=(0,HL.resolve)(".",t),n;for((0,FW.statSync)(r).isDirectory()||(r=(0,HL.dirname)(r));;){if(n=e(r,(0,FW.readdirSync)(r)),n)return(0,HL.resolve)(r,n);if(r=(0,HL.dirname)(n=r),n===r)break}}var Cje=require("util"),Ije=require("fs"),kje=require("url");var w1=require("path");var VL=require("fs"),xje=require("util"),bje=require("path"),Eje={fs:{readFileSync:VL.readFileSync,writeFile:VL.writeFile},format:xje.format,resolve:bje.resolve,exists:t=>{try{return(0,VL.statSync)(t).isFile()}catch{return!1}}};var E1,ype=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),E1.format.apply(E1.format,[this.cache[this.locale][r]||r].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),r=e.shift(),n=e.shift(),o=e.shift(),s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let c=o===1?r:n;this.cache[this.locale][r]&&(c=this.cache[this.locale][r][o===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let u=[c];return~c.indexOf("%d")&&u.push(o),E1.format.apply(E1.format,u.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.cache[this.locale][r]=e[r])}_taggedLiteral(e,...r){let n="";return e.forEach(function(o,s){let c=r[s+1];n+=o,typeof c<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,r=this.writeQueue[0],n=r.directory,o=r.locale,s=r.cb,c=this._resolveLocaleFile(n,o),u=JSON.stringify(this.cache[o],null,2);E1.fs.writeFile(c,u,"utf-8",function(p){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(p)})}_readLocaleFile(){let e={},r=this._resolveLocaleFile(this.directory,this.locale);try{E1.fs.readFileSync&&(e=JSON.parse(E1.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,r){let n=E1.resolve(e,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let o=E1.resolve(e,"./",r.split("_")[0]+".json");this._fileExistsSync(o)&&(n=o)}return n}_fileExistsSync(e){return E1.exists(e)}};function wje(t,e){E1=e;let r=new ype(t);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var mer=t=>wje(t,Eje),_je=mer;var ger="require is not supported by ESM",Sje="loading a directory of commands is not supported yet for ESM",Dq;try{Dq=(0,kje.fileURLToPath)("file:///data/__qci/root-workspaces/__qci-pipeline-11188016-1/packages/tef-cli/edgeone-dist/cli.js")}catch{Dq=process.cwd()}var Aer=Dq.substring(0,Dq.lastIndexOf("node_modules")),vpe={assert:{notStrictEqual:LW.notStrictEqual,strictEqual:LW.strictEqual},cliui:Ape,findUp:vje,getEnv:t=>process.env[t],inspect:Cje.inspect,getCallerFile:()=>{throw new cp(Sje)},getProcessArgvBin:aje,mainFilename:Aer||process.cwd(),Parser:hpe,path:{basename:w1.basename,dirname:w1.dirname,extname:w1.extname,relative:w1.relative,resolve:w1.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(t,e)=>process.emitWarning(t,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Ije.readFileSync,require:()=>{throw new cp(ger)},requireDirectory:()=>{throw new cp(Sje)},stringWidth:t=>[...t].length,y18n:_je({directory:(0,w1.resolve)(Dq,"../../../locales"),updateFiles:!1})};function uA(t,e,r,n){r.assert.notStrictEqual(t,e,n)}function xpe(t,e){e.assert.strictEqual(typeof t,"string")}function WL(t){return Object.keys(t)}function up(t){return!!t&&!!t.then&&typeof t.then=="function"}function sT(t){let r=t.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,o=r.shift();if(!o)throw new Error(`No command found in: ${t}`);let s={cmd:o.replace(n,""),demanded:[],optional:[]};return r.forEach((c,u)=>{let p=!1;c=c.replace(/\s/g,""),/\.+[\]>]/.test(c)&&u===r.length-1&&(p=!0),/^\[/.test(c)?s.optional.push({cmd:c.replace(n,"").split("|"),variadic:p}):s.demanded.push({cmd:c.replace(n,"").split("|"),variadic:p})}),s}var yer=["first","second","third","fourth","fifth","sixth"];function Qi(t,e,r){function n(){return typeof t=="object"?[{demanded:[],optional:[]},t,e]:[sT(`cmd ${t}`),e,r]}try{let o=0,[s,c,u]=n(),p=[].slice.call(c);for(;p.length&&p[p.length-1]===void 0;)p.pop();let f=u||p.length;if(f<s.demanded.length)throw new cp(`Not enough arguments provided. Expected ${s.demanded.length} but received ${p.length}.`);let h=s.demanded.length+s.optional.length;if(f>h)throw new cp(`Too many arguments provided. Expected max ${h} but received ${f}.`);s.demanded.forEach(g=>{let y=p.shift(),b=Tje(y);g.cmd.filter(I=>I===b||I==="*").length===0&&Bje(b,g.cmd,o),o+=1}),s.optional.forEach(g=>{if(p.length===0)return;let y=p.shift(),b=Tje(y);g.cmd.filter(I=>I===b||I==="*").length===0&&Bje(b,g.cmd,o),o+=1})}catch(o){console.warn(o.stack)}}function Tje(t){return Array.isArray(t)?"array":t===null?"null":typeof t}function Bje(t,e,r){throw new cp(`Invalid ${yer[r]||"manyith"} argument. Expected ${e.join(" or ")} but received ${t}.`)}var jW=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,r,n=!0,o=!1){if(Qi("<array|function> [boolean] [boolean] [boolean]",[e,r,n],arguments.length),Array.isArray(e)){for(let s=0;s<e.length;s++){if(typeof e[s]!="function")throw Error("middleware must be a function");let c=e[s];c.applyBeforeValidation=r,c.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let s=e;s.applyBeforeValidation=r,s.global=n,s.mutates=o,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(o=>{let s=[...n[r]||[],r];return o.option?!s.includes(o.option):!0}),e.option=r,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function Dje(t){return t?t.map(e=>(e.applyBeforeValidation=!1,e)):[]}function FP(t,e,r,n){return r.reduce((o,s)=>{if(s.applyBeforeValidation!==n)return o;if(s.mutates){if(s.applied)return o;s.applied=!0}if(up(o))return o.then(c=>Promise.all([c,s(c,e)])).then(([c,u])=>Object.assign(c,u));{let c=s(o,e);return up(c)?c.then(u=>Object.assign(o,u)):Object.assign(o,c)}},t)}function LP(t,e,r=n=>{throw n}){try{let n=ver(t)?t():t;return up(n)?n.then(o=>e(o)):e(n)}catch(n){return r(n)}}function ver(t){return typeof t=="function"}function bpe(t){if(typeof require>"u")return null;for(let e=0,r=Object.keys(require.cache),n;e<r.length;e++)if(n=require.cache[r[e]],n.exports===t)return n;return null}var YL=/(^\*)|(^\$0)/,Epe=class{constructor(e,r,n,o){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=o,this.usage=e,this.globalMiddleware=n,this.validation=r}addDirectory(e,r,n,o){o=o||{},typeof o.recurse!="boolean"&&(o.recurse=!1),Array.isArray(o.extensions)||(o.extensions=["js"]);let s=typeof o.visit=="function"?o.visit:c=>c;o.visit=(c,u,p)=>{let f=s(c,u,p);if(f){if(this.requireCache.has(u))return f;this.requireCache.add(u),this.addHandler(f)}return f},this.shim.requireDirectory({require:r,filename:n},e,o)}addHandler(e,r,n,o,s,c){let u=[],p=Dje(s);if(o=o||(()=>{}),Array.isArray(e))if(xer(e))[e,...u]=e;else for(let f of e)this.addHandler(f);else if(Eer(e)){let f=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(f=[].concat(f).concat(e.aliases)),this.addHandler(f,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(Pje(n)){this.addHandler([e].concat(u),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let f=sT(e);u=u.map(y=>sT(y).cmd);let h=!1,g=[f.cmd].concat(u).filter(y=>YL.test(y)?(h=!0,!1):!0);g.length===0&&h&&g.push("$0"),h&&(f.cmd=g[0],u=g.slice(1),e=e.replace(YL,f.cmd)),u.forEach(y=>{this.aliasMap[y]=f.cmd}),r!==!1&&this.usage.command(e,r,h,u,c),this.handlers[f.cmd]={original:e,description:r,handler:o,builder:n||{},middlewares:p,deprecated:c,demanded:f.demanded,optional:f.optional},h&&(this.defaultCommand=this.handlers[f.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,r,n,o,s,c){let u=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,p=r.getInternalMethods().getContext(),f=p.commands.slice(),h=!e;e&&(p.commands.push(e),p.fullCommands.push(u.original));let g=this.applyBuilderUpdateUsageAndParse(h,u,r,n.aliases,f,o,s,c);return up(g)?g.then(y=>this.applyMiddlewareAndGetResult(h,u,y.innerArgv,p,s,y.aliases,r)):this.applyMiddlewareAndGetResult(h,u,g.innerArgv,p,s,g.aliases,r)}applyBuilderUpdateUsageAndParse(e,r,n,o,s,c,u,p){let f=r.builder,h=n;if(MW(f)){n.getInternalMethods().getUsageInstance().freeze();let g=f(n.getInternalMethods().reset(o),p);if(up(g))return g.then(y=>(h=Oje(y)?y:n,this.parseAndUpdateUsage(e,r,h,s,c,u)))}else ber(f)&&(n.getInternalMethods().getUsageInstance().freeze(),h=n.getInternalMethods().reset(o),Object.keys(r.builder).forEach(g=>{h.option(g,f[g])}));return this.parseAndUpdateUsage(e,r,h,s,c,u)}parseAndUpdateUsage(e,r,n,o,s,c){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(o,r),r.description);let u=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,c);return up(u)?u.then(p=>({aliases:n.parsed.aliases,innerArgv:p})):{aliases:n.parsed.aliases,innerArgv:u}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,r){let n=YL.test(r.original)?r.original.replace(YL,"").trim():r.original,o=e.filter(s=>!YL.test(s));return o.push(n),`$0 ${o.join(" ")}`}handleValidationAndGetResult(e,r,n,o,s,c,u,p){if(!c.getInternalMethods().getHasOutput()){let f=c.getInternalMethods().runValidation(s,p,c.parsed.error,e);n=LP(n,h=>(f(h),h))}if(r.handler&&!c.getInternalMethods().getHasOutput()){c.getInternalMethods().setHasOutput();let f=!!c.getOptions().configuration["populate--"];c.getInternalMethods().postProcess(n,f,!1,!1),n=FP(n,c,u,!1),n=LP(n,h=>{let g=r.handler(h);return up(g)?g.then(()=>h):h}),e||c.getInternalMethods().getUsageInstance().cacheHelpMessage(),up(n)&&!c.getInternalMethods().hasParseCallback()&&n.catch(h=>{try{c.getInternalMethods().getUsageInstance().fail(null,h)}catch{}})}return e||(o.commands.pop(),o.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,r,n,o,s,c,u){let p={};if(s)return n;u.getInternalMethods().getHasOutput()||(p=this.populatePositionals(r,n,o,u));let f=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),h=FP(n,u,f,!0);return up(h)?h.then(g=>this.handleValidationAndGetResult(e,r,g,o,c,u,f,p)):this.handleValidationAndGetResult(e,r,h,o,c,u,f,p)}populatePositionals(e,r,n,o){r._=r._.slice(n.commands.length);let s=e.demanded.slice(0),c=e.optional.slice(0),u={};for(this.validation.positionalCount(s.length,r._.length);s.length;){let p=s.shift();this.populatePositional(p,r,u)}for(;c.length;){let p=c.shift();this.populatePositional(p,r,u)}return r._=n.commands.concat(r._.map(p=>""+p)),this.postProcessPositionals(r,u,this.cmdToParseOptions(e.original),o),u}populatePositional(e,r,n){let o=e.cmd[0];e.variadic?n[o]=r._.splice(0).map(String):r._.length&&(n[o]=[String(r._.shift())])}cmdToParseOptions(e){let r={array:[],default:{},alias:{},demand:{}},n=sT(e);return n.demanded.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c,r.demand[s]=!0}),n.optional.forEach(o=>{let[s,...c]=o.cmd;o.variadic&&(r.array.push(s),r.default[s]=[]),r.alias[s]=c}),r}postProcessPositionals(e,r,n,o){let s=Object.assign({},o.getOptions());s.default=Object.assign(n.default,s.default);for(let f of Object.keys(n.alias))s.alias[f]=(s.alias[f]||[]).concat(n.alias[f]);s.array=s.array.concat(n.array),s.config={};let c=[];if(Object.keys(r).forEach(f=>{r[f].map(h=>{s.configuration["unknown-options-as-args"]&&(s.key[f]=!0),c.push(`--${f}`),c.push(h)})}),!c.length)return;let u=Object.assign({},s.configuration,{"populate--":!1}),p=this.shim.Parser.detailed(c,Object.assign({},s,{configuration:u}));if(p.error)o.getInternalMethods().getUsageInstance().fail(p.error.message,p.error);else{let f=Object.keys(r);Object.keys(r).forEach(h=>{f.push(...p.aliases[h])}),Object.keys(p.argv).forEach(h=>{f.includes(h)&&(r[h]||(r[h]=p.argv[h]),!this.isInConfigs(o,h)&&!this.isDefaulted(o,h)&&Object.prototype.hasOwnProperty.call(e,h)&&Object.prototype.hasOwnProperty.call(p.argv,h)&&(Array.isArray(e[h])||Array.isArray(p.argv[h]))?e[h]=[].concat(e[h],p.argv[h]):e[h]=p.argv[h])})}}isDefaulted(e,r){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(e,r){let{configObjects:n}=e.getOptions();return n.some(o=>Object.prototype.hasOwnProperty.call(o,r))||n.some(o=>Object.prototype.hasOwnProperty.call(o,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=YL.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(MW(r))return r(e,!0);Pje(r)||Object.keys(r).forEach(n=>{e.option(n,r[n])})}moduleName(e){let r=bpe(e);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(r.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:r,desc:n}){for(let o of[e,r,n]){if(typeof o=="string"||o===!1)return o;uA(o,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();uA(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function Rje(t,e,r,n){return new Epe(t,e,r,n)}function Pje(t){return typeof t=="object"&&!!t.builder&&typeof t.handler=="function"}function xer(t){return t.every(e=>typeof e=="string")}function MW(t){return typeof t=="function"}function ber(t){return typeof t=="object"}function Eer(t){return typeof t=="object"&&!Array.isArray(t)}function oT(t={},e=()=>!0){let r={};return WL(t).forEach(n=>{e(n,t[n])&&(r[n]=t[n])}),r}function aT(t){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let r=e;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(t)})}function wer(t){return typeof t=="boolean"}function Fje(t,e){let r=e.y18n.__,n={},o=[];n.failFn=function(be){o.push(be)};let s=null,c=null,u=!0;n.showHelpOnFail=function(be=!0,ae){let[H,me]=typeof be=="string"?[!0,be]:[be,ae];return t.getInternalMethods().isGlobalContext()&&(c=me),s=me,u=H,n};let p=!1;n.fail=function(be,ae){let H=t.getInternalMethods().getLoggerInstance();if(o.length)for(let me=o.length-1;me>=0;--me){let Ce=o[me];if(wer(Ce)){if(ae)throw ae;if(be)throw Error(be)}else Ce(be,ae,n)}else{if(t.getExitProcess()&&aT(!0),!p){p=!0,u&&(t.showHelp("error"),H.error()),(be||ae)&&H.error(be||ae);let me=s||c;me&&((be||ae)&&H.error(""),H.error(me))}if(ae=ae||new cp(be),t.getExitProcess())return t.exit(1);if(t.getInternalMethods().hasParseCallback())return t.exit(1,ae);throw ae}};let f=[],h=!1;n.usage=(ne,be)=>ne===null?(h=!0,f=[],n):(h=!1,f.push([ne,be||""]),n),n.getUsage=()=>f,n.getUsageDisabled=()=>h,n.getPositionalGroupName=()=>r("Positionals:");let g=[];n.example=(ne,be)=>{g.push([ne,be||""])};let y=[];n.command=function(be,ae,H,me,Ce=!1){H&&(y=y.map(Te=>(Te[2]=!1,Te))),y.push([be,ae||"",H,me,Ce])},n.getCommands=()=>y;let b={};n.describe=function(be,ae){Array.isArray(be)?be.forEach(H=>{n.describe(H,ae)}):typeof be=="object"?Object.keys(be).forEach(H=>{n.describe(H,be[H])}):b[be]=ae},n.getDescriptions=()=>b;let A=[];n.epilog=ne=>{A.push(ne)};let I=!1,S;n.wrap=ne=>{I=!0,S=ne},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(I||(S=xe(),I=!0),S);let k="__yargsString__:";n.deferY18nLookup=ne=>k+ne,n.help=function(){if(Q)return Q;M();let be=t.customScriptName?t.$0:e.path.basename(t.$0),ae=t.getDemandedOptions(),H=t.getDemandedCommands(),me=t.getDeprecatedOptions(),Ce=t.getGroups(),Te=t.getOptions(),ze=[];ze=ze.concat(Object.keys(b)),ze=ze.concat(Object.keys(ae)),ze=ze.concat(Object.keys(H)),ze=ze.concat(Object.keys(Te.default)),ze=ze.filter(re),ze=Object.keys(ze.reduce((ft,gt)=>(gt!=="_"&&(ft[gt]=!0),ft),{}));let kt=n.getWrap(),Tt=e.cliui({width:kt,wrap:!!kt});if(!h){if(f.length)f.forEach(ft=>{Tt.div({text:`${ft[0].replace(/\$0/g,be)}`}),ft[1]&&Tt.div({text:`${ft[1]}`,padding:[1,0,0,0]})}),Tt.div();else if(y.length){let ft=null;H._?ft=`${be} <${r("command")}>
|
|
568
568
|
`:ft=`${be} [${r("command")}]
|
|
569
569
|
`,Tt.div(`${ft}`)}}if(y.length>1||y.length===1&&!y[0][2]){Tt.div(r("Commands:"));let ft=t.getInternalMethods().getContext(),gt=ft.commands.length?`${ft.commands.join(" ")} `:"";t.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(y=y.sort((jr,dr)=>jr[0].localeCompare(dr[0])));let Gt=be?`${be} `:"";y.forEach(jr=>{let dr=`${Gt}${gt}${jr[0].replace(/^\$0 ?/,"")}`;Tt.span({text:dr,padding:[0,2,0,2],width:R(y,kt,`${be}${gt}`)+4},{text:jr[1]});let sr=[];jr[2]&&sr.push(`[${r("default")}]`),jr[3]&&jr[3].length&&sr.push(`[${r("aliases:")} ${jr[3].join(", ")}]`),jr[4]&&(typeof jr[4]=="string"?sr.push(`[${r("deprecated: %s",jr[4])}]`):sr.push(`[${r("deprecated")}]`)),sr.length?Tt.div({text:sr.join(" "),padding:[0,0,0,2],align:"right"}):Tt.div()}),Tt.div()}let ut=(Object.keys(Te.alias)||[]).concat(Object.keys(t.parsed.newAliases)||[]);ze=ze.filter(ft=>!t.parsed.newAliases[ft]&&ut.every(gt=>(Te.alias[gt]||[]).indexOf(ft)===-1));let qe=r("Options:");Ce[qe]||(Ce[qe]=[]),V(ze,Te.alias,Ce,qe);let Ke=ft=>/^--/.test(QW(ft)),rt=Object.keys(Ce).filter(ft=>Ce[ft].length>0).map(ft=>{let gt=Ce[ft].filter(re).map(Gt=>{if(ut.includes(Gt))return Gt;for(let jr=0,dr;(dr=ut[jr])!==void 0;jr++)if((Te.alias[dr]||[]).includes(Gt))return dr;return Gt});return{groupName:ft,normalizedKeys:gt}}).filter(({normalizedKeys:ft})=>ft.length>0).map(({groupName:ft,normalizedKeys:gt})=>{let Gt=gt.reduce((jr,dr)=>(jr[dr]=[dr].concat(Te.alias[dr]||[]).map(sr=>ft===n.getPositionalGroupName()?sr:(/^[0-9]$/.test(sr)?Te.boolean.includes(dr)?"-":"--":sr.length>1?"--":"-")+sr).sort((sr,O)=>Ke(sr)===Ke(O)?0:Ke(sr)?1:-1).join(", "),jr),{});return{groupName:ft,normalizedKeys:gt,switches:Gt}});if(rt.filter(({groupName:ft})=>ft!==n.getPositionalGroupName()).some(({normalizedKeys:ft,switches:gt})=>!ft.every(Gt=>Ke(gt[Gt])))&&rt.filter(({groupName:ft})=>ft!==n.getPositionalGroupName()).forEach(({normalizedKeys:ft,switches:gt})=>{ft.forEach(Gt=>{Ke(gt[Gt])&&(gt[Gt]=_er(gt[Gt],4))})}),rt.forEach(({groupName:ft,normalizedKeys:gt,switches:Gt})=>{Tt.div(ft),gt.forEach(jr=>{let dr=Gt[jr],sr=b[jr]||"",O=null;sr.includes(k)&&(sr=r(sr.substring(k.length))),Te.boolean.includes(jr)&&(O=`[${r("boolean")}]`),Te.count.includes(jr)&&(O=`[${r("count")}]`),Te.string.includes(jr)&&(O=`[${r("string")}]`),Te.normalize.includes(jr)&&(O=`[${r("string")}]`),Te.array.includes(jr)&&(O=`[${r("array")}]`),Te.number.includes(jr)&&(O=`[${r("number")}]`);let We=Ie=>typeof Ie=="string"?`[${r("deprecated: %s",Ie)}]`:`[${r("deprecated")}]`,Ze=[jr in me?We(me[jr]):null,O,jr in ae?`[${r("required")}]`:null,Te.choices&&Te.choices[jr]?`[${r("choices:")} ${n.stringifiedValues(Te.choices[jr])}]`:null,X(Te.default[jr],Te.defaultDescription[jr])].filter(Boolean).join(" ");Tt.span({text:QW(dr),padding:[0,2,0,2+Nje(dr)],width:R(Gt,kt)+4},sr);let Be=t.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;Ze&&!Be?Tt.div({text:Ze,padding:[0,0,0,2],align:"right"}):Tt.div()}),Tt.div()}),g.length&&(Tt.div(r("Examples:")),g.forEach(ft=>{ft[0]=ft[0].replace(/\$0/g,be)}),g.forEach(ft=>{ft[1]===""?Tt.div({text:ft[0],padding:[0,2,0,2]}):Tt.div({text:ft[0],padding:[0,2,0,2],width:R(g,kt)+4},{text:ft[1]})}),Tt.div()),A.length>0){let ft=A.map(gt=>gt.replace(/\$0/g,be)).join(`
|
|
570
570
|
`);Tt.div(`${ft}
|
|
@@ -622,9 +622,9 @@ ${A.join(`
|
|
|
622
622
|
`;y.forEach(A=>{b+=A}),e.fail(b)}};let p={};s.conflicts=function(g,y){Qi("<string|object> [array|string]",[g,y],arguments.length),typeof g=="object"?Object.keys(g).forEach(b=>{s.conflicts(b,g[b])}):(t.global(g),p[g]||(p[g]=[]),Array.isArray(y)?y.forEach(b=>s.conflicts(g,b)):p[g].push(y))},s.getConflicting=()=>p,s.conflicting=function(g){Object.keys(g).forEach(y=>{p[y]&&p[y].forEach(b=>{b&&g[y]!==void 0&&g[b]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",y,b))})}),t.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(p).forEach(y=>{p[y].forEach(b=>{b&&g[r.Parser.camelCase(y)]!==void 0&&g[r.Parser.camelCase(b)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",y,b))})})},s.recommendCommands=function(g,y){y=y.sort((S,k)=>k.length-S.length);let A=null,I=1/0;for(let S=0,k;(k=y[S])!==void 0;S++){let R=Qje(g,k);R<=3&&R<I&&(I=R,A=k)}A&&e.fail(n("Did you mean %s?",A))},s.reset=function(g){return c=oT(c,y=>!g[y]),p=oT(p,y=>!g[y]),s};let f=[];return s.freeze=function(){f.push({implied:c,conflicting:p})},s.unfreeze=function(){let g=f.pop();uA(g,void 0,r),{implied:c,conflicting:p}=g},s}var $i=function(t,e,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(t,r):o?o.value=r:e.set(t,r),r},pt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ud,jP,Pq,Sb,fx,qW,cT,MP,UW,Cb,zW,Ib,L_,dx,kb,$W,JL,am,As,HW,VW,hx,QP,KL,qP,uT,GW,Ao,UP,zP,$P,Ro,WW,j_,Qf;function cMe(t){return(e=[],r=t.process.cwd(),n)=>{let o=new Npe(e,r,n,t);return Object.defineProperty(o,"argv",{get:()=>o.parse(),enumerable:!0}),o.help(),o.version(),o}}var zje=Symbol("copyDoubleDash"),$je=Symbol("copyDoubleDash"),Spe=Symbol("deleteFromParserHintObject"),Hje=Symbol("emitWarning"),Vje=Symbol("freeze"),Gje=Symbol("getDollarZero"),HP=Symbol("getParserConfiguration"),Wje=Symbol("getUsageConfiguration"),Cpe=Symbol("guessLocale"),Yje=Symbol("guessVersion"),Jje=Symbol("parsePositionalNumbers"),Ipe=Symbol("pkgUp"),lT=Symbol("populateParserHintArray"),XL=Symbol("populateParserHintSingleValueDictionary"),kpe=Symbol("populateParserHintArrayDictionary"),Tpe=Symbol("populateParserHintDictionary"),Bpe=Symbol("sanitizeKey"),Dpe=Symbol("setKey"),Ppe=Symbol("unfreeze"),Kje=Symbol("validateAsync"),Xje=Symbol("getCommandInstance"),Zje=Symbol("getContext"),eMe=Symbol("getHasOutput"),tMe=Symbol("getLoggerInstance"),rMe=Symbol("getParseContext"),nMe=Symbol("getUsageInstance"),iMe=Symbol("getValidationInstance"),YW=Symbol("hasParseCallback"),sMe=Symbol("isGlobalContext"),VP=Symbol("postProcess"),oMe=Symbol("rebase"),Rpe=Symbol("reset"),Rq=Symbol("runYargsParserAndExecuteCommands"),Ope=Symbol("runValidation"),aMe=Symbol("setHasOutput"),GP=Symbol("kTrackManuallySetKeys"),Npe=class{constructor(e=[],r,n,o){this.customScriptName=!1,this.parsed=!1,ud.set(this,void 0),jP.set(this,void 0),Pq.set(this,{commands:[],fullCommands:[]}),Sb.set(this,null),fx.set(this,null),qW.set(this,"show-hidden"),cT.set(this,null),MP.set(this,!0),UW.set(this,{}),Cb.set(this,!0),zW.set(this,[]),Ib.set(this,void 0),L_.set(this,{}),dx.set(this,!1),kb.set(this,null),$W.set(this,!0),JL.set(this,void 0),am.set(this,""),As.set(this,void 0),HW.set(this,void 0),VW.set(this,{}),hx.set(this,null),QP.set(this,null),KL.set(this,{}),qP.set(this,{}),uT.set(this,void 0),GW.set(this,!1),Ao.set(this,void 0),UP.set(this,!1),zP.set(this,!1),$P.set(this,!1),Ro.set(this,void 0),WW.set(this,{}),j_.set(this,null),Qf.set(this,void 0),$i(this,Ao,o,"f"),$i(this,uT,e,"f"),$i(this,jP,r,"f"),$i(this,HW,n,"f"),$i(this,Ib,new jW(this),"f"),this.$0=this[Gje](),this[Rpe](),$i(this,ud,pt(this,ud,"f"),"f"),$i(this,Ro,pt(this,Ro,"f"),"f"),$i(this,Qf,pt(this,Qf,"f"),"f"),$i(this,As,pt(this,As,"f"),"f"),pt(this,As,"f").showHiddenOpt=pt(this,qW,"f"),$i(this,JL,this[$je](),"f")}addHelpOpt(e,r){let n="help";return Qi("[string|boolean] [string]",[e,r],arguments.length),pt(this,kb,"f")&&(this[Spe](pt(this,kb,"f")),$i(this,kb,null,"f")),e===!1&&r===void 0?this:($i(this,kb,typeof e=="string"?e:n,"f"),this.boolean(pt(this,kb,"f")),this.describe(pt(this,kb,"f"),r||pt(this,Ro,"f").deferY18nLookup("Show help")),this)}help(e,r){return this.addHelpOpt(e,r)}addShowHiddenOpt(e,r){if(Qi("[string|boolean] [string]",[e,r],arguments.length),e===!1&&r===void 0)return this;let n=typeof e=="string"?e:pt(this,qW,"f");return this.boolean(n),this.describe(n,r||pt(this,Ro,"f").deferY18nLookup("Show hidden options")),pt(this,As,"f").showHiddenOpt=n,this}showHidden(e,r){return this.addShowHiddenOpt(e,r)}alias(e,r){return Qi("<object|string|array> [string|array]",[e,r],arguments.length),this[kpe](this.alias.bind(this),"alias",e,r),this}array(e){return Qi("<array|string>",[e],arguments.length),this[lT]("array",e),this[GP](e),this}boolean(e){return Qi("<array|string>",[e],arguments.length),this[lT]("boolean",e),this[GP](e),this}check(e,r){return Qi("<function> [boolean]",[e,r],arguments.length),this.middleware((n,o)=>LP(()=>e(n,o.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&pt(this,Ro,"f").fail(s.toString(),s):pt(this,Ro,"f").fail(pt(this,Ao,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(pt(this,Ro,"f").fail(s.message?s.message:s.toString(),s),n)),!1,r),this}choices(e,r){return Qi("<object|string|array> [string|array]",[e,r],arguments.length),this[kpe](this.choices.bind(this),"choices",e,r),this}coerce(e,r){if(Qi("<object|string|array> [function]",[e,r],arguments.length),Array.isArray(e)){if(!r)throw new cp("coerce callback must be provided");for(let n of e)this.coerce(n,r);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!r)throw new cp("coerce callback must be provided");return pt(this,As,"f").key[e]=!0,pt(this,Ib,"f").addCoerceMiddleware((n,o)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?LP(()=>(s=o.getAliases(),r(n[e])),u=>{n[e]=u;let p=o.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&p!==!0)for(let f of s[e])n[f]=u;return n},u=>{throw new cp(u.message)}):n},e),this}conflicts(e,r){return Qi("<string|object> [string|array]",[e,r],arguments.length),pt(this,Qf,"f").conflicts(e,r),this}config(e="config",r,n){return Qi("[object|string] [string|function] [function]",[e,r,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=Tq(e,pt(this,jP,"f"),this[HP]()["deep-merge-config"]||!1,pt(this,Ao,"f")),pt(this,As,"f").configObjects=(pt(this,As,"f").configObjects||[]).concat(e),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(e,r||pt(this,Ro,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(o=>{pt(this,As,"f").config[o]=n||!0}),this)}completion(e,r,n){return Qi("[string] [string|boolean|function] [function]",[e,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),$i(this,fx,e||pt(this,fx,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(pt(this,fx,"f"),r),n&&pt(this,Sb,"f").registerFunction(n),this}command(e,r,n,o,s,c){return Qi("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,r,n,o,s,c],arguments.length),pt(this,ud,"f").addHandler(e,r,n,o,s,c),this}commands(e,r,n,o,s,c){return this.command(e,r,n,o,s,c)}commandDir(e,r){Qi("<string> [object]",[e,r],arguments.length);let n=pt(this,HW,"f")||pt(this,Ao,"f").require;return pt(this,ud,"f").addDirectory(e,n,pt(this,Ao,"f").getCallerFile(),r),this}count(e){return Qi("<array|string>",[e],arguments.length),this[lT]("count",e),this[GP](e),this}default(e,r,n){return Qi("<object|string|array> [*] [string]",[e,r,n],arguments.length),n&&(xpe(e,pt(this,Ao,"f")),pt(this,As,"f").defaultDescription[e]=n),typeof r=="function"&&(xpe(e,pt(this,Ao,"f")),pt(this,As,"f").defaultDescription[e]||(pt(this,As,"f").defaultDescription[e]=pt(this,Ro,"f").functionDescription(r)),r=r.call()),this[XL](this.default.bind(this),"default",e,r),this}defaults(e,r,n){return this.default(e,r,n)}demandCommand(e=1,r,n,o){return Qi("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,r,n,o],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),pt(this,As,"f").demandedCommands._={min:e,max:r,minMsg:n,maxMsg:o},this}demand(e,r,n){return Array.isArray(r)?(r.forEach(o=>{uA(n,!0,pt(this,Ao,"f")),this.demandOption(o,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof e=="number"?(uA(n,!0,pt(this,Ao,"f")),this.demandCommand(e,r,n,n)):Array.isArray(e)?e.forEach(o=>{uA(n,!0,pt(this,Ao,"f")),this.demandOption(o,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,r){return Qi("<object|string|array> [string]",[e,r],arguments.length),this[XL](this.demandOption.bind(this),"demandedOptions",e,r),this}deprecateOption(e,r){return Qi("<string> [string|boolean]",[e,r],arguments.length),pt(this,As,"f").deprecatedOptions[e]=r,this}describe(e,r){return Qi("<object|string|array> [string]",[e,r],arguments.length),this[Dpe](e,!0),pt(this,Ro,"f").describe(e,r),this}detectLocale(e){return Qi("<boolean>",[e],arguments.length),$i(this,MP,e,"f"),this}env(e){return Qi("[string|boolean]",[e],arguments.length),e===!1?delete pt(this,As,"f").envPrefix:pt(this,As,"f").envPrefix=e||"",this}epilogue(e){return Qi("<string>",[e],arguments.length),pt(this,Ro,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,r){return Qi("<string|array> [string]",[e,r],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):pt(this,Ro,"f").example(e,r),this}exit(e,r){$i(this,dx,!0,"f"),$i(this,cT,r,"f"),pt(this,Cb,"f")&&pt(this,Ao,"f").process.exit(e)}exitProcess(e=!0){return Qi("[boolean]",[e],arguments.length),$i(this,Cb,e,"f"),this}fail(e){if(Qi("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new cp("Invalid first argument. Expected function or boolean 'false'");return pt(this,Ro,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,r){return Qi("<array> [function]",[e,r],arguments.length),r?pt(this,Sb,"f").getCompletion(e,r):new Promise((n,o)=>{pt(this,Sb,"f").getCompletion(e,(s,c)=>{s?o(s):n(c)})})}getDemandedOptions(){return Qi([],0),pt(this,As,"f").demandedOptions}getDemandedCommands(){return Qi([],0),pt(this,As,"f").demandedCommands}getDeprecatedOptions(){return Qi([],0),pt(this,As,"f").deprecatedOptions}getDetectLocale(){return pt(this,MP,"f")}getExitProcess(){return pt(this,Cb,"f")}getGroups(){return Object.assign({},pt(this,L_,"f"),pt(this,qP,"f"))}getHelp(){if($i(this,dx,!0,"f"),!pt(this,Ro,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[Rq](pt(this,uT,"f"),void 0,void 0,0,!0);if(up(r))return r.then(()=>pt(this,Ro,"f").help())}let e=pt(this,ud,"f").runDefaultBuilderOn(this);if(up(e))return e.then(()=>pt(this,Ro,"f").help())}return Promise.resolve(pt(this,Ro,"f").help())}getOptions(){return pt(this,As,"f")}getStrict(){return pt(this,UP,"f")}getStrictCommands(){return pt(this,zP,"f")}getStrictOptions(){return pt(this,$P,"f")}global(e,r){return Qi("<string|array> [boolean]",[e,r],arguments.length),e=[].concat(e),r!==!1?pt(this,As,"f").local=pt(this,As,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{pt(this,As,"f").local.includes(n)||pt(this,As,"f").local.push(n)}),this}group(e,r){Qi("<string|array> <string>",[e,r],arguments.length);let n=pt(this,qP,"f")[r]||pt(this,L_,"f")[r];pt(this,qP,"f")[r]&&delete pt(this,qP,"f")[r];let o={};return pt(this,L_,"f")[r]=(n||[]).concat(e).filter(s=>o[s]?!1:o[s]=!0),this}hide(e){return Qi("<string>",[e],arguments.length),pt(this,As,"f").hiddenOptions.push(e),this}implies(e,r){return Qi("<string|object> [number|string|array]",[e,r],arguments.length),pt(this,Qf,"f").implies(e,r),this}locale(e){return Qi("[string]",[e],arguments.length),e===void 0?(this[Cpe](),pt(this,Ao,"f").y18n.getLocale()):($i(this,MP,!1,"f"),pt(this,Ao,"f").y18n.setLocale(e),this)}middleware(e,r,n){return pt(this,Ib,"f").addMiddleware(e,!!r,n)}nargs(e,r){return Qi("<string|object|array> [number]",[e,r],arguments.length),this[XL](this.nargs.bind(this),"narg",e,r),this}normalize(e){return Qi("<array|string>",[e],arguments.length),this[lT]("normalize",e),this}number(e){return Qi("<array|string>",[e],arguments.length),this[lT]("number",e),this[GP](e),this}option(e,r){if(Qi("<string|object> [object]",[e,r],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof r!="object"&&(r={}),this[GP](e),pt(this,j_,"f")&&(e==="version"||(r==null?void 0:r.alias)==="version")&&this[Hje](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
623
623
|
`),void 0,"versionWarning"),pt(this,As,"f").key[e]=!0,r.alias&&this.alias(e,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(e,n);let o=r.demand||r.required||r.require;o&&this.demand(e,o),r.demandOption&&this.demandOption(e,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(e,r.conflicts),"default"in r&&this.default(e,r.default),r.implies!==void 0&&this.implies(e,r.implies),r.nargs!==void 0&&this.nargs(e,r.nargs),r.config&&this.config(e,r.configParser),r.normalize&&this.normalize(e),r.choices&&this.choices(e,r.choices),r.coerce&&this.coerce(e,r.coerce),r.group&&this.group(e,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(e),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(e),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(e),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(e),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(e),typeof r.global=="boolean"&&this.global(e,r.global),r.defaultDescription&&(pt(this,As,"f").defaultDescription[e]=r.defaultDescription),r.skipValidation&&this.skipValidation(e);let s=r.describe||r.description||r.desc,c=pt(this,Ro,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(c,e)||typeof s=="string")&&this.describe(e,s),r.hidden&&this.hide(e),r.requiresArg&&this.requiresArg(e)}return this}options(e,r){return this.option(e,r)}parse(e,r,n){Qi("[string|array] [function|boolean|object] [function]",[e,r,n],arguments.length),this[Vje](),typeof e>"u"&&(e=pt(this,uT,"f")),typeof r=="object"&&($i(this,QP,r,"f"),r=n),typeof r=="function"&&($i(this,hx,r,"f"),r=!1),r||$i(this,uT,e,"f"),pt(this,hx,"f")&&$i(this,Cb,!1,"f");let o=this[Rq](e,!!r),s=this.parsed;return pt(this,Sb,"f").setParsed(this.parsed),up(o)?o.then(c=>(pt(this,hx,"f")&&pt(this,hx,"f").call(this,pt(this,cT,"f"),c,pt(this,am,"f")),c)).catch(c=>{throw pt(this,hx,"f")&&pt(this,hx,"f")(c,this.parsed.argv,pt(this,am,"f")),c}).finally(()=>{this[Ppe](),this.parsed=s}):(pt(this,hx,"f")&&pt(this,hx,"f").call(this,pt(this,cT,"f"),o,pt(this,am,"f")),this[Ppe](),this.parsed=s,o)}parseAsync(e,r,n){let o=this.parse(e,r,n);return up(o)?o:Promise.resolve(o)}parseSync(e,r,n){let o=this.parse(e,r,n);if(up(o))throw new cp(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return o}parserConfiguration(e){return Qi("<object>",[e],arguments.length),$i(this,VW,e,"f"),this}pkgConf(e,r){Qi("<string> [string]",[e,r],arguments.length);let n=null,o=this[Ipe](r||pt(this,jP,"f"));return o[e]&&typeof o[e]=="object"&&(n=Tq(o[e],r||pt(this,jP,"f"),this[HP]()["deep-merge-config"]||!1,pt(this,Ao,"f")),pt(this,As,"f").configObjects=(pt(this,As,"f").configObjects||[]).concat(n)),this}positional(e,r){Qi("<string> <object>",[e,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=oT(r,(c,u)=>c==="type"&&!["string","number","boolean"].includes(u)?!1:n.includes(c));let o=pt(this,Pq,"f").fullCommands[pt(this,Pq,"f").fullCommands.length-1],s=o?pt(this,ud,"f").cmdToParseOptions(o):{array:[],alias:{},default:{},demand:{}};return WL(s).forEach(c=>{let u=s[c];Array.isArray(u)?u.indexOf(e)!==-1&&(r[c]=!0):u[e]&&!(c in r)&&(r[c]=u[e])}),this.group(e,pt(this,Ro,"f").getPositionalGroupName()),this.option(e,r)}recommendCommands(e=!0){return Qi("[boolean]",[e],arguments.length),$i(this,GW,e,"f"),this}required(e,r,n){return this.demand(e,r,n)}require(e,r,n){return this.demand(e,r,n)}requiresArg(e){return Qi("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&pt(this,As,"f").narg[e]?this:(this[XL](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,r){return Qi("[string] [string]",[e,r],arguments.length),e=e||this.$0,pt(this,JL,"f").log(pt(this,Sb,"f").generateCompletionScript(e,r||pt(this,fx,"f")||"completion")),this}showHelp(e){if(Qi("[string|function]",[e],arguments.length),$i(this,dx,!0,"f"),!pt(this,Ro,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[Rq](pt(this,uT,"f"),void 0,void 0,0,!0);if(up(n))return n.then(()=>{pt(this,Ro,"f").showHelp(e)}),this}let r=pt(this,ud,"f").runDefaultBuilderOn(this);if(up(r))return r.then(()=>{pt(this,Ro,"f").showHelp(e)}),this}return pt(this,Ro,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,r){return Qi("[boolean|string] [string]",[e,r],arguments.length),pt(this,Ro,"f").showHelpOnFail(e,r),this}showVersion(e){return Qi("[string|function]",[e],arguments.length),pt(this,Ro,"f").showVersion(e),this}skipValidation(e){return Qi("<array|string>",[e],arguments.length),this[lT]("skipValidation",e),this}strict(e){return Qi("[boolean]",[e],arguments.length),$i(this,UP,e!==!1,"f"),this}strictCommands(e){return Qi("[boolean]",[e],arguments.length),$i(this,zP,e!==!1,"f"),this}strictOptions(e){return Qi("[boolean]",[e],arguments.length),$i(this,$P,e!==!1,"f"),this}string(e){return Qi("<array|string>",[e],arguments.length),this[lT]("string",e),this[GP](e),this}terminalWidth(){return Qi([],0),pt(this,Ao,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return Qi("<object>",[e],arguments.length),$i(this,MP,!1,"f"),pt(this,Ao,"f").y18n.updateLocale(e),this}usage(e,r,n,o){if(Qi("<string|null|undefined> [string|boolean] [function|object] [function]",[e,r,n,o],arguments.length),r!==void 0){if(uA(e,null,pt(this,Ao,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,r,n,o);throw new cp(".usage() description must start with $0 if being used as alias for .command()")}else return pt(this,Ro,"f").usage(e),this}usageConfiguration(e){return Qi("<object>",[e],arguments.length),$i(this,WW,e,"f"),this}version(e,r,n){let o="version";if(Qi("[boolean|string] [string] [string]",[e,r,n],arguments.length),pt(this,j_,"f")&&(this[Spe](pt(this,j_,"f")),pt(this,Ro,"f").version(void 0),$i(this,j_,null,"f")),arguments.length===0)n=this[Yje](),e=o;else if(arguments.length===1){if(e===!1)return this;n=e,e=o}else arguments.length===2&&(n=r,r=void 0);return $i(this,j_,typeof e=="string"?e:o,"f"),r=r||pt(this,Ro,"f").deferY18nLookup("Show version number"),pt(this,Ro,"f").version(n||void 0),this.boolean(pt(this,j_,"f")),this.describe(pt(this,j_,"f"),r),this}wrap(e){return Qi("<number|null|undefined>",[e],arguments.length),pt(this,Ro,"f").wrap(e),this}[(ud=new WeakMap,jP=new WeakMap,Pq=new WeakMap,Sb=new WeakMap,fx=new WeakMap,qW=new WeakMap,cT=new WeakMap,MP=new WeakMap,UW=new WeakMap,Cb=new WeakMap,zW=new WeakMap,Ib=new WeakMap,L_=new WeakMap,dx=new WeakMap,kb=new WeakMap,$W=new WeakMap,JL=new WeakMap,am=new WeakMap,As=new WeakMap,HW=new WeakMap,VW=new WeakMap,hx=new WeakMap,QP=new WeakMap,KL=new WeakMap,qP=new WeakMap,uT=new WeakMap,GW=new WeakMap,Ao=new WeakMap,UP=new WeakMap,zP=new WeakMap,$P=new WeakMap,Ro=new WeakMap,WW=new WeakMap,j_=new WeakMap,Qf=new WeakMap,zje)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[$je](){return{log:(...e)=>{this[YW]()||console.log(...e),$i(this,dx,!0,"f"),pt(this,am,"f").length&&$i(this,am,pt(this,am,"f")+`
|
|
624
624
|
`,"f"),$i(this,am,pt(this,am,"f")+e.join(" "),"f")},error:(...e)=>{this[YW]()||console.error(...e),$i(this,dx,!0,"f"),pt(this,am,"f").length&&$i(this,am,pt(this,am,"f")+`
|
|
625
|
-
`,"f"),$i(this,am,pt(this,am,"f")+e.join(" "),"f")}}}[Spe](e){WL(pt(this,As,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=pt(this,As,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete pt(this,Ro,"f").getDescriptions()[e]}[Hje](e,r,n){pt(this,UW,"f")[n]||(pt(this,Ao,"f").process.emitWarning(e,r),pt(this,UW,"f")[n]=!0)}[Vje](){pt(this,zW,"f").push({options:pt(this,As,"f"),configObjects:pt(this,As,"f").configObjects.slice(0),exitProcess:pt(this,Cb,"f"),groups:pt(this,L_,"f"),strict:pt(this,UP,"f"),strictCommands:pt(this,zP,"f"),strictOptions:pt(this,$P,"f"),completionCommand:pt(this,fx,"f"),output:pt(this,am,"f"),exitError:pt(this,cT,"f"),hasOutput:pt(this,dx,"f"),parsed:this.parsed,parseFn:pt(this,hx,"f"),parseContext:pt(this,QP,"f")}),pt(this,Ro,"f").freeze(),pt(this,Qf,"f").freeze(),pt(this,ud,"f").freeze(),pt(this,Ib,"f").freeze()}[Gje](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(pt(this,Ao,"f").process.argv()[0])?r=pt(this,Ao,"f").process.argv().slice(1,2):r=pt(this,Ao,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[oMe](pt(this,jP,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length<n.length?o:n}).join(" ").trim(),pt(this,Ao,"f").getEnv("_")&&pt(this,Ao,"f").getProcessArgvBin()===pt(this,Ao,"f").getEnv("_")&&(e=pt(this,Ao,"f").getEnv("_").replace(`${pt(this,Ao,"f").path.dirname(pt(this,Ao,"f").process.execPath())}/`,"")),e}[HP](){return pt(this,VW,"f")}[Wje](){return pt(this,WW,"f")}[Cpe](){if(!pt(this,MP,"f"))return;let e=pt(this,Ao,"f").getEnv("LC_ALL")||pt(this,Ao,"f").getEnv("LC_MESSAGES")||pt(this,Ao,"f").getEnv("LANG")||pt(this,Ao,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Yje](){return this[Ipe]().version||"unknown"}[Jje](e){let r=e["--"]?e["--"]:e._;for(let n=0,o;(o=r[n])!==void 0;n++)pt(this,Ao,"f").Parser.looksLikeNumber(o)&&Number.isSafeInteger(Math.floor(parseFloat(`${o}`)))&&(r[n]=Number(o));return e}[Ipe](e){let r=e||"*";if(pt(this,KL,"f")[r])return pt(this,KL,"f")[r];let n={};try{let o=e||pt(this,Ao,"f").mainFilename;!e&&pt(this,Ao,"f").path.extname(o)&&(o=pt(this,Ao,"f").path.dirname(o));let s=pt(this,Ao,"f").findUp(o,(c,u)=>{if(u.includes("package.json"))return"package.json"});uA(s,void 0,pt(this,Ao,"f")),n=JSON.parse(pt(this,Ao,"f").readFileSync(s,"utf8"))}catch{}return pt(this,KL,"f")[r]=n||{},pt(this,KL,"f")[r]}[lT](e,r){r=[].concat(r),r.forEach(n=>{n=this[Bpe](n),pt(this,As,"f")[e].push(n)})}[XL](e,r,n,o){this[Tpe](e,r,n,o,(s,c,u)=>{pt(this,As,"f")[s][c]=u})}[kpe](e,r,n,o){this[Tpe](e,r,n,o,(s,c,u)=>{pt(this,As,"f")[s][c]=(pt(this,As,"f")[s][c]||[]).concat(u)})}[Tpe](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of WL(n))e(c,n[c]);else s(r,this[Bpe](n),o)}[Bpe](e){return e==="__proto__"?"___proto___":e}[Dpe](e,r){return this[XL](this[Dpe].bind(this),"key",e,r),this}[Ppe](){var e,r,n,o,s,c,u,p,f,h,g,y;let b=pt(this,zW,"f").pop();uA(b,void 0,pt(this,Ao,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,u=this,p=this,f=this,h=this,g=this,y=this,{options:{set value(I){$i(e,As,I,"f")}}.value,configObjects:A,exitProcess:{set value(I){$i(r,Cb,I,"f")}}.value,groups:{set value(I){$i(n,L_,I,"f")}}.value,output:{set value(I){$i(o,am,I,"f")}}.value,exitError:{set value(I){$i(s,cT,I,"f")}}.value,hasOutput:{set value(I){$i(c,dx,I,"f")}}.value,parsed:this.parsed,strict:{set value(I){$i(u,UP,I,"f")}}.value,strictCommands:{set value(I){$i(p,zP,I,"f")}}.value,strictOptions:{set value(I){$i(f,$P,I,"f")}}.value,completionCommand:{set value(I){$i(h,fx,I,"f")}}.value,parseFn:{set value(I){$i(g,hx,I,"f")}}.value,parseContext:{set value(I){$i(y,QP,I,"f")}}.value}=b,pt(this,As,"f").configObjects=A,pt(this,Ro,"f").unfreeze(),pt(this,Qf,"f").unfreeze(),pt(this,ud,"f").unfreeze(),pt(this,Ib,"f").unfreeze()}[Kje](e,r){return LP(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Xje].bind(this),getContext:this[Zje].bind(this),getHasOutput:this[eMe].bind(this),getLoggerInstance:this[tMe].bind(this),getParseContext:this[rMe].bind(this),getParserConfiguration:this[HP].bind(this),getUsageConfiguration:this[Wje].bind(this),getUsageInstance:this[nMe].bind(this),getValidationInstance:this[iMe].bind(this),hasParseCallback:this[YW].bind(this),isGlobalContext:this[sMe].bind(this),postProcess:this[VP].bind(this),reset:this[Rpe].bind(this),runValidation:this[Ope].bind(this),runYargsParserAndExecuteCommands:this[Rq].bind(this),setHasOutput:this[aMe].bind(this)}}[Xje](){return pt(this,ud,"f")}[Zje](){return pt(this,Pq,"f")}[eMe](){return pt(this,dx,"f")}[tMe](){return pt(this,JL,"f")}[rMe](){return pt(this,QP,"f")||{}}[nMe](){return pt(this,Ro,"f")}[iMe](){return pt(this,Qf,"f")}[YW](){return!!pt(this,hx,"f")}[sMe](){return pt(this,$W,"f")}[VP](e,r,n,o){return n||up(e)||(r||(e=this[zje](e)),(this[HP]()["parse-positional-numbers"]||this[HP]()["parse-positional-numbers"]===void 0)&&(e=this[Jje](e)),o&&(e=FP(e,this,pt(this,Ib,"f").getMiddleware(),!1))),e}[Rpe](e={}){$i(this,As,pt(this,As,"f")||{},"f");let r={};r.local=pt(this,As,"f").local||[],r.configObjects=pt(this,As,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(u=>{n[u]=!0})}),Object.assign(pt(this,qP,"f"),Object.keys(pt(this,L_,"f")).reduce((c,u)=>{let p=pt(this,L_,"f")[u].filter(f=>!(f in n));return p.length>0&&(c[u]=p),c},{})),$i(this,L_,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(pt(this,As,"f")[c]||[]).filter(u=>!n[u])}),s.forEach(c=>{r[c]=oT(pt(this,As,"f")[c],u=>!n[u])}),r.envPrefix=pt(this,As,"f").envPrefix,$i(this,As,r,"f"),$i(this,Ro,pt(this,Ro,"f")?pt(this,Ro,"f").reset(n):Fje(this,pt(this,Ao,"f")),"f"),$i(this,Qf,pt(this,Qf,"f")?pt(this,Qf,"f").reset(n):Uje(this,pt(this,Ro,"f"),pt(this,Ao,"f")),"f"),$i(this,ud,pt(this,ud,"f")?pt(this,ud,"f").reset():Rje(pt(this,Ro,"f"),pt(this,Qf,"f"),pt(this,Ib,"f"),pt(this,Ao,"f")),"f"),pt(this,Sb,"f")||$i(this,Sb,Mje(this,pt(this,Ro,"f"),pt(this,ud,"f"),pt(this,Ao,"f")),"f"),pt(this,Ib,"f").reset(),$i(this,fx,null,"f"),$i(this,am,"","f"),$i(this,cT,null,"f"),$i(this,dx,!1,"f"),this.parsed=!1,this}[oMe](e,r){return pt(this,Ao,"f").path.relative(e,r)}[Rq](e,r,n,o=0,s=!1){let c=!!n||s;e=e||pt(this,uT,"f"),pt(this,As,"f").__=pt(this,Ao,"f").y18n.__,pt(this,As,"f").configuration=this[HP]();let u=!!pt(this,As,"f").configuration["populate--"],p=Object.assign({},pt(this,As,"f").configuration,{"populate--":!0}),f=pt(this,Ao,"f").Parser.detailed(e,Object.assign({},pt(this,As,"f"),{configuration:{"parse-positional-numbers":!1,...p}})),h=Object.assign(f.argv,pt(this,QP,"f")),g,y=f.aliases,b=!1,A=!1;Object.keys(h).forEach(I=>{I===pt(this,kb,"f")&&h[I]?b=!0:I===pt(this,j_,"f")&&h[I]&&(A=!0)}),h.$0=this.$0,this.parsed=f,o===0&&pt(this,Ro,"f").clearCachedHelpMessage();try{if(this[Cpe](),r)return this[VP](h,u,!!n,!1);pt(this,kb,"f")&&[pt(this,kb,"f")].concat(y[pt(this,kb,"f")]||[]).filter(M=>M.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),b=!0),$i(this,$W,!1,"f");let I=pt(this,ud,"f").getCommands(),S=pt(this,Sb,"f").completionKey in h,k=b||S||s;if(h._.length){if(I.length){let R;for(let M=o||0,Q;h._[M]!==void 0;M++)if(Q=String(h._[M]),I.includes(Q)&&Q!==pt(this,fx,"f")){let V=pt(this,ud,"f").runCommand(Q,this,f,M+1,s,b||A||s);return this[VP](V,u,!!n,!1)}else if(!R&&Q!==pt(this,fx,"f")){R=Q;break}!pt(this,ud,"f").hasDefaultCommand()&&pt(this,GW,"f")&&R&&!k&&pt(this,Qf,"f").recommendCommands(R,I)}pt(this,fx,"f")&&h._.includes(pt(this,fx,"f"))&&!S&&(pt(this,Cb,"f")&&aT(!0),this.showCompletionScript(),this.exit(0))}if(pt(this,ud,"f").hasDefaultCommand()&&!k){let R=pt(this,ud,"f").runCommand(null,this,f,0,s,b||A||s);return this[VP](R,u,!!n,!1)}if(S){pt(this,Cb,"f")&&aT(!0),e=[].concat(e);let R=e.slice(e.indexOf(`--${pt(this,Sb,"f").completionKey}`)+1);return pt(this,Sb,"f").getCompletion(R,(M,Q)=>{if(M)throw new cp(M.message);(Q||[]).forEach(V=>{pt(this,JL,"f").log(V)}),this.exit(0)}),this[VP](h,!u,!!n,!1)}if(pt(this,dx,"f")||(b?(pt(this,Cb,"f")&&aT(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(pt(this,Cb,"f")&&aT(!0),c=!0,pt(this,Ro,"f").showVersion("log"),this.exit(0))),!c&&pt(this,As,"f").skipValidation.length>0&&(c=Object.keys(h).some(R=>pt(this,As,"f").skipValidation.indexOf(R)>=0&&h[R]===!0)),!c){if(f.error)throw new cp(f.error.message);if(!S){let R=this[Ope](y,{},f.error);n||(g=FP(h,this,pt(this,Ib,"f").getMiddleware(),!0)),g=this[Kje](R,g!=null?g:h),up(g)&&!n&&(g=g.then(()=>FP(h,this,pt(this,Ib,"f").getMiddleware(),!1)))}}}catch(I){if(I instanceof cp)pt(this,Ro,"f").fail(I.message,I);else throw I}return this[VP](g!=null?g:h,u,!!n,!0)}[Ope](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new cp(n.message);pt(this,Qf,"f").nonOptionCount(c),pt(this,Qf,"f").requiredArguments(c,s);let u=!1;pt(this,zP,"f")&&(u=pt(this,Qf,"f").unknownCommands(c)),pt(this,UP,"f")&&!u?pt(this,Qf,"f").unknownArguments(c,e,r,!!o):pt(this,$P,"f")&&pt(this,Qf,"f").unknownArguments(c,e,{},!1,!1),pt(this,Qf,"f").limitedChoices(c),pt(this,Qf,"f").implications(c),pt(this,Qf,"f").conflicting(c)}}[aMe](){$i(this,dx,!0,"f")}[GP](e){if(typeof e=="string")pt(this,As,"f").key[e]=!0;else for(let r of e)pt(this,As,"f").key[r]=!0}};function Oje(t){return!!t&&typeof t.getInternalMethods=="function"}var ker=cMe(vpe),uMe=ker;var _1={name:"edgeone",version:"1.6.44-beta.1",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/config-schema.js","./edgeone-dist/edgeone.schema.json","./edgeone-dist/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./edgeone-dist/plugins/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js","build:sandbox-tarball":"bash ./scripts/build-sandbox-tarball.sh","upload:sandbox-tarball":"node ./scripts/upload-sandbox-tarball.js","sync:sandbox-lock":"cd packaging/sandbox && npm install --package-lock-only --omit=dev",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@edgeone/nuxt-pages":"1.1.2-beta.1","@edgeone/opennextjs-pages":"0.2.10-beta.12","@edgeone/pages-agent-toolkit":"0.1.38","@edgeone/pages-blob":"^0.0.16",chokidar:"^4.0.1",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","extract-zip":"^2.0.1","fast-glob":"^3.3.0",giget:"^2.0.0",minimatch:"^9.0.5",open:"^8.4.2"},devDependencies:{"@e2b/code-interpreter":"2.4.2","@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/types":"^1.0.2","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/js-yaml":"^4.0.9","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",archiver:"^7.0.1",axios:"^1.7.9",chalk:"^5.3.0","common-path-prefix":"^1.0.0",cookie:"^1.0.2","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6","detect-port":"^2.1.0",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","fs-extra":"^11.3.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0","ink-table":"^3.1.0",inquirer:"^8.2.4",ip:"^2.0.1","js-yaml":"^4.3.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21","mime-types":"^3.0.1",moment:"^2.30.1","node-fetch":"^3.3.2","node-persist":"^4.0.3","p-map":"^5.5.0",portfinder:"^1.0.32",prettier:"^3.1.1",prompts:"^2.4.2",protobufjs:"^8.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3",undici:"^5.29.0","update-check":"^1.5.4",uuid:"^9.0.0",vitest:"^4.0.17",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},overrides:{"@e2b/code-interpreter":"2.4.2",e2b:"2.19.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}};var DR=Pt(require("fs")),PR=Pt(require("path")),j6e=require("module"),M6e=require("url");k1();Tfe();Au();function Q6e(t){t.command("compile","Compile edgeone.config.ts to edgeone.json",()=>{},()=>yar()).command("validate","Validate the current config file",()=>{},()=>xar()).command("schema","Write edgeone.schema.json for IDE validation",()=>{},()=>bar())}async function yar(t=process.cwd()){var u;let[e,r]=i5(t);if(!r){console.error("No config file found (edgeone.config.ts / edgeone.json / edgeone.json5)."),process.exitCode=1;return}if(e.endsWith(".json")||e.endsWith(".json5")){console.log("Config is already JSON, nothing to compile.");return}let n;try{n=BR(t)}catch(p){console.error((u=p==null?void 0:p.message)!=null?u:p),process.exitCode=1;return}let[o,s]=Xq(n,["root"]);if((s||[]).forEach(p=>console.log(`error in ${p.path.join(".")}: ${p.message}`)),s!=null&&s.length){process.exitCode=1;return}let c=PR.default.join(t,"edgeone.json");await L6e(t,o),console.log(`Compiled to ${c}`)}function xar(t=process.cwd()){var u;let[e,r]=i5(t);if(!r){console.error("No config file found (edgeone.config.ts / edgeone.json / edgeone.json5)."),process.exitCode=1;return}console.log(`
|
|
625
|
+
`,"f"),$i(this,am,pt(this,am,"f")+e.join(" "),"f")}}}[Spe](e){WL(pt(this,As,"f")).forEach(r=>{if((o=>o==="configObjects")(r))return;let n=pt(this,As,"f")[r];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete pt(this,Ro,"f").getDescriptions()[e]}[Hje](e,r,n){pt(this,UW,"f")[n]||(pt(this,Ao,"f").process.emitWarning(e,r),pt(this,UW,"f")[n]=!0)}[Vje](){pt(this,zW,"f").push({options:pt(this,As,"f"),configObjects:pt(this,As,"f").configObjects.slice(0),exitProcess:pt(this,Cb,"f"),groups:pt(this,L_,"f"),strict:pt(this,UP,"f"),strictCommands:pt(this,zP,"f"),strictOptions:pt(this,$P,"f"),completionCommand:pt(this,fx,"f"),output:pt(this,am,"f"),exitError:pt(this,cT,"f"),hasOutput:pt(this,dx,"f"),parsed:this.parsed,parseFn:pt(this,hx,"f"),parseContext:pt(this,QP,"f")}),pt(this,Ro,"f").freeze(),pt(this,Qf,"f").freeze(),pt(this,ud,"f").freeze(),pt(this,Ib,"f").freeze()}[Gje](){let e="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(pt(this,Ao,"f").process.argv()[0])?r=pt(this,Ao,"f").process.argv().slice(1,2):r=pt(this,Ao,"f").process.argv().slice(0,1),e=r.map(n=>{let o=this[oMe](pt(this,jP,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&o.length<n.length?o:n}).join(" ").trim(),pt(this,Ao,"f").getEnv("_")&&pt(this,Ao,"f").getProcessArgvBin()===pt(this,Ao,"f").getEnv("_")&&(e=pt(this,Ao,"f").getEnv("_").replace(`${pt(this,Ao,"f").path.dirname(pt(this,Ao,"f").process.execPath())}/`,"")),e}[HP](){return pt(this,VW,"f")}[Wje](){return pt(this,WW,"f")}[Cpe](){if(!pt(this,MP,"f"))return;let e=pt(this,Ao,"f").getEnv("LC_ALL")||pt(this,Ao,"f").getEnv("LC_MESSAGES")||pt(this,Ao,"f").getEnv("LANG")||pt(this,Ao,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Yje](){return this[Ipe]().version||"unknown"}[Jje](e){let r=e["--"]?e["--"]:e._;for(let n=0,o;(o=r[n])!==void 0;n++)pt(this,Ao,"f").Parser.looksLikeNumber(o)&&Number.isSafeInteger(Math.floor(parseFloat(`${o}`)))&&(r[n]=Number(o));return e}[Ipe](e){let r=e||"*";if(pt(this,KL,"f")[r])return pt(this,KL,"f")[r];let n={};try{let o=e||pt(this,Ao,"f").mainFilename;!e&&pt(this,Ao,"f").path.extname(o)&&(o=pt(this,Ao,"f").path.dirname(o));let s=pt(this,Ao,"f").findUp(o,(c,u)=>{if(u.includes("package.json"))return"package.json"});uA(s,void 0,pt(this,Ao,"f")),n=JSON.parse(pt(this,Ao,"f").readFileSync(s,"utf8"))}catch{}return pt(this,KL,"f")[r]=n||{},pt(this,KL,"f")[r]}[lT](e,r){r=[].concat(r),r.forEach(n=>{n=this[Bpe](n),pt(this,As,"f")[e].push(n)})}[XL](e,r,n,o){this[Tpe](e,r,n,o,(s,c,u)=>{pt(this,As,"f")[s][c]=u})}[kpe](e,r,n,o){this[Tpe](e,r,n,o,(s,c,u)=>{pt(this,As,"f")[s][c]=(pt(this,As,"f")[s][c]||[]).concat(u)})}[Tpe](e,r,n,o,s){if(Array.isArray(n))n.forEach(c=>{e(c,o)});else if((c=>typeof c=="object")(n))for(let c of WL(n))e(c,n[c]);else s(r,this[Bpe](n),o)}[Bpe](e){return e==="__proto__"?"___proto___":e}[Dpe](e,r){return this[XL](this[Dpe].bind(this),"key",e,r),this}[Ppe](){var e,r,n,o,s,c,u,p,f,h,g,y;let b=pt(this,zW,"f").pop();uA(b,void 0,pt(this,Ao,"f"));let A;e=this,r=this,n=this,o=this,s=this,c=this,u=this,p=this,f=this,h=this,g=this,y=this,{options:{set value(I){$i(e,As,I,"f")}}.value,configObjects:A,exitProcess:{set value(I){$i(r,Cb,I,"f")}}.value,groups:{set value(I){$i(n,L_,I,"f")}}.value,output:{set value(I){$i(o,am,I,"f")}}.value,exitError:{set value(I){$i(s,cT,I,"f")}}.value,hasOutput:{set value(I){$i(c,dx,I,"f")}}.value,parsed:this.parsed,strict:{set value(I){$i(u,UP,I,"f")}}.value,strictCommands:{set value(I){$i(p,zP,I,"f")}}.value,strictOptions:{set value(I){$i(f,$P,I,"f")}}.value,completionCommand:{set value(I){$i(h,fx,I,"f")}}.value,parseFn:{set value(I){$i(g,hx,I,"f")}}.value,parseContext:{set value(I){$i(y,QP,I,"f")}}.value}=b,pt(this,As,"f").configObjects=A,pt(this,Ro,"f").unfreeze(),pt(this,Qf,"f").unfreeze(),pt(this,ud,"f").unfreeze(),pt(this,Ib,"f").unfreeze()}[Kje](e,r){return LP(r,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Xje].bind(this),getContext:this[Zje].bind(this),getHasOutput:this[eMe].bind(this),getLoggerInstance:this[tMe].bind(this),getParseContext:this[rMe].bind(this),getParserConfiguration:this[HP].bind(this),getUsageConfiguration:this[Wje].bind(this),getUsageInstance:this[nMe].bind(this),getValidationInstance:this[iMe].bind(this),hasParseCallback:this[YW].bind(this),isGlobalContext:this[sMe].bind(this),postProcess:this[VP].bind(this),reset:this[Rpe].bind(this),runValidation:this[Ope].bind(this),runYargsParserAndExecuteCommands:this[Rq].bind(this),setHasOutput:this[aMe].bind(this)}}[Xje](){return pt(this,ud,"f")}[Zje](){return pt(this,Pq,"f")}[eMe](){return pt(this,dx,"f")}[tMe](){return pt(this,JL,"f")}[rMe](){return pt(this,QP,"f")||{}}[nMe](){return pt(this,Ro,"f")}[iMe](){return pt(this,Qf,"f")}[YW](){return!!pt(this,hx,"f")}[sMe](){return pt(this,$W,"f")}[VP](e,r,n,o){return n||up(e)||(r||(e=this[zje](e)),(this[HP]()["parse-positional-numbers"]||this[HP]()["parse-positional-numbers"]===void 0)&&(e=this[Jje](e)),o&&(e=FP(e,this,pt(this,Ib,"f").getMiddleware(),!1))),e}[Rpe](e={}){$i(this,As,pt(this,As,"f")||{},"f");let r={};r.local=pt(this,As,"f").local||[],r.configObjects=pt(this,As,"f").configObjects||[];let n={};r.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(u=>{n[u]=!0})}),Object.assign(pt(this,qP,"f"),Object.keys(pt(this,L_,"f")).reduce((c,u)=>{let p=pt(this,L_,"f")[u].filter(f=>!(f in n));return p.length>0&&(c[u]=p),c},{})),$i(this,L_,{},"f");let o=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return o.forEach(c=>{r[c]=(pt(this,As,"f")[c]||[]).filter(u=>!n[u])}),s.forEach(c=>{r[c]=oT(pt(this,As,"f")[c],u=>!n[u])}),r.envPrefix=pt(this,As,"f").envPrefix,$i(this,As,r,"f"),$i(this,Ro,pt(this,Ro,"f")?pt(this,Ro,"f").reset(n):Fje(this,pt(this,Ao,"f")),"f"),$i(this,Qf,pt(this,Qf,"f")?pt(this,Qf,"f").reset(n):Uje(this,pt(this,Ro,"f"),pt(this,Ao,"f")),"f"),$i(this,ud,pt(this,ud,"f")?pt(this,ud,"f").reset():Rje(pt(this,Ro,"f"),pt(this,Qf,"f"),pt(this,Ib,"f"),pt(this,Ao,"f")),"f"),pt(this,Sb,"f")||$i(this,Sb,Mje(this,pt(this,Ro,"f"),pt(this,ud,"f"),pt(this,Ao,"f")),"f"),pt(this,Ib,"f").reset(),$i(this,fx,null,"f"),$i(this,am,"","f"),$i(this,cT,null,"f"),$i(this,dx,!1,"f"),this.parsed=!1,this}[oMe](e,r){return pt(this,Ao,"f").path.relative(e,r)}[Rq](e,r,n,o=0,s=!1){let c=!!n||s;e=e||pt(this,uT,"f"),pt(this,As,"f").__=pt(this,Ao,"f").y18n.__,pt(this,As,"f").configuration=this[HP]();let u=!!pt(this,As,"f").configuration["populate--"],p=Object.assign({},pt(this,As,"f").configuration,{"populate--":!0}),f=pt(this,Ao,"f").Parser.detailed(e,Object.assign({},pt(this,As,"f"),{configuration:{"parse-positional-numbers":!1,...p}})),h=Object.assign(f.argv,pt(this,QP,"f")),g,y=f.aliases,b=!1,A=!1;Object.keys(h).forEach(I=>{I===pt(this,kb,"f")&&h[I]?b=!0:I===pt(this,j_,"f")&&h[I]&&(A=!0)}),h.$0=this.$0,this.parsed=f,o===0&&pt(this,Ro,"f").clearCachedHelpMessage();try{if(this[Cpe](),r)return this[VP](h,u,!!n,!1);pt(this,kb,"f")&&[pt(this,kb,"f")].concat(y[pt(this,kb,"f")]||[]).filter(M=>M.length>1).includes(""+h._[h._.length-1])&&(h._.pop(),b=!0),$i(this,$W,!1,"f");let I=pt(this,ud,"f").getCommands(),S=pt(this,Sb,"f").completionKey in h,k=b||S||s;if(h._.length){if(I.length){let R;for(let M=o||0,Q;h._[M]!==void 0;M++)if(Q=String(h._[M]),I.includes(Q)&&Q!==pt(this,fx,"f")){let V=pt(this,ud,"f").runCommand(Q,this,f,M+1,s,b||A||s);return this[VP](V,u,!!n,!1)}else if(!R&&Q!==pt(this,fx,"f")){R=Q;break}!pt(this,ud,"f").hasDefaultCommand()&&pt(this,GW,"f")&&R&&!k&&pt(this,Qf,"f").recommendCommands(R,I)}pt(this,fx,"f")&&h._.includes(pt(this,fx,"f"))&&!S&&(pt(this,Cb,"f")&&aT(!0),this.showCompletionScript(),this.exit(0))}if(pt(this,ud,"f").hasDefaultCommand()&&!k){let R=pt(this,ud,"f").runCommand(null,this,f,0,s,b||A||s);return this[VP](R,u,!!n,!1)}if(S){pt(this,Cb,"f")&&aT(!0),e=[].concat(e);let R=e.slice(e.indexOf(`--${pt(this,Sb,"f").completionKey}`)+1);return pt(this,Sb,"f").getCompletion(R,(M,Q)=>{if(M)throw new cp(M.message);(Q||[]).forEach(V=>{pt(this,JL,"f").log(V)}),this.exit(0)}),this[VP](h,!u,!!n,!1)}if(pt(this,dx,"f")||(b?(pt(this,Cb,"f")&&aT(!0),c=!0,this.showHelp("log"),this.exit(0)):A&&(pt(this,Cb,"f")&&aT(!0),c=!0,pt(this,Ro,"f").showVersion("log"),this.exit(0))),!c&&pt(this,As,"f").skipValidation.length>0&&(c=Object.keys(h).some(R=>pt(this,As,"f").skipValidation.indexOf(R)>=0&&h[R]===!0)),!c){if(f.error)throw new cp(f.error.message);if(!S){let R=this[Ope](y,{},f.error);n||(g=FP(h,this,pt(this,Ib,"f").getMiddleware(),!0)),g=this[Kje](R,g!=null?g:h),up(g)&&!n&&(g=g.then(()=>FP(h,this,pt(this,Ib,"f").getMiddleware(),!1)))}}}catch(I){if(I instanceof cp)pt(this,Ro,"f").fail(I.message,I);else throw I}return this[VP](g!=null?g:h,u,!!n,!0)}[Ope](e,r,n,o){let s={...this.getDemandedOptions()};return c=>{if(n)throw new cp(n.message);pt(this,Qf,"f").nonOptionCount(c),pt(this,Qf,"f").requiredArguments(c,s);let u=!1;pt(this,zP,"f")&&(u=pt(this,Qf,"f").unknownCommands(c)),pt(this,UP,"f")&&!u?pt(this,Qf,"f").unknownArguments(c,e,r,!!o):pt(this,$P,"f")&&pt(this,Qf,"f").unknownArguments(c,e,{},!1,!1),pt(this,Qf,"f").limitedChoices(c),pt(this,Qf,"f").implications(c),pt(this,Qf,"f").conflicting(c)}}[aMe](){$i(this,dx,!0,"f")}[GP](e){if(typeof e=="string")pt(this,As,"f").key[e]=!0;else for(let r of e)pt(this,As,"f").key[r]=!0}};function Oje(t){return!!t&&typeof t.getInternalMethods=="function"}var ker=cMe(vpe),uMe=ker;var _1={name:"edgeone",version:"1.6.44",description:"Command-line interface for TencentCloud Pages Functions",bin:{edgeone:"./edgeone-bin/edgeone.js"},files:["./edgeone-bin/edgeone.js","./edgeone-dist/cli.js","./edgeone-dist/config-schema.js","./edgeone-dist/edgeone.schema.json","./edgeone-dist/pages/templates","./edgeone-dist/pages/dev/runner-worker.js","./edgeone-dist/pages/observability-python/**","./edgeone-dist/libs-pages-blob-python/**","./edgeone-dist/libs-pages-agent-toolkit/**","./edgeone-dist/studio/**","./edgeone-dist/plugins/**","./libs-pages-blob-python/**","./libs-pages-agent-toolkit/**"],author:"",keywords:["tencent","edgeone","edgefunctions","edgeone","cli","typescript"],scripts:{clean:"rimraf ./edgeone-dist ./edgeone-bin ./libs-node-ai ./libs-kv-client",bundle:"node -r esbuild-register ./scripts/bundle.ts",watch:"node -r esbuild-register ./scripts/bundle.ts watch",build:"npm run clean && npm run build:pages-ai && npm run build:kv-client && npm run prepare:blob-wheel && npm run prepare:agent-toolkit-wheel && npm run bundle","build:pages-ai":"node ./scripts/build-pages-ai.js","build:kv-client":"node ./scripts/build-kv-client.js","prepare:blob-wheel":"node ./scripts/prepare-pages-blob-wheel.js","prepare:agent-toolkit-wheel":"node ./scripts/prepare-pages-agent-toolkit-wheel.js","verify:publish-assets":"node ./scripts/verify-publish-assets.js","upload:agent-version-manifest":"node ./scripts/upload-agent-version-manifest.js","build:sandbox-tarball":"bash ./scripts/build-sandbox-tarball.sh","upload:sandbox-tarball":"node ./scripts/upload-sandbox-tarball.js","sync:sandbox-lock":"cd packaging/sandbox && npm install --package-lock-only --omit=dev",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}" "scripts/**/*.{ts,js}" "*.{json,md}"',prepack:"npm run build && npm run verify:publish-assets",prepublishOnly:"npm run build && npm run verify:publish-assets",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:observability":"vitest run --config src/agent/observability/node/tests/vitest.config.ts && cd src/agent/observability/python && uv run pytest tests/ -q"},dependencies:{"@babel/generator":"^7.28.0","@babel/parser":"^7.28.0","@babel/traverse":"^7.28.0","@babel/types":"^7.28.0","@edgeone/nuxt-pages":"1.1.2-beta.1","@edgeone/opennextjs-pages":"0.2.10-beta.11","@edgeone/pages-agent-toolkit":"0.1.38","@edgeone/pages-blob":"^0.0.16",chokidar:"^4.0.1",esbuild:"^0.19.2","esbuild-plugin-polyfill-node":"^0.3.0","extract-zip":"^2.0.1","fast-glob":"^3.3.0",giget:"^2.0.0",minimatch:"^9.0.5",open:"^8.4.2"},devDependencies:{"@e2b/code-interpreter":"2.4.2","@edgeone/framework-detect":"^0.0.2","@edgeone/is-spa":"^0.0.3","@edgeone/types":"^1.0.2","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.1","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-metrics-otlp-http":"^0.55.0","@opentelemetry/exporter-trace-otlp-http":"^0.55.0","@opentelemetry/instrumentation":"^0.55.0","@opentelemetry/otlp-transformer":"^0.55.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/sdk-trace-node":"^1.30.1","@opentelemetry/semantic-conventions":"^1.40.0","@tencent/capi-nodejs-sdk":"^2.3.2","@types/http-proxy":"^1.17.12","@types/inquirer":"^9.0.8","@types/ip":"^1.1.0","@types/js-yaml":"^4.0.9","@types/lodash":"^4.14.198","@types/prompts":"^2.4.4","@types/react":"^17.0.2","@types/uuid":"^9.0.3","@types/ws":"^8.5.7","@types/yargs":"^17.0.24","@vitest/coverage-v8":"^4.0.17",archiver:"^7.0.1",axios:"^1.7.9",chalk:"^5.3.0","common-path-prefix":"^1.0.0",cookie:"^1.0.2","cos-nodejs-sdk-v5":"^2.14.7","cross-spawn":"^7.0.6","detect-port":"^2.1.0",dotenv:"^16.3.1","esbuild-register":"^3.6.0",execa:"^7.1.1","fs-extra":"^11.3.1","http-proxy":"^1.18.1",husky:"^8.0.3",ink:"^3.2.0","ink-table":"^3.1.0",inquirer:"^8.2.4",ip:"^2.0.1","js-yaml":"^4.3.1",json5:"^2.2.3","lint-staged":"^15.2.0",lodash:"^4.17.21","mime-types":"^3.0.1",moment:"^2.30.1","node-fetch":"^3.3.2","node-persist":"^4.0.3","p-map":"^5.5.0",portfinder:"^1.0.32",prettier:"^3.1.1",prompts:"^2.4.2",protobufjs:"^8.4.2",react:"^17.0.2",rimraf:"^6.0.1",semiver:"^1.1.0",sirv:"^2.0.3","tencentcloud-cls-sdk-js-web":"^1.0.13","ts-node":"^10.9.2",typescript:"^5.9.3",undici:"^5.29.0","update-check":"^1.5.4",uuid:"^9.0.0",vitest:"^4.0.17",ws:"^8.14.2",yargs:"^17.6.2",zod:"^3.23.8","zod-to-json-schema":"^3.23.5"},overrides:{"@e2b/code-interpreter":"2.4.2",e2b:"2.19.5"},engines:{node:">=12"},"lint-staged":{"*.{ts,tsx,js,jsx,json,md}":["prettier --write"]}};var DR=Pt(require("fs")),PR=Pt(require("path")),j6e=require("module"),M6e=require("url");k1();Tfe();Au();function Q6e(t){t.command("compile","Compile edgeone.config.ts to edgeone.json",()=>{},()=>yar()).command("validate","Validate the current config file",()=>{},()=>xar()).command("schema","Write edgeone.schema.json for IDE validation",()=>{},()=>bar())}async function yar(t=process.cwd()){var u;let[e,r]=i5(t);if(!r){console.error("No config file found (edgeone.config.ts / edgeone.json / edgeone.json5)."),process.exitCode=1;return}if(e.endsWith(".json")||e.endsWith(".json5")){console.log("Config is already JSON, nothing to compile.");return}let n;try{n=BR(t)}catch(p){console.error((u=p==null?void 0:p.message)!=null?u:p),process.exitCode=1;return}let[o,s]=Xq(n,["root"]);if((s||[]).forEach(p=>console.log(`error in ${p.path.join(".")}: ${p.message}`)),s!=null&&s.length){process.exitCode=1;return}let c=PR.default.join(t,"edgeone.json");await L6e(t,o),console.log(`Compiled to ${c}`)}function xar(t=process.cwd()){var u;let[e,r]=i5(t);if(!r){console.error("No config file found (edgeone.config.ts / edgeone.json / edgeone.json5)."),process.exitCode=1;return}console.log(`
|
|
626
626
|
> Start validating the configuration file:`);let n;try{n=BR(t)}catch(p){console.error((u=p==null?void 0:p.message)!=null?u:p),process.exitCode=1;return}let[o,s,c]=Xq(n,["root"]);(c||[]).forEach(p=>console.warn(p.message)),s!=null&&s.length?(s.forEach(p=>console.log(`error in ${p.path.join(".")}: ${p.message}`)),process.exitCode=1):console.log("none error in configuration file"),console.log(`End validating!
|
|
627
|
-
`)}function bar(t=process.cwd()){let e;try{let n=(0,j6e.createRequire)("file:///
|
|
627
|
+
`)}function bar(t=process.cwd()){let e;try{let n=(0,j6e.createRequire)("file:///data/__qci/root-workspaces/__qci-pipeline-11188016-1/packages/tef-cli/edgeone-dist/cli.js"),o=PR.default.join(PR.default.dirname((0,M6e.fileURLToPath)("file:///data/__qci/root-workspaces/__qci-pipeline-11188016-1/packages/tef-cli/edgeone-dist/cli.js")),"edgeone.schema.json");e=DR.default.existsSync(o)?JSON.parse(DR.default.readFileSync(o,"utf-8")):n("@edgeone/types/edgeone.schema.json")}catch(n){console.error(`Failed to load edgeone.schema.json: ${n==null?void 0:n.message}`),process.exitCode=1;return}let r=PR.default.join(t,N6e);fT(r,e),console.log(`Schema written to ${r}.`),Ear(t)}function Ear(t){let e=PR.default.join(t,".vscode"),r=PR.default.join(e,"settings.json"),n={fileMatch:["edgeone.json"],url:"./edgeone.schema.json"},o={};try{DR.default.existsSync(r)&&(o=JSON.parse(DR.default.readFileSync(r,"utf-8")),(typeof o!="object"||o===null||Array.isArray(o))&&(console.warn(`[schema] ${r} is not a JSON object, backing up as settings.json.bak`),DR.default.copyFileSync(r,`${r}.bak`),o={}))}catch(u){console.warn(`[schema] Failed to parse ${r}: ${u==null?void 0:u.message}; skipping VS Code association`);return}let s=Array.isArray(o["json.schemas"])?o["json.schemas"]:[],c=s.find(u=>Array.isArray(u==null?void 0:u.fileMatch)&&u.fileMatch.includes("edgeone.json"));c?c.url=n.url:s.push({...n}),o["json.schemas"]=s,DR.default.mkdirSync(e,{recursive:!0}),fT(r,o),console.log(`Registered VS Code schema association in ${r} \u2014 manual edgeone.json files will get hints without a $schema field.`)}var tAe=Pt(tl()),rAe=Pt(j4()),nAe=Pt(qhe());function nU(t,e){return function(){return t.apply(e,arguments)}}var{toString:vfr}=Object.prototype,{getPrototypeOf:TT}=Object,{iterator:oU,toStringTag:b7e}=Symbol,iU=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),E7e=t=>typeof t=="string"&&(t==="__proto__"||t==="constructor"||t==="prototype"),w7e=(t,e,r)=>t===Object.prototype||!r&&e===null,xfr=t=>{if(!Object.isExtensible(t))return!1;let e=Object.getOwnPropertyNames(t);return Object.getOwnPropertySymbols&&e.push(...Object.getOwnPropertySymbols(t)),e.every(r=>{if(E7e(r))return!1;let n=Object.getOwnPropertyDescriptor(t,r);return!!n&&n.configurable&&n.writable===!0})},sU=(t,e)=>{let r=t,n=[];for(;r!=null;){if(n.indexOf(r)!==-1)return!1;n.push(r);let o=TT(r);if(w7e(r,o,r===t))return!1;if(iU(r,e))return!0;r=o}return!1},bfr=(t,e)=>t!=null&&sU(t,e)?t[e]:void 0,Efr=t=>{if(t==null||typeof t!="object"&&typeof t!="function")return t;let e=TT(t);if(e===null&&xfr(t))return t;let r=Object.create(null),n=Object.create(null),o=[],s=t;for(;s!=null&&o.indexOf(s)===-1;){o.push(s);let c=s===t?e:TT(s);if(w7e(s,c,s===t))break;let u=Object.getOwnPropertyNames(s);Object.getOwnPropertySymbols&&u.push(...Object.getOwnPropertySymbols(s));for(let p of u)E7e(p)||iU(n,p)||(r[p]=t[p],n[p]=!0);s=c}return r},zhe=(t=>e=>{let r=vfr.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),qb=t=>(t=t.toLowerCase(),e=>zhe(e)===t),vJ=t=>e=>typeof e===t,{isArray:HR}=Array,VR=vJ("undefined");function q4(t){return t!==null&&!VR(t)&&t.constructor!==null&&!VR(t.constructor)&&zy(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var _7e=qb("ArrayBuffer");function wfr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&_7e(t.buffer),e}var _fr=vJ("string"),zy=vJ("function"),S7e=vJ("number"),U4=t=>t!==null&&typeof t=="object",Sfr=t=>t===!0||t===!1,yJ=t=>{if(!U4(t))return!1;let e=TT(t);return(e===null||e===Object.prototype||TT(e)===null)&&!sU(t,b7e)&&!sU(t,oU)},Cfr=t=>{if(!U4(t)||q4(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Ifr=qb("Date"),kfr=qb("File"),Tfr=t=>!!(t&&typeof t.uri<"u"),Bfr=t=>t&&typeof t.getParts<"u",Dfr=qb("Blob"),Pfr=qb("FileList"),Rfr=qb("Set"),Ofr=t=>U4(t)&&zy(t.pipe);function Nfr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var v7e=Nfr(),x7e=typeof v7e.FormData<"u"?v7e.FormData:void 0,Ffr=t=>{if(!t)return!1;if(x7e&&t instanceof x7e)return!0;let e=TT(t);if(!e||e===Object.prototype||!zy(t.append))return!1;let r=zhe(t);return r==="formdata"||r==="object"&&zy(t.toString)&&t.toString()==="[object FormData]"},Lfr=qb("URLSearchParams"),[jfr,Mfr,Qfr,qfr]=["ReadableStream","Request","Response","Headers"].map(qb),Ufr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function aU(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),HR(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(q4(t))return;let s=r?Object.getOwnPropertyNames(t):Object.keys(t),c=s.length,u;for(n=0;n<c;n++)u=s[n],e.call(null,t[u],u,t)}}function C7e(t,e){if(q4(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}var $R=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,I7e=t=>!VR(t)&&t!==$R;function Uhe(...t){let{caseless:e,skipUndefined:r}=I7e(this)&&this||{},n={},o=(s,c)=>{if(c==="__proto__"||c==="constructor"||c==="prototype")return;let u=e&&typeof c=="string"&&C7e(n,c)||c,p=iU(n,u)?n[u]:void 0;yJ(p)&&yJ(s)?n[u]=Uhe(p,s):yJ(s)?n[u]=Uhe({},s):HR(s)?n[u]=s.slice():(!r||!VR(s))&&(n[u]=s)};for(let s=0,c=t.length;s<c;s++){let u=t[s];if(!u||q4(u)||(aU(u,o),typeof u!="object"||HR(u)))continue;let p=Object.getOwnPropertySymbols(u);for(let f=0;f<p.length;f++){let h=p[f];edr.call(u,h)&&o(u[h],h)}}return n}var zfr=(t,e,r,{allOwnKeys:n}={})=>(aU(e,(o,s)=>{r&&zy(o)?Object.defineProperty(t,s,{__proto__:null,value:nU(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),$fr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hfr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),r&&Object.assign(t.prototype,r)},Vfr=(t,e,r,n)=>{let o,s,c,u={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)c=o[s],(!n||n(c,t,e))&&!u[c]&&(e[c]=t[c],u[c]=!0);t=r!==!1&&TT(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Gfr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},Wfr=t=>{if(!t)return null;if(HR(t))return t;let e=t.length;if(!S7e(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Yfr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&TT(Uint8Array)),Jfr=(t,e)=>{let n=(t&&t[oU]).call(t),o;for(;(o=n.next())&&!o.done;){let s=o.value;e.call(t,s[0],s[1])}},Kfr=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Xfr=qb("HTMLFormElement"),Zfr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),{propertyIsEnumerable:edr}=Object.prototype,tdr=qb("RegExp"),k7e=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};aU(r,(o,s)=>{let c;(c=e(o,s,t))!==!1&&(n[s]=c||o)}),Object.defineProperties(t,n)},rdr=t=>{k7e(t,(e,r)=>{if(zy(t)&&["arguments","caller","callee"].includes(r))return!1;let n=t[r];if(zy(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ndr=(t,e)=>{let r={},n=o=>{o.forEach(s=>{r[s]=!0})};return HR(t)?n(t):n(String(t).split(e)),r},idr=()=>{},sdr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function odr(t){return!!(t&&zy(t.append)&&t[b7e]==="FormData"&&t[oU])}var adr=t=>{let e=new WeakSet,r=n=>{if(U4(n)){if(e.has(n))return;if(q4(n))return n;if(!("toJSON"in n)){e.add(n);let o;if(Rfr(n)){o=[];for(let s of n){let c=r(s);!VR(c)&&o.push(c)}}else o=HR(n)?[]:{},aU(n,(s,c)=>{let u=r(s);!VR(u)&&(o[c]=u)});return e.delete(n),o}}return n};return r(t)},cdr=qb("AsyncFunction"),udr=t=>t&&(U4(t)||zy(t))&&zy(t.then)&&zy(t.catch),T7e=((t,e)=>t?setImmediate:e?((r,n)=>($R.addEventListener("message",({source:o,data:s})=>{o===$R&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),$R.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",zy($R.postMessage)),ldr=typeof queueMicrotask<"u"?queueMicrotask.bind($R):typeof process<"u"&&process.nextTick||T7e,B7e=t=>t!=null&&zy(t[oU]),pdr=t=>t!=null&&sU(t,oU)&&B7e(t),ht={isArray:HR,isArrayBuffer:_7e,isBuffer:q4,isFormData:Ffr,isArrayBufferView:wfr,isString:_fr,isNumber:S7e,isBoolean:Sfr,isObject:U4,isPlainObject:yJ,isEmptyObject:Cfr,isReadableStream:jfr,isRequest:Mfr,isResponse:Qfr,isHeaders:qfr,isUndefined:VR,isDate:Ifr,isFile:kfr,isReactNativeBlob:Tfr,isReactNative:Bfr,isBlob:Dfr,isRegExp:tdr,isFunction:zy,isStream:Ofr,isURLSearchParams:Lfr,isTypedArray:Yfr,isFileList:Pfr,forEach:aU,merge:Uhe,extend:zfr,trim:Ufr,stripBOM:$fr,inherits:Hfr,toFlatObject:Vfr,kindOf:zhe,kindOfTest:qb,endsWith:Gfr,toArray:Wfr,forEachEntry:Jfr,matchAll:Kfr,isHTMLForm:Xfr,hasOwnProperty:iU,hasOwnProp:iU,hasOwnInPrototypeChain:sU,getSafeProp:bfr,toSafeFlatObject:Efr,reduceDescriptors:k7e,freezeMethods:rdr,toObjectSet:ndr,toCamelCase:Zfr,noop:idr,toFiniteNumber:sdr,findKey:C7e,global:$R,isContextDefined:I7e,isSpecCompliantForm:odr,toJSONObject:adr,isAsyncFn:cdr,isThenable:udr,setImmediate:T7e,asap:ldr,isIterable:B7e,isSafeIterable:pdr};var fdr=ht.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),D7e=t=>{let e={},r,n,o;return t&&t.split(`
|
|
628
628
|
`).forEach(function(c){o=c.indexOf(":"),r=c.substring(0,o).trim().toLowerCase(),n=c.substring(o+1).trim();let u=ht.hasOwnProp(e,r);!r||u&&ht.hasOwnProp(fdr,r)||(r==="set-cookie"?u?e[r].push(n):e[r]=[n]:e[r]=u?e[r]+", "+n:n)}),e};function ddr(t){let e=0,r=t.length;for(;e<r;){let n=t.charCodeAt(e);if(n!==9&&n!==32)break;e+=1}for(;r>e;){let n=t.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}var hdr=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),mdr=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function $he(t,e){return ht.isArray(t)?t.map(r=>$he(r,e)):ddr(String(t).replace(e,""))}var P7e=t=>$he(t,hdr),gdr=t=>$he(t,mdr);function z4(t){let e=Object.create(null);return ht.forEach(t.toJSON(),(r,n)=>{e[n]=gdr(r)}),e}var R7e=Symbol("internals");function cU(t){return t&&String(t).trim().toLowerCase()}function xJ(t){return t===!1||t==null?t:ht.isArray(t)?t.map(xJ):P7e(String(t))}function Adr(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}var ydr=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Hhe(t){let e=0,r=t.length;for(;e<r;){let n=t.charCodeAt(e);if(n!==9&&n!==32)break;e+=1}for(;r>e;){let n=t.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return e===0&&r===t.length?t:t.slice(e,r)}function vdr(t){let e=t.length-1;if(e<1||t.charCodeAt(0)!==34||t.charCodeAt(e)!==34)return t;let r="";for(let n=1;n<e;n++){let o=t.charCodeAt(n);if(o===34||o===92&&(n+=1,n>=e))return t;r+=t[n]}return r}function xdr(t){let e=Object.create(null),r=String(t),n=0,o=!1,s=!1;function c(u){let p=Hhe(r.slice(n,u)),f=p.indexOf("=");if(f<1)return;let h=Hhe(p.slice(0,f));if(!ydr.test(h))return;let g=h.toLowerCase();if(g==="__proto__"||g==="constructor"||g==="prototype")return;let y=Hhe(p.slice(f+1));e[g]=vdr(y)}for(let u=0;u<r.length;u++){let p=r.charCodeAt(u);o?s?s=!1:p===92?s=!0:p===34&&(o=!1):p===34?o=!0:(p===44||p===59)&&(c(u),n=u+1)}return c(r.length),e}var bdr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Vhe(t,e,r,n,o){if(ht.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!ht.isString(e)){if(ht.isString(n))return e.indexOf(n)!==-1;if(ht.isRegExp(n))return n.test(e)}}function Edr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function wdr(t,e){let r=ht.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{__proto__:null,value:function(o,s,c){return this[n].call(this,e,o,s,c)},configurable:!0})})}var $4=class{constructor(e){e&&this.set(e)}set(e,r,n){let o=this;function s(u,p,f){let h=cU(p);if(!h)return;let g=ht.findKey(o,h);(!g||o[g]===void 0||f===!0||f===void 0&&o[g]!==!1)&&(o[g||p]=xJ(u))}let c=(u,p)=>ht.forEach(u,(f,h)=>s(f,h,p));if(ht.isPlainObject(e)||e instanceof this.constructor)c(e,r);else if(ht.isString(e)&&(e=e.trim())&&!bdr(e))c(D7e(e),r);else if(ht.isObject(e)&&ht.isSafeIterable(e)){let u=Object.create(null),p,f;for(let h of e){if(!ht.isArray(h))throw new TypeError("Object iterator must return a key-value pair");f=h[0],ht.hasOwnProp(u,f)?(p=u[f],u[f]=ht.isArray(p)?[...p,h[1]]:[p,h[1]]):u[f]=h[1]}c(u,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=cU(e),e){let n=ht.findKey(this,e);if(n){let o=this[n];if(!r)return o;if(r===!0)return Adr(o);if(ht.isFunction(r))return r.call(this,o,n);if(ht.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=cU(e),e){let n=ht.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Vhe(this,this[n],n,r)))}return!1}delete(e,r){let n=this,o=!1;function s(c){if(c=cU(c),c){let u=ht.findKey(n,c);u&&(!r||Vhe(n,n[u],u,r))&&(delete n[u],o=!0)}}return ht.isArray(e)?e.forEach(s):s(e),o}clear(e){let r=Object.keys(this),n=r.length,o=!1;for(;n--;){let s=r[n];(!e||Vhe(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){let r=this,n={};return ht.forEach(this,(o,s)=>{let c=ht.findKey(n,s);if(c){r[c]=xJ(o),delete r[s];return}let u=e?Edr(s):String(s).trim();u!==s&&delete r[s],r[u]=xJ(o),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return ht.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&ht.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
629
629
|
`)}getSetCookie(){let e=this.get("set-cookie");return ht.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return xdr(e)}static concat(e,...r){let n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){let n=(this[R7e]=this[R7e]={accessors:{}}).accessors,o=this.prototype;function s(c){let u=cU(c);n[u]||(wdr(o,c),n[u]=!0)}return ht.isArray(e)?e.forEach(s):s(e),this}};$4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ht.reduceDescriptors($4.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});ht.freezeMethods($4);var Ol=$4;var uU="[REDACTED ****]";function _dr(t){if(ht.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(ht.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function Sdr(t,e){let r=new Set(e.map(s=>String(s).toLowerCase())),n=[],o=s=>{if(s===null||typeof s!="object"||ht.isBuffer(s))return s;if(n.indexOf(s)!==-1)return;s instanceof Ol&&(s=s.toJSON()),n.push(s);let c;if(ht.isArray(s))c=[],s.forEach((u,p)=>{let f=o(u);ht.isUndefined(f)||(c[p]=f)});else{if(!ht.isPlainObject(s)&&_dr(s))return n.pop(),s;c=Object.create(null);for(let[u,p]of Object.entries(s)){let f=r.has(u.toLowerCase())?uU:o(p);ht.isUndefined(f)||(c[u]=f)}}return n.pop(),c};return o(t)}function O7e(t){try{return String(t)}catch{return""}}function Cdr(t){return t.errors.map(r=>{try{return r&&r.message?O7e(r.message):O7e(r)}catch{return""}}).filter(Boolean).join("; ")||t.name||"AggregateError"}var rg=class t extends Error{static from(e,r,n,o,s,c){let u=e.message;!u&&ht.isArray(e.errors)&&e.errors.length&&(u=Cdr(e));let p=new t(u,r||e.code,n,o,s);return Object.defineProperty(p,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),p.name=e.name,e.status!=null&&p.status==null&&(p.status=e.status),c&&Object.assign(p,c),p}constructor(e,r,n,o,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){let e=this.config,r=e&&ht.hasOwnProp(e,"redact")?e.redact:void 0,n=ht.isArray(r)&&r.length>0?Sdr(e,r):ht.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};rg.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";rg.ERR_BAD_OPTION="ERR_BAD_OPTION";rg.ECONNABORTED="ECONNABORTED";rg.ETIMEDOUT="ETIMEDOUT";rg.ECONNREFUSED="ECONNREFUSED";rg.ERR_NETWORK="ERR_NETWORK";rg.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";rg.ERR_DEPRECATED="ERR_DEPRECATED";rg.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";rg.ERR_BAD_REQUEST="ERR_BAD_REQUEST";rg.ERR_CANCELED="ERR_CANCELED";rg.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";rg.ERR_INVALID_URL="ERR_INVALID_URL";rg.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var Yr=rg;var L$e=Pt(F$e(),1),PJ=L$e.default;var RJ={isBufferAvailable(){return typeof Buffer<"u"},from(t){return Buffer.from(t)}};var mme=100;function hme(t){return ht.isPlainObject(t)||ht.isArray(t)}function j$e(t){return ht.endsWith(t,"[]")?t.slice(0,-2):t}function dme(t,e,r){return t?t.concat(e).map(function(o,s){return o=j$e(o),!r&&s?"["+o+"]":o}).join(r?".":""):e}function pmr(t){return ht.isArray(t)&&!t.some(hme)}var fmr=ht.toFlatObject(ht,{},null,function(e){return/^is[A-Z]/.test(e)});function dmr(t,e,r){if(!ht.isObject(t))throw new TypeError("target must be an object");e=e||new(PJ||FormData);let n=(R,M)=>{let Q=ht.getSafeProp(r,R);return ht.isUndefined(Q)?M:Q},o=n("metaTokens",!0),s=n("visitor")||I,c=n("dots",!1),u=n("indexes",!1),p=n("Blob")||typeof Blob<"u"&&Blob,f=n("maxDepth",mme),h=p&&ht.isSpecCompliantForm(e),g=[];if(!ht.isFunction(s))throw new TypeError("visitor must be a function");function y(R){if(R===null)return"";if(ht.isDate(R))return R.toISOString();if(ht.isBoolean(R))return R.toString();if(!h&&ht.isBlob(R))throw new Yr("Blob is not supported. Use a Buffer instead.");if(ht.isArrayBuffer(R)||ht.isTypedArray(R)){if(h&&typeof p=="function")return new p([R]);if(RJ&&RJ.isBufferAvailable())return RJ.from(R);throw new Yr("Blob is not supported. Use a Buffer instead.",Yr.ERR_NOT_SUPPORT)}return R}function b(R){if(R>f)throw new Yr("Object is too deeply nested ("+R+" levels). Max depth: "+f,Yr.ERR_FORM_DATA_DEPTH_EXCEEDED)}function A(R,M){if(f===1/0)return JSON.stringify(R);let Q=[];return JSON.stringify(R,function(re,X){if(!ht.isObject(X))return X;for(;Q.length&&Q[Q.length-1]!==this;)Q.pop();return Q.push(X),b(M+Q.length-1),X})}function I(R,M,Q){let V=R;if(ht.isReactNative(e)&&ht.isReactNativeBlob(R))return e.append(dme(Q,M,c),y(R)),!1;if(R&&!Q&&typeof R=="object"){if(ht.endsWith(M,"{}"))M=o?M:M.slice(0,-2),R=A(R,1);else if(ht.isArray(R)&&pmr(R)||(ht.isFileList(R)||ht.endsWith(M,"[]"))&&(V=ht.toArray(R)))return M=j$e(M),V.forEach(function(X,xe){!(ht.isUndefined(X)||X===null)&&e.append(u===!0?dme([M],xe,c):u===null?M:M+"[]",y(X))}),!1}return hme(R)?!0:(e.append(dme(Q,M,c),y(R)),!1)}let S=Object.assign(fmr,{defaultVisitor:I,convertValue:y,isVisitable:hme});function k(R,M,Q=0){if(!ht.isUndefined(R)){if(b(Q),g.indexOf(R)!==-1)throw new Error("Circular reference detected in "+M.join("."));g.push(R),ht.forEach(R,function(re,X){(!(ht.isUndefined(re)||re===null)&&s.call(e,re,ht.isString(X)?X.trim():X,M,S))===!0&&k(re,M?M.concat(X):[X],Q+1)}),g.pop()}}if(!ht.isObject(t))throw new TypeError("data must be an object");return k(t),e}var DT=dmr;function M$e(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(n){return e[n]})}function Q$e(t,e){this._pairs=[],t&&DT(t,this,e)}var q$e=Q$e.prototype;q$e.append=function(e,r){this._pairs.push([e,r])};q$e.toString=function(e){let r=e?n=>e.call(this,n,M$e):M$e;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};var U$e=Q$e;function hmr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function WR(t,e,r){if(!e)return t;t=t||"";let n=ht.isFunction(r)?{serialize:r}:r,o=ht.getSafeProp(n,"encode")||hmr,s=ht.getSafeProp(n,"serialize"),c;if(s?c=s(e,n):c=ht.isURLSearchParams(e)?e.toString():new U$e(e,n).toString(o),c){let u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+c}return t}var hU=Symbol("internals");function $$e(t){return t?t.length:0}function z$e(t){if(t)for(;t.length&&t[t.length-1]===null;)t.pop()}function mU(t,e){let r=t.handlers,n=$$e(r);r!==e.handlersRef?(e.handlersRef=r,e.handlerEntries.clear()):n!==e.handlersLength&&(n?e.handlerEntries.forEach(function(s,c){r[s.index]!==s.handler&&e.handlerEntries.delete(c)}):e.handlerEntries.clear()),e.handlersLength=n}var gme=class{constructor(){this.handlers=[],this[hU]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,r,n){let o={fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},s=this[hU];this.handlers==null&&(this.handlers=[]),mU(this,s);let c=s.nextId++;return this.handlers.push(o),s.handlerEntries.set(c,{handler:o,index:this.handlers.length-1}),s.handlersLength=this.handlers.length,c}eject(e){let r=this[hU];mU(this,r);let n=r.handlerEntries.get(e);if(n){if(r.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,r.iterationDepth||(z$e(this.handlers),r.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],mU(this,this[hU]))}forEach(e){let r=this[hU];mU(this,r),r.iterationDepth++;try{ht.forEach(this.handlers,function(o){o!==null&&e(o)})}finally{--r.iterationDepth||(mU(this,r),z$e(this.handlers),r.handlersLength=$$e(this.handlers))}}},Ame=gme;var PT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var W$e=Pt(require("crypto"),1);var H$e=Pt(require("url"),1),V$e=H$e.default.URLSearchParams;var yme="abcdefghijklmnopqrstuvwxyz",G$e="0123456789",Y$e={DIGIT:G$e,ALPHA:yme,ALPHA_DIGIT:yme+yme.toUpperCase()+G$e},mmr=(t=16,e=Y$e.ALPHA_DIGIT)=>{let r="",{length:n}=e,o=new Uint32Array(t);W$e.default.randomFillSync(o);for(let s=0;s<t;s++)r+=e[o[s]%n];return r},J$e={isNode:!0,classes:{URLSearchParams:V$e,FormData:PJ,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Y$e,generateString:mmr,protocols:["http","https","file","data"]};var bme={};Cq(bme,{hasBrowserEnv:()=>xme,hasStandardBrowserEnv:()=>gmr,hasStandardBrowserWebWorkerEnv:()=>Amr,navigator:()=>vme,origin:()=>ymr});var xme=typeof window<"u"&&typeof document<"u",vme=typeof navigator=="object"&&navigator||void 0,gmr=xme&&(!vme||["ReactNative","NativeScript","NS"].indexOf(vme.product)<0),Amr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ymr=xme&&window.location.href||"http://localhost";var Rc={...bme,...J$e};function Eme(t,e){return DT(t,new Rc.classes.URLSearchParams,{visitor:function(r,n,o,s){return Rc.isNode&&ht.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}var K$e=mme;function X$e(t){if(t>K$e)throw new Yr("FormData field is too deeply nested ("+t+" levels). Max depth: "+K$e,Yr.ERR_FORM_DATA_DEPTH_EXCEEDED)}function vmr(t){let e=[],r=/[^.[\]]+|\[([^.[\]]*)]/g,n;for(;(n=r.exec(t))!==null;)X$e(e.length),e.push(n[0]==="[]"?"":n[1]||n[0]);return e}function xmr(t){let e={},r=Object.keys(t),n,o=r.length,s;for(n=0;n<o;n++)s=r[n],e[s]=t[s];return e}function bmr(t){function e(r,n,o,s){X$e(s);let c=r[s++];if(c==="__proto__")return!0;let u=Number.isFinite(+c),p=s>=r.length;return c=!c&&ht.isArray(o)?o.length:c,p?(ht.hasOwnProp(o,c)?o[c]=ht.isArray(o[c])?o[c].concat(n):[o[c],n]:o[c]=n,!u):((!ht.hasOwnProp(o,c)||!ht.isObject(o[c]))&&(o[c]=[]),e(r,n,o[c],s)&&ht.isArray(o[c])&&(o[c]=xmr(o[c])),!u)}if(ht.isFormData(t)&&ht.isFunction(t.entries)){let r={};return ht.forEachEntry(t,(n,o)=>{e(vmr(n),o,r,0)}),r}return null}var OJ=bmr;var Emr=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),NJ=Emr;var Y4=(t,e)=>t!=null&&ht.hasOwnProp(t,e)?t[e]:void 0;function wmr(t,e,r){if(ht.isString(t))try{return(e||JSON.parse)(t),ht.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var wme={transitional:PT,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=ht.isObject(e);if(s&&ht.isHTMLForm(e)&&(e=new FormData(e)),ht.isFormData(e))return o?JSON.stringify(OJ(e)):e;if(ht.isArrayBuffer(e)||ht.isBuffer(e)||ht.isStream(e)||ht.isFile(e)||ht.isBlob(e)||ht.isReadableStream(e))return e;if(ht.isArrayBufferView(e))return e.buffer;if(ht.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(s){let p=Y4(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Eme(e,p).toString();if((u=ht.isFileList(e))||n.indexOf("multipart/form-data")>-1){let f=Y4(this,"env"),h=f&&f.FormData;return DT(u?{"files[]":e}:e,h&&new h,p)}}return s||o?(r.setContentType("application/json",!1),wmr(e)):e}],transformResponse:[function(e){let r=Y4(this,"transitional")||wme.transitional,n=r&&r.forcedJSONParsing,o=Y4(this,"responseType"),s=o==="json";if(ht.isResponse(e)||ht.isReadableStream(e))return e;if(e&&ht.isString(e)&&(n&&!o||s)){let u=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,Y4(this,"parseReviver"))}catch(p){if(u)throw p.name==="SyntaxError"?Yr.from(p,Yr.ERR_BAD_RESPONSE,this,null,Y4(this,"response")):p}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rc.classes.FormData,Blob:Rc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ht.forEach(NJ,t=>{wme.headers[t]={}});var J4=wme;function gU(t,e){let r=this||J4,n=e||r,o=Ol.from(n.headers),s=n.data;return ht.forEach(t,function(u){s=u.call(r,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function AU(t){return!!(t&&t.__CANCEL__)}var _me=class extends Yr{constructor(e,r,n){super(e==null?"canceled":e,Yr.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},bx=_me;function K_(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Yr("Request failed with status code "+r.status,r.status>=400&&r.status<500?Yr.ERR_BAD_REQUEST:Yr.ERR_BAD_RESPONSE,r.config,r.request,r))}function Sme(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Cme(t,e){if(!e)return t;let r=t.length;for(;r>0&&t.charCodeAt(r-1)===47;)r--;return t.slice(0,r)+"/"+e.replace(/^\/+/,"")}var _mr=/[\t\n\r]/g;function yU(t){if(typeof t!="string")return t;let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e).replace(_mr,"")}var Smr=/^https?:(?!\/\/)/i;function Cmr(t){return t&&t.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,r,n="")=>`${r}${n}${uU}`)}function Imr(t){let e=t.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${uU}@`),r=e.indexOf("#"),o=(r===-1?e:e.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${uU}`);return r===-1?o:`${o}#${Cmr(e.slice(r+1))}`}function Z$e(t,e){if(typeof t=="string"){let r=yU(t);if(Smr.test(r))throw new Yr(`Invalid URL ${JSON.stringify(Imr(r))}: missing "//" after protocol`,Yr.ERR_INVALID_URL,e)}}function YR(t,e,r,n){Z$e(e,n);let o=!Sme(e);return t&&(o||r===!1)?(Z$e(t,n),Cme(t,e)):e}var kmr={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Tmr(t){try{return new URL(t)}catch{return null}}function eHe(t){var e=(typeof t=="string"?Tmr(t):t)||{},r=e.protocol,n=e.host,o=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),o=parseInt(o)||kmr[r]||0,!Bmr(n,o)))return"";var s=Ime(r+"_proxy")||Ime("all_proxy");return s&&s.indexOf("://")===-1&&(s=r+"://"+s),s}function Bmr(t,e){var r=Ime("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var o=n.match(/^(.+):(\d+)$/),s=o?o[1]:n,c=o?parseInt(o[2]):0;return c&&c!==e?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!t.endsWith(s)):t!==s}):!0}function Ime(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var cge=Pt(gHe(),1),uge=Pt(require("http"),1),lge=Pt(require("https"),1),aVe=Pt(require("http2"),1),cVe=Pt(require("util"),1),age=require("path"),uVe=Pt(Yme(),1),Ex=Pt(require("zlib"),1);var U2="1.20.0";function eO(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var Bgr=/^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function Jme(t,e,r){let n=r&&r.Blob||Rc.classes.Blob,o=eO(t);if(e===void 0&&n&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let s=Bgr.exec(t);if(!s)throw new Yr("Invalid URL",Yr.ERR_INVALID_URL);let c=s[1],u=s[2],p=s[3]?"base64":"utf8",f=s[4],h="";c?h=u?c+u:c:u&&(h="text/plain"+u);let g=p==="base64"?Buffer.from(f,"base64"):Buffer.from(decodeURIComponent(f),p);if(e){if(!n)throw new Yr("Blob is not supported",Yr.ERR_NOT_SUPPORT);return new n([g],{type:h})}return g}throw new Yr("Unsupported protocol "+o,Yr.ERR_NOT_SUPPORT)}var Ub=Pt(require("stream"),1);var Dgr=["content-type","content-length"];function IU(t,e,r){if(r!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([n,o])=>{Dgr.includes(n.toLowerCase())&&t.set(n,o)})}var wHe=Pt(require("stream"),1);var Kme=Symbol("internals"),Xme=class extends wHe.default.Transform{constructor(e){e=ht.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,o)=>!ht.isUndefined(o[n])),super({readableHighWaterMark:e.chunkSize});let r=this[Kme]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(e){let r=this[Kme];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let o=this[Kme],s=o.maxRate,c=this.readableHighWaterMark,u=o.timeWindow,p=1e3/u,f=s/p,h=o.minChunkSize!==!1?Math.max(o.minChunkSize,f*.01):0,g=(b,A)=>{let I=Buffer.byteLength(b);o.bytesSeen+=I,o.bytes+=I,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(b)?process.nextTick(A):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(A)}},y=(b,A)=>{let I=Buffer.byteLength(b),S=null,k=c,R,M=0;if(s){let Q=Date.now();(!o.ts||(M=Q-o.ts)>=u)&&(o.ts=Q,R=f-o.bytes,o.bytes=R<0?-R:0,M=0),R=f-o.bytes}if(s){if(R<=0)return setTimeout(()=>{A(null,b)},u-M);R<k&&(k=R)}k&&I>k&&I-k>h&&(S=b.subarray(k),b=b.subarray(0,k)),g(b,S?()=>{process.nextTick(A,null,S)}:A)};y(e,function b(A,I){if(A)return n(A);I?y(I,b):n(null)})}},Zme=Xme;var lVe=require("events");var SHe=Pt(require("util"),1),CHe=require("stream");var{asyncIterator:_He}=Symbol,Pgr=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[_He]?yield*t[_He]():yield t},qJ=Pgr;var Rgr=Rc.ALPHABET.ALPHA_DIGIT+"-_",kU=typeof TextEncoder=="function"?new TextEncoder:new SHe.default.TextEncoder,tO=`\r
|
|
630
630
|
`,Ogr=kU.encode(tO),Ngr=2,ege=class{constructor(e,r){let{escapeName:n}=this.constructor,o=ht.isString(r),s=`Content-Disposition: form-data; name="${n(e)}"${!o&&r.name?`; filename="${n(r.name)}"`:""}${tO}`;if(o)r=kU.encode(String(r).replace(/\r?\n|\r\n?/g,tO));else{let c=String(r.type||"application/octet-stream").replace(/[\r\n]/g,"");s+=`Content-Type: ${c}${tO}`}this.headers=kU.encode(s+tO),this.contentLength=o?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+Ngr,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;ht.isTypedArray(e)?yield e:yield*qJ(e),yield Ogr}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},Fgr=(t,e,r)=>{let{tag:n="form-data-boundary",size:o=25,boundary:s=n+"-"+Rc.generateString(o,Rgr)}=r||{};if(!ht.isFormData(t))throw new TypeError("FormData instance required");if(s.length<1||s.length>70)throw new Error("boundary must be 1-70 characters long");let c=kU.encode("--"+s+tO),u=kU.encode("--"+s+"--"+tO),p=u.byteLength,f=Array.from(t.entries()).map(([g,y])=>{let b=new ege(g,y);return p+=b.size,b});p+=c.byteLength*f.length,p=ht.toFiniteNumber(p);let h={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(p)&&(h["Content-Length"]=p),e&&e(h),CHe.Readable.from(async function*(){for(let g of f)yield c,yield*g.encode();yield u}())},IHe=Fgr;var kHe=Pt(require("stream"),1),tge=class extends kHe.default.Transform{__transform(e,r,n){this.push(e),n()}_transform(e,r,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,r)}this.__transform(e,r,n)}},THe=tge;var BHe=Pt(require("http2"),1),DHe=Pt(require("util"),1),rge=class{constructor(){this.sessions=Object.create(null)}getSession(e,r){r=Object.assign(Object.create(null),{sessionTimeout:1e3},r);let n=this.sessions[e];if(n){let g=n.length;for(let y=0;y<g;y++){let[b,A]=n[y];if(!b.destroyed&&!b.closed&&DHe.default.isDeepStrictEqual(A,r))return b}}let o=BHe.default.connect(e,r),s,c,u=()=>{if(s)return;s=!0,c&&(clearTimeout(c),c=null);let g=n,y=g.length,b=y;for(;b--;)if(g[b][0]===o){y===1?delete this.sessions[e]:g.splice(b,1),o.closed||o.close();return}},p=o.request,{sessionTimeout:f}=r;if(f!=null){let g=0;o.request=function(){let y=p.apply(this,arguments);return g++,c&&(clearTimeout(c),c=null),y.once("close",()=>{--g||(c=setTimeout(()=>{c=null,u()},f))}),y}}o.once("close",u),o.once("error",u);let h=[o,r];return n?n.push(h):n=this.sessions[e]=[h],o}},PHe=rge;var Lgr=(t,e)=>ht.isAsyncFn(t)?function(...r){let n=r.pop();t.apply(this,r).then(o=>{try{e?n(null,...e(o)):n(null,o)}catch(s){n(s)}},n)}:t,RHe=Lgr;var jgr=new Set(["localhost","0.0.0.0"]),FHe=t=>{let e=t.length;for(;e&&t.charCodeAt(e-1)===46;)e--;return e===t.length?t:t.slice(0,e)},LHe=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(r=>/^\d+$/.test(r)&&Number(r)>=0&&Number(r)<=255)},nge=t=>{if(/^0[xX][0-9a-fA-F]+$/.test(t)){let e=parseInt(t.slice(2),16);return Number.isFinite(e)?e:null}if(t.length>1&&/^0[0-7]+$/.test(t)){let e=parseInt(t,8);return Number.isFinite(e)?e:null}if(t.length>1&&/^0[0-9]+$/.test(t))return null;if(/^[0-9]+$/.test(t)){let e=parseInt(t,10);return Number.isFinite(e)?e:null}return null},jHe=t=>{if(typeof t!="string"||!t||t.indexOf(":")!==-1)return t;let e=t;if(e.charAt(0)==="["&&e.charAt(e.length-1)==="]"&&(e=e.slice(1,-1)),e=FHe(e),!/^[0-9.xXa-fA-F]+$/.test(e))return t;let r=e.split(".");if(r.some(h=>h===""))return t;if(r.length===4){let h=r.map(nge);return h.some(g=>g===null||g<0||g>255)?t:h.join(".")}if(r.length>4||r.length===1)return t;let n=r.slice(0,-1),o=r[r.length-1],s=4-n.length,c=nge(o);if(c===null)return t;let u=(1<<8*s)-1;if(c<0||c>u)return t;let p=new Array(s).fill(0);for(let h=s-1,g=c;h>=0;h--,g>>=8)p[h]=g&255;let f=n.map(nge);return f.some(h=>h===null||h<0||h>255)?t:[...f,...p].join(".")},ige=t=>/^0{1,4}$/.test(t),Mgr=t=>{if(t==="::")return!0;let e=t.indexOf("::");if(e!==-1){if(e!==t.lastIndexOf("::"))return!1;let n=t.slice(0,e),o=t.slice(e+2),s=n?n.split(":"):[],c=o?o.split(":"):[];return s.length+c.length<8&&s.every(ige)&&c.every(ige)}let r=t.split(":");return r.length===8&&r.every(ige)},Qgr=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return LHe(e[1]);let r=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(r){let o=parseInt(r[1],16);return o>=32512&&o<=32767}let n=t.split(":");if(n.length===8){for(let o=0;o<7;o++)if(!/^0+$/.test(n[o]))return!1;return/^0*1$/.test(n[7])}return!1},OHe=t=>t?jgr.has(t)||LHe(t)||Mgr(t)?!0:Qgr(t):!1,qgr={http:80,https:443,ws:80,wss:443,ftp:21},Ugr=t=>{let e=t,r=0;if(e.charAt(0)==="["){let s=e.indexOf("]");if(s!==-1){let c=e.slice(1,s),u=e.slice(s+1);return u.charAt(0)===":"&&/^\d+$/.test(u.slice(1))&&(r=Number.parseInt(u.slice(1),10)),[c,r]}}let n=e.indexOf(":"),o=e.lastIndexOf(":");return n!==-1&&n===o&&/^\d+$/.test(e.slice(o+1))&&(r=Number.parseInt(e.slice(o+1),10),e=e.slice(0,o)),[e,r]},zgr=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,$gr=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,MHe=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(zgr);if(e)return e[1];let r=t.match($gr);if(r){let n=parseInt(r[1],16),o=parseInt(r[2],16);return`${n>>8}.${n&255}.${o>>8}.${o&255}`}return t},Hgr=/^(?:0|[1-9]\d{0,2})$/,QHe=t=>{let e=t.split(".");return e.length===4&&e.every(r=>Hgr.test(r)&&Number(r)<=255)?e.map(Number):null},Vgr=/^[0-9a-f]{1,4}$/i,Ggr=t=>{let e=t.split("::");if(e.length>2)return null;let r=e[0]?e[0].split(":"):[];if(e.length===2){let n=e[1]?e[1].split(":"):[],o=8-r.length-n.length;if(o<1)return null;r.push(...new Array(o).fill("0"),...n)}return r.length!==8||r.some(n=>!Vgr.test(n))?null:r.flatMap(n=>{let o=Number.parseInt(n,16);return[o>>8&255,o&255]})},qHe=t=>typeof t!="string"||!t?null:t.indexOf(":")!==-1?Ggr(t):QHe(t),NHe=t=>{if(!t)return t;t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1));let e=FHe(t),r=jHe(e);return r!==e?r:MHe(e)},Wgr=t=>{let e=t,r=e.charAt(0)==="[",n=e.charAt(e.length-1)==="]",o=e.includes("[")||e.includes("]");if(r||n){if(!r||!n||(e=e.slice(1,-1),e.indexOf(":")===-1||e.includes("[")||e.includes("]")))return null}else if(o)return null;if(!e||e.charAt(e.length-1)===".")return null;let s=e.indexOf(":")!==-1;if(s)try{e=new URL(`http://[${e}]/`).hostname.slice(1,-1)}catch{return null}else if(e=jHe(e),!QHe(e))return null;return{normalized:MHe(e),wasIPv6:s}},Ygr=/^(.+)\/(0|[1-9]\d{0,2})$/,Jgr=t=>{if(t.indexOf("/")===-1)return;let e=Ygr.exec(t);if(!e)return null;let r=Number(e[2]),n=Wgr(e[1]);if(!n)return null;let{normalized:o,wasIPv6:s}=n;if(s&&o.indexOf(":")===-1){if(r<96)return null;r-=96}let c=qHe(o);return!c||r>c.length*8?null:{bytes:c,prefix:r}},Kgr=(t,e,r)=>{let n=r>>3;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;let o=r&7;if(o){let s=255<<8-o&255;if((t[n]&s)!==(e[n]&s))return!1}return!0};function sge(t){let e;try{e=new URL(t)}catch{return!1}let r=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!r)return!1;if(r==="*")return!0;let n=Number.parseInt(e.port,10)||qgr[e.protocol.split(":",1)[0]]||0,o=NHe(e.hostname.toLowerCase()),s=qHe(o);return r.split(/[\s,]+/).some(c=>{if(!c)return!1;if(c==="*")return!0;let u=Jgr(c);if(u!==void 0)return u!==null&&!!s&&s.length===u.bytes.length&&Kgr(s,u.bytes,u.prefix);let[p,f]=Ugr(c);return p=NHe(p),!p||f&&f!==n?!1:(p.charAt(0)==="*"&&(p=p.slice(1)),p.charAt(0)==="."?o.endsWith(p):o===p||OHe(o)&&OHe(p))})}function Xgr(t,e){t=t||10;let r=new Array(t),n=new Array(t),o=0,s=0,c;return e=e!==void 0?e:1e3,function(p){let f=Date.now(),h=n[s];c||(c=f),r[o]=p,n[o]=f;let g=s,y=0;for(;g!==o;)y+=r[g++],g=g%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),f-c<e)return;let b=h&&f-h;return b?Math.round(y*1e3/b):void 0}}var UHe=Xgr;function Zgr(t,e){let r=0,n=1e3/e,o,s,c=(h,g=Date.now())=>{r=g,o=null,s&&(clearTimeout(s),s=null),t(...h)};return[(...h)=>{let g=Date.now(),y=g-r;y>=n?c(h,g):(o=h,s||(s=setTimeout(()=>{s=null,c(o)},n-y)))},()=>o&&c(o),(...h)=>c(h)]}var zHe=Zgr;var z2=(t,e,r=3)=>{let n=0,o=UHe(50,250);return zHe(s=>{if(!s||!ht.isNumber(s.loaded))return;let c=s.loaded,u=s.lengthComputable?s.total:void 0,p=Math.max(0,u!=null?Math.min(c,u):c),f=Math.max(0,p-n),h=o(f);n=Math.max(n,p);let g={loaded:p,total:u,progress:u?p/u:void 0,bytes:f,rate:h||void 0,estimated:h&&u?(u-p)/h:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(g)},r)},t3=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},r3=(t,e=ht.asap)=>(...r)=>e(()=>t(...r));var $He=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,VHe=(t,e,r)=>e+2<r&&$He(t.charCodeAt(e+1))&&$He(t.charCodeAt(e+2)),HHe=t=>t<=57?t-48:(t&223)-55,e0r=t=>t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===43||t===47||t===45||t===95,t0r=t=>t===9||t===10||t===12||t===13||t===32,r0r=t=>{let e=Math.floor(t/4),r=t%4;return e*3+(r===2?1:r===3?2:0)},GHe=t=>{let e=t.length,r=0;return e>0&&t.charCodeAt(e-1)===61&&(r++,e>1&&t.charCodeAt(e-2)===61&&r++),Math.floor((e-r)*3/4)},n0r=t=>{let e=t.length,r=0,n=0,o=!1;for(let s=0;s<e;s++){let c=t.charCodeAt(s);if(c===37&&VHe(t,s,e)&&(c=HHe(t.charCodeAt(s+1))*16+HHe(t.charCodeAt(s+2)),s+=2),!t0r(c)){if(c===61){n++;continue}if(!e0r(c)||n>0){o=!0;continue}r++}}return o||n>2||n>0&&(r+n)%4!==0||r%4===1?GHe(t):r0r(r)},WHe=(t,e)=>{if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let r=t.indexOf(",");if(r<0)return 0;let n=t.slice(5,r),o=t.slice(r+1);if(/;base64/i.test(n))return e(o);let c=0;for(let u=0,p=o.length;u<p;u++){let f=o.charCodeAt(u);if(f===37&&VHe(o,u,p))c+=1,u+=2;else if(f<128)c+=1;else if(f<2048)c+=2;else if(f>=55296&&f<=56319&&u+1<p){let h=o.charCodeAt(u+1);h>=56320&&h<=57343?(c+=4,u++):c+=3}else c+=3}return c};function oge(t){let e=typeof t=="string"?t.indexOf("#"):-1;return WHe(e===-1?t:t.slice(0,e),n0r)}function YHe(t){return WHe(t,GHe)}var JHe={flush:Ex.default.constants.Z_SYNC_FLUSH,finishFlush:Ex.default.constants.Z_SYNC_FLUSH},i0r={flush:Ex.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ex.default.constants.BROTLI_OPERATION_FLUSH},s0r={flush:Ex.default.constants.ZSTD_e_flush,finishFlush:Ex.default.constants.ZSTD_e_flush},pVe=ht.isFunction(Ex.default.createBrotliDecompress),fVe=ht.isFunction(Ex.default.createZstdDecompress),dVe="gzip, compress, deflate"+(pVe?", br":""),o0r=dVe+(fVe?", zstd":""),KHe=typeof process<"u"&&process.nextTick?process.nextTick.bind(process):ht.asap,{http:a0r,https:c0r}=uVe.default,pge=/https:?/,XHe=Symbol("axios.http.socketListener"),UJ=Symbol("axios.http.currentReq");function u0r(t){let e=this[UJ];e&&!e.destroyed&&e.destroy(t)}var hVe=Symbol("axios.http.installedTunnel"),l0r=new Map,ZHe=new WeakMap,eVe={22:21,24:5};function p0r(t=process.versions&&process.versions.node){if(!t)return!1;let[e,r]=t.split(".").map(n=>Number(n));return!Number.isInteger(e)||!Number.isInteger(r)?!1:e>24?!0:eVe[e]!=null&&r>=eVe[e]}function tVe(t,e=process.versions&&process.versions.node){if(!p0r(e))return!1;let r=t&&t.options;return!!(r&&ht.hasOwnProp(r,"proxyEnv")&&r.proxyEnv!=null)}function f0r(t,e,r){return pge.test(t.protocol)?r||lge.default.globalAgent:e||uge.default.globalAgent}function d0r(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),n=e?ZHe.get(e)||ZHe.set(e,new Map).get(e):l0r,o=n.get(r);if(o)return o;let s=e&&e.options?{...e.options,...t}:t;if(o=new cge.default(s),e&&e.options){let c={...e.options},u=o.callback;o.callback=function(f,h){return u.call(this,f,{...c,...h})}}return o[hVe]=!0,n.set(r,o),o}var rVe=Rc.protocols.map(t=>t+":"),nVe=t=>{if(!ht.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},iVe=(t,[e,r])=>(t.on("end",r).on("error",r),e),h0r=new PHe;function m0r(t,e,r){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.sensitiveHeaders&&t.beforeRedirects.sensitiveHeaders(t,r),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,r)}function g0r(t,e){t&&Object.keys(t).forEach(r=>{e.has(r.toLowerCase())&&delete t[r]})}function A0r(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function mVe(t,e,r,n,o,s,c=!0){let u=e,p=f0r(t,s,o);if(!u&&u!==!1&&c&&!tVe(p)){let f=eHe(r);f&&(sge(r)||(u=new URL(f)))}if(n&&t.headers)for(let f of Object.keys(t.headers))f.toLowerCase()==="proxy-authorization"&&delete t.headers[f];if(n&&t.agent&&t.agent[hVe]&&(t.agent=void 0),u){let f=u instanceof URL,h=I=>f||ht.hasOwnProp(u,I)?u[I]:void 0,g=h("username"),y=h("password"),b=ht.hasOwnProp(u,"auth")?u.auth:void 0;if(g&&(b=(g||"")+":"+(y||"")),b){let I=typeof b=="object",S=I&&ht.hasOwnProp(b,"username")?b.username:void 0,k=I&&ht.hasOwnProp(b,"password")?b.password:void 0;if(!!(S||k))b=(S||"")+":"+(k||"");else if(I)throw new Yr("Invalid proxy authorization",Yr.ERR_BAD_OPTION,{proxy:u})}if(pge.test(t.protocol)){if(!(o instanceof cge.default)){let I=h("hostname")||h("host"),S=h("port"),k=h("protocol"),R=k?k.includes(":")?k:`${k}:`:"http:",M=I&&I.includes(":")&&!I.startsWith("[")?`[${I}]`:I,Q=new URL(`${R}//${M}${S?":"+S:""}`),V={protocol:Q.protocol,hostname:Q.hostname.replace(/^\[|\]$/g,""),port:Q.port,auth:b&&typeof b=="string"?b:void 0};Q.protocol==="https:"&&(V.ALPNProtocols=["http/1.1"]);let re=d0r(V,o);t.agent=re,t.agents&&(t.agents.https=re)}}else{if(b){let R=Buffer.from(b,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+R}let I=!1;for(let R of Object.keys(t.headers))if(R.toLowerCase()==="host"){I=!0;break}I||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let S=h("hostname")||h("host");t.hostname=S,t.host=S,t.port=h("port"),t.path=r;let k=h("protocol");k&&(t.protocol=k.includes(":")?k:`${k}:`)}}return t.beforeRedirects.proxy=function(h){mVe(h,e,h.href,!0,o,s,c)},!!(u||e!==!1&&c&&tVe(p))}var y0r=typeof process<"u"&&ht.kindOf(process)==="process",v0r=t=>new Promise((e,r)=>{let n,o,s=(p,f)=>{o||(o=!0,n&&n(p,f))},c=p=>{s(p),e(p)},u=p=>{s(p,!0),r(p)};t(c,u,p=>n=p).catch(u)}),x0r=({address:t,family:e})=>{if(!ht.isString(t))throw new Yr("address must be a string",Yr.ERR_BAD_OPTION_VALUE);return{address:t,family:e||(t.indexOf(".")<0?6:4)}},sVe=(t,e)=>x0r(ht.isObject(t)?t:{address:t,family:e}),oVe=new WeakMap,b0r=t=>{let e=oVe.get(t);if(e)return e;let r=RHe(t,n=>ht.isArray(n)?n:[n]);return e=(n,o,s)=>{r(n,o,(c,u,p)=>{if(c)return s(c);let f;try{f=ht.isArray(u)?u.map(h=>sVe(h)):[sVe(u,p)]}catch(h){return s(h)}o.all?s(c,f):s(c,f[0].address,f[0].family)})},oVe.set(t,e),e},E0r={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:o}=t,s=h0r.getSession(r,n),{HTTP2_HEADER_SCHEME:c,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:p,HTTP2_HEADER_STATUS:f}=aVe.default.constants,h={[c]:t.protocol.replace(":",""),[u]:t.method,[p]:t.path};ht.forEach(o,(y,b)=>{b.charAt(0)!==":"&&(h[b]=y)});let g=s.request(h);return g.once("response",y=>{let b=g;y=Object.assign({},y);let A=y[f];delete y[f],b.headers=y,b.statusCode=+A,e(b)}),g}},gVe=y0r&&function(e){return v0r(async function(n,o,s){let c=Pe=>ht.getSafeProp(e,Pe),u=c("transitional")||PT,p=c("data"),f=c("lookup"),h=c("family"),g=c("httpVersion");g===void 0&&(g=1);let y=g,b=c("http2Options"),A=c("httpAgent"),I=c("httpsAgent"),S=c("proxy"),k=c("responseType"),R=c("responseEncoding"),M=c("socketPath"),Q=c("method").toUpperCase(),V=c("maxRedirects"),re=c("maxBodyLength"),X=c("maxContentLength"),xe=c("decompress"),le,he=!1,ne,be;try{g=+g}catch{throw new Yr("Invalid protocol version: value is not a number",Yr.ERR_BAD_OPTION_VALUE,e)}if(Number.isNaN(g))throw new Yr(`Invalid protocol version: '${y}' is not a number`,Yr.ERR_BAD_OPTION_VALUE,e);if(g!==1&&g!==2)throw new Yr(`Unsupported protocol version '${g}'`,Yr.ERR_BAD_OPTION_VALUE,e);let ae=g===2;f&&(f=b0r(f));let H=new lVe.EventEmitter;function me(Pe){try{H.emit("abort",!Pe||Pe.type?new bx(null,e,ne):Pe)}catch{}}function Ce(){be&&(clearTimeout(be),be=null)}function Te(){let Pe=c("timeout"),st=Pe?"timeout of "+Pe+"ms exceeded":"timeout exceeded",It=c("timeoutErrorMessage");return It&&(st=It),new Yr(st,u.clarifyTimeoutError?Yr.ETIMEDOUT:Yr.ECONNABORTED,e,ne)}H.once("abort",o);let ze=()=>{Ce(),e.cancelToken&&e.cancelToken.unsubscribe(me),e.signal&&e.signal.removeEventListener("abort",me),H.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(me),e.signal&&(e.signal.aborted?me():e.signal.addEventListener("abort",me))),s((Pe,st)=>{if(le=!0,Ce(),st){he=!0,ze();return}let{data:It}=Pe;if(It instanceof Ub.default.Readable||It instanceof Ub.default.Duplex){let Sr=Ub.default.finished(It,()=>{Sr(),ze()})}else ze()});let kt=YR(c("baseURL"),c("url"),c("allowAbsoluteUrls"),e),Tt=M?"http://localhost":Rc.hasBrowserEnv?Rc.origin:void 0,ut=new URL(kt,Tt),qe=ut.protocol||rVe[0];if(qe==="data:"){if(X>-1){let st=String(c("url")||kt||"");if(YHe(st)>X)return o(new Yr("maxContentLength size of "+X+" exceeded",Yr.ERR_BAD_RESPONSE,e))}let Pe;if(Q!=="GET")return K_(n,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{Pe=Jme(c("url"),k==="blob",{Blob:e.env&&e.env.Blob})}catch(st){throw Yr.from(st,Yr.ERR_BAD_REQUEST,e)}return k==="text"?(Pe=Pe.toString(R),(!R||R==="utf8")&&(Pe=ht.stripBOM(Pe))):k==="stream"&&(Pe=Ub.default.Readable.from(Pe)),K_(n,o,{data:Pe,status:200,statusText:"OK",headers:new Ol,config:e})}if(rVe.indexOf(qe)===-1)return o(new Yr("Unsupported protocol "+qe,Yr.ERR_BAD_REQUEST,e));let Ke=Ol.from(e.headers).normalize();Ke.set("User-Agent","axios/"+U2,!1);let{onUploadProgress:rt,onDownloadProgress:je}=e,ft=e.maxRate,gt,Gt;if(ht.isSpecCompliantForm(p)){let Pe=Ke.getContentType(/boundary=([-_\w\d]{10,70})/i);p=IHe(p,st=>{Ke.set(st)},{tag:`axios-${U2}-boundary`,boundary:Pe&&Pe[1]||void 0})}else if(ht.isFormData(p)&&ht.isFunction(p.getHeaders)&&p.getHeaders!==Object.prototype.getHeaders){if(IU(Ke,p.getHeaders(),c("formDataHeaderPolicy")),!Ke.hasContentLength())try{let Pe=await cVe.default.promisify(p.getLength).call(p);Number.isFinite(Pe)&&Pe>=0&&Ke.setContentLength(Pe)}catch{}}else if(ht.isBlob(p)||ht.isFile(p))p.size&&Ke.setContentType(p.type||"application/octet-stream"),Ke.setContentLength(p.size||0),p=Ub.default.Readable.from(qJ(p));else if(p&&!ht.isStream(p)){if(!Buffer.isBuffer(p))if(ht.isArrayBuffer(p))p=Buffer.from(new Uint8Array(p));else if(ht.isString(p))p=Buffer.from(p,"utf-8");else return o(new Yr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Yr.ERR_BAD_REQUEST,e));if(Ke.setContentLength(p.length,!1),re>-1&&p.length>re)return o(new Yr("Request body larger than maxBodyLength limit",Yr.ERR_BAD_REQUEST,e))}let jr=ht.toFiniteNumber(Ke.getContentLength());ht.isArray(ft)?(gt=ft[0],Gt=ft[1]):gt=Gt=ft,p&&(rt||gt)&&(ht.isStream(p)||(p=Ub.default.Readable.from(p,{objectMode:!1})),p=Ub.default.pipeline([p,new Zme({maxRate:ht.toFiniteNumber(gt)})],ht.noop),rt&&p.on("progress",iVe(p,t3(jr,z2(r3(rt,KHe),!1,3)))));let dr,sr=c("auth");if(sr){let Pe=ht.getSafeProp(sr,"username")||"",st=ht.getSafeProp(sr,"password")||"";dr=Pe+":"+st}if(!dr&&(ut.username||ut.password)){let Pe=nVe(ut.username),st=nVe(ut.password);dr=Pe+":"+st}dr&&Ke.delete("authorization");let O;try{O=WR(ut.pathname+ut.search,c("params"),c("paramsSerializer")).replace(/^\?/,"")}catch(Pe){return o(Yr.from(Pe,Yr.ERR_BAD_REQUEST,e,null,null,{url:c("url"),exists:!0}))}Ke.set("Accept-Encoding",ht.hasOwnProp(u,"advertiseZstdAcceptEncoding")&&u.advertiseZstdAcceptEncoding===!0?o0r:dVe,!1),ae&&f&&(b=Object.assign(Object.create(null),b,{lookup:f}));let We=Object.assign(Object.create(null),{path:O,method:Q,headers:z4(Ke),agents:{http:A,https:I},auth:dr,protocol:qe,family:h,beforeRedirect:m0r,beforeRedirects:Object.create(null),http2Options:b,createConnection:void 0});!ht.isUndefined(f)&&(We.lookup=f);let Ze=!1;if(M){if(typeof M!="string")return o(new Yr("socketPath must be a string",Yr.ERR_BAD_OPTION_VALUE,e));let Pe=c("allowedSocketPaths");if(Pe!=null){let st=Array.isArray(Pe)?Pe:[Pe],It=(0,age.resolve)(M);if(!st.some(Tr=>typeof Tr=="string"&&(0,age.resolve)(Tr)===It))return o(new Yr(`socketPath "${M}" is not permitted by allowedSocketPaths`,Yr.ERR_BAD_OPTION_VALUE,e))}We.socketPath=M}else We.hostname=ut.hostname.startsWith("[")?ut.hostname.slice(1,-1):ut.hostname,We.port=ut.port,Ze=mVe(We,S,qe+"//"+ut.hostname+(ut.port?":"+ut.port:"")+We.path,!1,I,A,!ae);let Be,Ie=!1,tt=!1,Ye=pge.test(We.protocol);if(We.agent==null&&(We.agent=Ye?I:A),ae){if(Ze)return o(new Yr("HTTP/2 requests with a proxy are not supported",Yr.ERR_NOT_SUPPORT,e));Be=E0r}else{let Pe=c("transport");if(Pe)Be=Pe;else if(V===0)Be=Ye?lge.default:uge.default,Ie=!0;else{tt=!0,We.sensitiveHeaders=[],V&&(We.maxRedirects=V);let st=c("beforeRedirect");if(st&&(We.beforeRedirects.config=st),dr){let Sr=ut.origin,Tr=dr;We.beforeRedirects.auth=function(Hn){try{new URL(Hn.href).origin===Sr&&(Hn.auth=Tr)}catch{}}}let It=c("sensitiveHeaders");if(It!=null){if(!ht.isArray(It))return o(new Yr("sensitiveHeaders must be an array of strings",Yr.ERR_BAD_OPTION_VALUE,e));let Sr=new Set;for(let Tr of It){if(!ht.isString(Tr))return o(new Yr("sensitiveHeaders must be an array of strings",Yr.ERR_BAD_OPTION_VALUE,e));Sr.add(Tr.toLowerCase())}Sr.size&&(We.sensitiveHeaders=Array.from(Sr),We.beforeRedirects.sensitiveHeaders=function(Jn,Hn){A0r(Jn,Hn)||g0r(Jn.headers,Sr)})}Be=Ye?c0r:a0r}}re>-1?We.maxBodyLength=re:We.maxBodyLength=1/0,We.insecureHTTPParser=!!c("insecureHTTPParser"),ne=Be.request(We,function(st){if(Ce(),ne.destroyed)return;let It=[st],Sr=ht.toFiniteNumber(st.headers["content-length"]);if(je||Gt){let kr=new Zme({maxRate:ht.toFiniteNumber(Gt)});je&&kr.on("progress",iVe(kr,t3(Sr,z2(r3(je,KHe),!0,3)))),It.push(kr)}let Tr=st,Jn=st.req||ne;if(xe!==!1&&st.headers["content-encoding"])switch((Q==="HEAD"||st.statusCode===204)&&delete st.headers["content-encoding"],(st.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":It.push(Ex.default.createUnzip(JHe)),delete st.headers["content-encoding"];break;case"deflate":It.push(new THe),It.push(Ex.default.createUnzip(JHe)),delete st.headers["content-encoding"];break;case"br":pVe&&(It.push(Ex.default.createBrotliDecompress(i0r)),delete st.headers["content-encoding"]);break;case"zstd":fVe&&(It.push(Ex.default.createZstdDecompress(s0r)),delete st.headers["content-encoding"]);break}Tr=It.length>1?Ub.default.pipeline(It,ht.noop):It[0];let Hn={status:st.statusCode,statusText:st.statusMessage,headers:new Ol(st.headers),config:e,request:Jn};if(k==="stream"){if(X>-1){let kr=X,Ls=Tr;async function*W(){let Bt=0;for await(let or of Ls){if(Bt+=or.length,Bt>kr)throw new Yr("maxContentLength size of "+kr+" exceeded",Yr.ERR_BAD_RESPONSE,e,Jn);yield or}}Tr=Ub.default.Readable.from(W(),{objectMode:!1})}Hn.data=Tr,K_(n,o,Hn)}else{let kr=[],Ls=0;Tr.on("data",function(Bt){kr.push(Bt),Ls+=Bt.length,X>-1&&Ls>X&&(he=!0,Tr.destroy(),me(new Yr("maxContentLength size of "+X+" exceeded",Yr.ERR_BAD_RESPONSE,e,Jn)))}),Tr.on("aborted",function(){if(he)return;let Bt=new Yr("stream has been aborted",Yr.ERR_BAD_RESPONSE,e,Jn,Hn);Tr.destroy(Bt),o(Bt)}),Tr.on("error",function(Bt){he||o(Yr.from(Bt,null,e,Jn,Hn))}),Tr.on("end",function(){try{let Bt=kr.length===1?kr[0]:Buffer.concat(kr);k!=="arraybuffer"&&(Bt=Bt.toString(R),(!R||R==="utf8")&&(Bt=ht.stripBOM(Bt))),Hn.data=Bt}catch(Bt){return o(Yr.from(Bt,null,e,Hn.request,Hn))}K_(n,o,Hn)})}H.once("abort",kr=>{Tr.destroyed||(Tr.emit("error",kr),Tr.destroy())})}),H.once("abort",Pe=>{ne.close?ne.close():ne.destroy(Pe)}),ne.on("error",function(st){o(Yr.from(st,null,e,ne))});let Ae=new Set;if(ne.on("socket",function(st){typeof st.setKeepAlive=="function"&&st.setKeepAlive(!0,1e3*60),st[XHe]||(st.on("error",u0r),st[XHe]=!0),st[UJ]=ne,Ae.add(st)}),ne.once("close",function(){Ce();for(let st of Ae)st[UJ]===ne&&(st[UJ]=null);Ae.clear()}),c("timeout")){let Pe=parseInt(c("timeout"),10);if(Number.isNaN(Pe)){me(new Yr("error trying to parse `config.timeout` to int",Yr.ERR_BAD_OPTION_VALUE,e,ne));return}let st=function(){le||me(Te())};Ie&&Pe>0&&(be=setTimeout(st,Pe)),ne.setTimeout(Pe,st)}else ne.setTimeout(0);if(ht.isStream(p)){let Pe=!1,st=!1;p.on("end",()=>{Pe=!0}),p.once("error",Sr=>{st=!0,ne.destroy(Sr)}),p.on("close",()=>{!Pe&&!st&&me(new bx("Request stream has been aborted",e,ne))});let It=p;if(re>-1&&!tt){let Sr=re,Tr=0;It=Ub.default.pipeline([p,new Ub.default.Transform({transform(Jn,Hn,kr){if(Tr+=Jn.length,Tr>Sr)return kr(new Yr("Request body larger than maxBodyLength limit",Yr.ERR_BAD_REQUEST,e,ne));kr(null,Jn)}})],ht.noop),It.on("error",Jn=>{ne.destroyed||ne.destroy(Jn)})}It.pipe(ne)}else p&&ne.write(p),ne.end()})};var AVe=Rc.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Rc.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Rc.origin),Rc.navigator&&/(msie|trident)/i.test(Rc.navigator.userAgent)):()=>!0;var yVe=Rc.hasStandardBrowserEnv?{write(t,e,r,n,o,s,c){if(typeof document>"u")return;let u=[`${t}=${encodeURIComponent(e)}`];ht.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),ht.isString(n)&&u.push(`path=${n}`),ht.isString(o)&&u.push(`domain=${o}`),s===!0&&u.push("secure"),ht.isString(c)&&u.push(`SameSite=${c}`),document.cookie=u.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let r=0;r<e.length;r++){let n=e[r].replace(/^\s+/,""),o=n.indexOf("=");if(o!==-1&&n.slice(0,o)===t)try{return decodeURIComponent(n.slice(o+1))}catch{return n.slice(o+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var vVe=t=>t instanceof Ol?{...t}:t,w0r=t=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(t).concat(Object.getOwnPropertySymbols(t).filter(e=>Object.getOwnPropertyDescriptor(t,e).enumerable)):Object.keys(t);function j1(t,e){t=t||{},e=e||{};let r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(h,g,y,b){return ht.isPlainObject(h)&&ht.isPlainObject(g)?ht.merge.call({caseless:b},h,g):ht.isPlainObject(g)?ht.merge({},g):ht.isArray(g)?g.slice():g}function o(h,g,y,b){if(ht.isUndefined(g)){if(!ht.isUndefined(h))return n(void 0,h,y,b)}else return n(h,g,y,b)}function s(h,g){if(!ht.isUndefined(g))return n(void 0,g)}function c(h,g){if(ht.isUndefined(g)){if(!ht.isUndefined(h))return n(void 0,h)}else return n(void 0,g)}function u(h){let g=ht.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!ht.isUndefined(g))if(ht.isPlainObject(g)){if(ht.hasOwnProp(g,h))return g[h]}else return;let y=ht.hasOwnProp(t,"transitional")?t.transitional:void 0;if(ht.isPlainObject(y)&&ht.hasOwnProp(y,h))return y[h]}function p(h,g,y){if(ht.hasOwnProp(e,y))return n(h,g);if(ht.hasOwnProp(t,y))return n(void 0,h)}let f={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutErrorMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,allowedSocketPaths:c,responseEncoding:c,validateStatus:p,headers:(h,g,y)=>o(vVe(h),vVe(g),y,!0)};return ht.forEach(w0r({...t,...e}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;let y=ht.hasOwnProp(f,g)?f[g]:o,b=ht.hasOwnProp(t,g)?t[g]:void 0,A=ht.hasOwnProp(e,g)?e[g]:void 0,I=y(b,A,g);ht.isUndefined(I)&&y!==p||(r[g]=I)}),ht.hasOwnProp(e,"validateStatus")&&ht.isUndefined(e.validateStatus)&&u("validateStatusUndefinedResolves")===!1&&(ht.hasOwnProp(t,"validateStatus")?r.validateStatus=n(void 0,t.validateStatus):delete r.validateStatus),r}var _0r=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16)));function S0r(t){let e=j1({},t),r=y=>ht.hasOwnProp(e,y)?e[y]:void 0,n=r("data"),o=r("withXSRFToken"),s=r("xsrfHeaderName"),c=r("xsrfCookieName"),u=r("headers"),p=r("auth"),f=r("baseURL"),h=r("allowAbsoluteUrls"),g=r("url");if(e.headers=u=Ol.from(u),e.url=WR(YR(f,g,h,e),r("params"),r("paramsSerializer")),p){let y=ht.getSafeProp(p,"username")||"",b=ht.getSafeProp(p,"password")||"";try{u.set("Authorization","Basic "+btoa(y+":"+(b?_0r(b):"")))}catch(A){throw Yr.from(A,Yr.ERR_BAD_OPTION_VALUE,t)}}if(ht.isFormData(n)){let y=ht.getSafeProp(n,"getHeaders");Rc.hasStandardBrowserEnv||Rc.hasStandardBrowserWebWorkerEnv||ht.isReactNative(n)?u.setContentType(void 0):ht.isFunction(y)&&IU(u,y.call(n),r("formDataHeaderPolicy"))}if(Rc.hasStandardBrowserEnv&&(ht.isFunction(o)&&(o=o(e)),o===!0||o==null&&AVe(e.url))){let b=s&&c&&yVe.read(c);b&&u.set(s,b)}return e}var zJ=S0r;var C0r=typeof XMLHttpRequest<"u",xVe=C0r&&function(t){return new Promise(function(r,n){let o=zJ(t),s=o.data,c=Ol.from(o.headers).normalize(),{responseType:u,onUploadProgress:p,onDownloadProgress:f}=o,h,g,y,b,A,I;function S(){b&&b(),A&&A(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function R(Q){if(!k)return;if(k.status===0&&(eO(yU(o.url))||eO(Rc.origin))!=="file"&&!(k.responseURL&&k.responseURL.startsWith("file:"))){n(new Yr("Request aborted",Yr.ECONNABORTED,t,k)),S(),k=null;return}try{Q?I&&I(Q):A&&A()}catch(xe){setTimeout(()=>{throw xe})}if(!k)return;let V=Ol.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),X={data:!u||u==="text"||u==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:V,config:t,request:k};K_(function(le){r(le),S()},function(le){n(le),S()},X),k=null}"onloadend"in k?k.onloadend=R:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.startsWith("file:"))||setTimeout(R)},k.onabort=function(){k&&(n(new Yr("Request aborted",Yr.ECONNABORTED,t,k)),S(),k=null)},k.onerror=function(V){let re=V&&V.message?V.message:"Network Error",X=new Yr(re,Yr.ERR_NETWORK,t,k);X.event=V||null,n(X),S(),k=null},k.ontimeout=function(){let V=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",re=o.transitional||PT;o.timeoutErrorMessage&&(V=o.timeoutErrorMessage),n(new Yr(V,re.clarifyTimeoutError?Yr.ETIMEDOUT:Yr.ECONNABORTED,t,k)),S(),k=null},s===void 0&&c.setContentType(null),"setRequestHeader"in k&&ht.forEach(z4(c),function(V,re){k.setRequestHeader(re,V)}),ht.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),u&&u!=="json"&&(k.responseType=o.responseType),f&&([y,A,I]=z2(f,!0),k.addEventListener("progress",y)),p&&k.upload&&([g,b]=z2(p),k.upload.addEventListener("progress",g),k.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(h=Q=>{k&&(n(!Q||Q.type?new bx(null,t,k):Q),k.abort(),S(),k=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));let M=eO(o.url);if(M&&!Rc.protocols.includes(M)){n(new Yr("Unsupported protocol "+M+":",Yr.ERR_BAD_REQUEST,t)),S();return}k.send(s||null)})};var I0r=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let r=new AbortController,n=!1,o=function(p){if(!n){n=!0,c();let f=p instanceof Error?p:this.reason;r.abort(f instanceof Yr?f:new bx(f instanceof Error?f.message:f))}},s=e&&setTimeout(()=>{s=null,o(new Yr(`timeout of ${e}ms exceeded`,Yr.ETIMEDOUT))},e),c=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(p=>{p.unsubscribe?p.unsubscribe(o):p.removeEventListener("abort",o)}),t=null)};t.forEach(p=>{if(!n){if(p.aborted){o.call(p);return}p.addEventListener("abort",o,{once:!0})}});let{signal:u}=r;return u.unsubscribe=()=>ht.asap(c),u},bVe=I0r;var k0r=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},T0r=async function*(t,e){for await(let r of B0r(t))yield*k0r(r,e)},B0r=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},fge=(t,e,r,n)=>{let o=T0r(t,e),s=0,c,u=p=>{c||(c=!0,n&&n(p))};return new ReadableStream({async pull(p){try{let{done:f,value:h}=await o.next();if(f){u(),p.close();return}let g=h.byteLength;if(r){let y=s+=g;r(y)}p.enqueue(new Uint8Array(h))}catch(f){throw u(f),f}},cancel(p){return u(p),o.return()}},{highWaterMark:2})};var EVe=64*1024,D0r={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:$J}=ht,P0r=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,r)=>String.fromCharCode(parseInt(r,16))),wVe=t=>{if(!ht.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},_Ve=(t,...e)=>{try{return!!t(...e)}catch{return!1}},R0r=t=>{let e=t.indexOf("://"),r=t;return e!==-1&&(r=r.slice(e+3)),r.includes("@")||r.includes(":")},O0r=t=>{let e=ht.global!==void 0&&ht.global!==null?ht.global:globalThis,{ReadableStream:r,TextEncoder:n}=e;t=ht.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:o,Request:s,Response:c}=t,u=o?$J(o):typeof fetch=="function",p=$J(s),f=$J(c);if(!u)return!1;let h=u&&$J(r),g=u&&(typeof n=="function"?(k=>R=>k.encode(R))(new n):async k=>new Uint8Array(await new s(k).arrayBuffer())),y=p&&h&&_Ve(()=>{let k=!1,R=new s(Rc.origin,{body:new r,method:"POST",get duplex(){return k=!0,"half"}}),M=R.headers.has("Content-Type");return R.body!=null&&R.body.cancel(),k&&!M}),b=f&&h&&_Ve(()=>ht.isReadableStream(new c("").body)),A={stream:b&&(k=>k.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!A[k]&&(A[k]=(R,M)=>{let Q=R&&R[k];if(Q)return Q.call(R);throw new Yr(`Response type '${k}' is not supported`,Yr.ERR_NOT_SUPPORT,M)})});let I=async k=>{if(k==null)return 0;if(ht.isBlob(k))return k.size;if(ht.isSpecCompliantForm(k))return(await new s(Rc.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(ht.isArrayBufferView(k)||ht.isArrayBuffer(k))return k.byteLength;if(ht.isURLSearchParams(k)&&(k=k+""),ht.isString(k))return(await g(k)).byteLength},S=async(k,R)=>{let M=ht.toFiniteNumber(k.getContentLength());return M==null?I(R):M};return async k=>{let{url:R,method:M,data:Q,signal:V,cancelToken:re,timeout:X,onDownloadProgress:xe,onUploadProgress:le,responseType:he,headers:ne,withCredentials:be="same-origin",fetchOptions:ae,maxContentLength:H,maxBodyLength:me,maxRedirects:Ce}=zJ(k),Te=ht.isNumber(H)&&H>-1,ze=ht.isNumber(me)&&me>-1,kt=gt=>ht.hasOwnProp(k,gt)?k[gt]:void 0,Tt=o||fetch;he=he?(he+"").toLowerCase():"text";let ut=bVe([V,re&&re.toAbortSignal()],X),qe=null,Ke=ut&&ut.unsubscribe&&(()=>{ut.unsubscribe()}),rt,je=null,ft=()=>new Yr("Request body larger than maxBodyLength limit",Yr.ERR_BAD_REQUEST,k,qe);try{let gt,Gt=kt("auth");if(Gt){let Ye=ht.getSafeProp(Gt,"username")||"",Ae=ht.getSafeProp(Gt,"password")||"";gt={username:Ye,password:Ae}}if(R0r(R)){let Ye=new URL(R,Rc.origin);if(!gt&&(Ye.username||Ye.password)){let Ae=wVe(Ye.username),Pe=wVe(Ye.password);gt={username:Ae,password:Pe}}(Ye.username||Ye.password)&&(Ye.username="",Ye.password="",R=Ye.href)}if(gt&&(ne.delete("authorization"),ne.set("Authorization","Basic "+btoa(P0r((gt.username||"")+":"+(gt.password||""))))),Te&&typeof R=="string"&&R.startsWith("data:")&&oge(R)>H)throw new Yr("maxContentLength size of "+H+" exceeded",Yr.ERR_BAD_RESPONSE,k,qe);if(ze&&M!=="get"&&M!=="head"){let Ye=await I(Q);if(typeof Ye=="number"&&isFinite(Ye)&&(rt=Ye,Ye>me))throw ft()}let jr=ze&&(ht.isReadableStream(Q)||ht.isStream(Q)),dr=(Ye,Ae,Pe)=>fge(Ye,EVe,st=>{if(ze&&st>me)throw je=ft();Ae&&Ae(st)},Pe);if(y&&M!=="get"&&M!=="head"&&(le||jr)){if(rt=rt==null?await S(ne,Q):rt,rt!==0||jr){let Ye=new s(R,{method:"POST",body:Q,duplex:"half"}),Ae;if(ht.isFormData(Q)&&(Ae=Ye.headers.get("content-type"))&&ne.setContentType(Ae),Ye.body){let[Pe,st]=le&&t3(rt,z2(r3(le)))||[];Q=dr(Ye.body,Pe,st)}}}else if(jr&&!p&&h&&M!=="get"&&M!=="head")Q=dr(Q);else if(jr&&p&&!y&&M!=="get"&&M!=="head")throw new Yr("Stream request bodies are not supported by the current fetch implementation",Yr.ERR_NOT_SUPPORT,k,qe);ht.isString(be)||(be=be?"include":"omit");let sr=p&&"credentials"in s.prototype;if(ht.isFormData(Q)){let Ye=ne.getContentType();Ye&&/^multipart\/form-data/i.test(Ye)&&!/boundary=/i.test(Ye)&&ne.delete("content-type")}ne.set("User-Agent","axios/"+U2,!1);let O=ae==null?ae:Object.assign(Object.create(null),ae);O&&(delete O.body,delete O.headers,delete O.method,delete O.signal,delete O.duplex,delete O.credentials);let We=Object.assign(Object.create(null),O,{signal:ut,method:M.toUpperCase(),headers:z4(ne.normalize()),body:Q,duplex:"half",credentials:sr?be:void 0});p&&(ht.forEach(D0r,(Ye,Ae)=>{We[Ae]===void 0&&(We[Ae]=Ye)}),We.signal===void 0&&(We.signal=null),We.body===void 0&&(We.body=null)),Ce===0&&(We.redirect="manual",O&&(O.redirect="manual")),qe=p&&new s(R,We);let Ze=await(p?Tt(qe,O):Tt(R,We)),Be=Ol.from(Ze.headers);if(Te){let Ye=ht.toFiniteNumber(Be.getContentLength());if(Ye!=null&&Ye>H)throw new Yr("maxContentLength size of "+H+" exceeded",Yr.ERR_BAD_RESPONSE,k,qe)}let Ie=b&&(he==="stream"||he==="response");if(b&&Ze.body&&(xe||Te||Ie&&Ke)){let Ye={};["status","statusText","headers"].forEach(Tr=>{Ye[Tr]=Ze[Tr]});let Ae=ht.toFiniteNumber(Be.getContentLength()),[Pe,st]=xe&&t3(Ae,z2(r3(xe),!0))||[],It=0,Sr=Tr=>{if(Te&&(It=Tr,It>H))throw new Yr("maxContentLength size of "+H+" exceeded",Yr.ERR_BAD_RESPONSE,k,qe);Pe&&Pe(Tr)};Ze=new c(fge(Ze.body,EVe,Sr,()=>{st&&st(),Ke&&Ke()}),Ye)}he=he||"text";let tt=await A[ht.findKey(A,he)||"text"](Ze,k);if(Te&&!b&&!Ie){let Ye;if(tt!=null&&(typeof tt.byteLength=="number"?Ye=tt.byteLength:typeof tt.size=="number"?Ye=tt.size:typeof tt=="string"&&(Ye=typeof n=="function"?new n().encode(tt).byteLength:tt.length)),typeof Ye=="number"&&Ye>H)throw new Yr("maxContentLength size of "+H+" exceeded",Yr.ERR_BAD_RESPONSE,k,qe)}return!Ie&&Ke&&Ke(),await new Promise((Ye,Ae)=>{K_(Ye,Ae,{data:tt,headers:Ol.from(Ze.headers),status:Ze.status,statusText:Ze.statusText,config:k,request:qe})})}catch(gt){if(Ke&&Ke(),ut&&ut.aborted&&ut.reason instanceof Yr){let Gt=ut.reason;throw Gt.config=k,qe&&(Gt.request=qe),gt!==Gt&&Object.defineProperty(Gt,"cause",{__proto__:null,value:gt,writable:!0,enumerable:!1,configurable:!0}),Gt}if(je)throw qe&&!je.request&&(je.request=qe),je;if(gt instanceof Yr)throw qe&&!gt.request&&(gt.request=qe),gt;if(gt&>.name==="TypeError"&&/Load failed|fetch/i.test(gt.message)){let Gt=new Yr("Network Error",Yr.ERR_NETWORK,k,qe,gt&>.response);throw Object.defineProperty(Gt,"cause",{__proto__:null,value:gt.cause||gt,writable:!0,enumerable:!1,configurable:!0}),Gt}throw Yr.from(gt,gt&>.code,k,qe,gt&>.response)}}},N0r=new Map,dge=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:o}=e,s=[n,o,r],c=s.length,u=c,p,f,h=N0r;for(;u--;)p=s[u],f=h.get(p),f===void 0&&h.set(p,f=u?new Map:O0r(e)),h=f;return f},$di=dge();var hge={http:gVe,xhr:xVe,fetch:{get:dge}};ht.forEach(hge,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var SVe=t=>`- ${t}`,L0r=t=>ht.isFunction(t)||t===null||t===!1;function j0r(t,e){t=ht.isArray(t)?t:[t];let{length:r}=t,n,o,s={};for(let c=0;c<r;c++){n=t[c];let u;if(o=n,!L0r(n)&&(o=hge[(u=String(n)).toLowerCase()],o===void 0))throw new Yr(`Unknown adapter '${u}'`);if(o&&(ht.isFunction(o)||(o=o.get(e))))break;s[u||"#"+c]=o}if(!o){let c=Object.entries(s).map(([p,f])=>`adapter ${p} `+(f===!1?"is not supported by the environment":"is not available in the build")),u=r?c.length>1?`since :
|