ai-cli 0.0.12 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai.mjs DELETED
@@ -1,627 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
3
- var gD=Object.create;var _0=Object.defineProperty;var vD=Object.getOwnPropertyDescriptor;var yD=Object.getOwnPropertyNames;var AD=Object.getPrototypeOf,bD=Object.prototype.hasOwnProperty;var _o=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ud=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lr=(e,t)=>{for(var r in t)_0(e,r,{get:t[r],enumerable:!0})},xD=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yD(t))!bD.call(e,n)&&n!==r&&_0(e,n,{get:()=>t[n],enumerable:!(o=vD(t,n))||o.enumerable});return e};var Ut=(e,t,r)=>(r=e!=null?gD(AD(e)):{},xD(t||!e||!e.__esModule?_0(r,"default",{value:e,enumerable:!0}):r,e));var d1=Ce((cW,l1)=>{var I0=Symbol("arg flag"),en=class e extends Error{constructor(t,r){super(t),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,e.prototype)}};function Yu(e,{argv:t=process.argv.slice(2),permissive:r=!1,stopAtPositional:o=!1}={}){if(!e)throw new en("argument specification object is required","ARG_CONFIG_NO_SPEC");let n={_:[]},i={},a={};for(let s of Object.keys(e)){if(!s)throw new en("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(s[0]!=="-")throw new en(`argument key must start with '-' but found: '${s}'`,"ARG_CONFIG_NONOPT_KEY");if(s.length===1)throw new en(`argument key must have a name; singular '-' keys are not allowed: ${s}`,"ARG_CONFIG_NONAME_KEY");if(typeof e[s]=="string"){i[s]=e[s];continue}let c=e[s],l=!1;if(Array.isArray(c)&&c.length===1&&typeof c[0]=="function"){let[d]=c;c=(f,p,m=[])=>(m.push(d(f,p,m[m.length-1])),m),l=d===Boolean||d[I0]===!0}else if(typeof c=="function")l=c===Boolean||c[I0]===!0;else throw new en(`type missing or not a function or valid array type: ${s}`,"ARG_CONFIG_VAD_TYPE");if(s[1]!=="-"&&s.length>2)throw new en(`short argument keys (with a single hyphen) must have only one character: ${s}`,"ARG_CONFIG_SHORTOPT_TOOLONG");a[s]=[c,l]}for(let s=0,c=t.length;s<c;s++){let l=t[s];if(o&&n._.length>0){n._=n._.concat(t.slice(s));break}if(l==="--"){n._=n._.concat(t.slice(s+1));break}if(l.length>1&&l[0]==="-"){let d=l[1]==="-"||l.length===2?[l]:l.slice(1).split("").map(f=>`-${f}`);for(let f=0;f<d.length;f++){let p=d[f],[m,v]=p[1]==="-"?p.split(/=(.*)/,2):[p,void 0],g=m;for(;g in i;)g=i[g];if(!(g in a))if(r){n._.push(p);continue}else throw new en(`unknown or unexpected option: ${m}`,"ARG_UNKNOWN_OPTION");let[y,E]=a[g];if(!E&&f+1<d.length)throw new en(`option requires argument (but was followed by another short argument): ${m}`,"ARG_MISSING_REQUIRED_SHORTARG");if(E)n[g]=y(!0,g,n[g]);else if(v===void 0){if(t.length<s+2||t[s+1].length>1&&t[s+1][0]==="-"&&!(t[s+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(y===Number||typeof BigInt<"u"&&y===BigInt))){let I=m===g?"":` (alias for ${g})`;throw new en(`option requires argument: ${m}${I}`,"ARG_MISSING_REQUIRED_LONGARG")}n[g]=y(t[s+1],g,n[g]),++s}else n[g]=y(v,g,n[g])}}else n._.push(l)}return n}Yu.flag=e=>(e[I0]=!0,e);Yu.COUNT=Yu.flag((e,t,r)=>(r||0)+1);Yu.ArgError=en;l1.exports=Yu});var Lx=Ce((QQ,DT)=>{"use strict";var Ux=Object.defineProperty,tU=Object.getOwnPropertyDescriptor,rU=Object.getOwnPropertyNames,nU=Object.prototype.hasOwnProperty,oU=(e,t)=>{for(var r in t)Ux(e,r,{get:t[r],enumerable:!0})},iU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rU(t))!nU.call(e,n)&&n!==r&&Ux(e,n,{get:()=>t[n],enumerable:!(o=tU(t,n))||o.enumerable});return e},aU=e=>iU(Ux({},"__esModule",{value:!0}),e),RT={};oU(RT,{SYMBOL_FOR_REQ_CONTEXT:()=>OT,getContext:()=>sU});DT.exports=aU(RT);var OT=Symbol.for("@vercel/request-context");function sU(){return globalThis[OT]?.get?.()??{}}});var Hc=Ce((YQ,MT)=>{"use strict";var zx=Object.defineProperty,uU=Object.getOwnPropertyDescriptor,cU=Object.getOwnPropertyNames,lU=Object.prototype.hasOwnProperty,dU=(e,t)=>{for(var r in t)zx(e,r,{get:t[r],enumerable:!0})},pU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cU(t))!lU.call(e,n)&&n!==r&&zx(e,n,{get:()=>t[n],enumerable:!(o=uU(t,n))||o.enumerable});return e},fU=e=>pU(zx({},"__esModule",{value:!0}),e),PT={};dU(PT,{VercelOidcTokenError:()=>Fx});MT.exports=fU(PT);var Fx=class extends Error{constructor(t,r){super(t),this.name="VercelOidcTokenError",this.cause=r}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}});var FT=Ce((XQ,LT)=>{"use strict";var mU=Object.create,Df=Object.defineProperty,hU=Object.getOwnPropertyDescriptor,gU=Object.getOwnPropertyNames,vU=Object.getPrototypeOf,yU=Object.prototype.hasOwnProperty,AU=(e,t)=>{for(var r in t)Df(e,r,{get:t[r],enumerable:!0})},jT=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of gU(t))!yU.call(e,n)&&n!==r&&Df(e,n,{get:()=>t[n],enumerable:!(o=hU(t,n))||o.enumerable});return e},Zx=(e,t,r)=>(r=e!=null?mU(vU(e)):{},jT(t||!e||!e.__esModule?Df(r,"default",{value:e,enumerable:!0}):r,e)),bU=e=>jT(Df({},"__esModule",{value:!0}),e),UT={};AU(UT,{findRootDir:()=>SU,getUserDataDir:()=>_U});LT.exports=bU(UT);var Wc=Zx(_o("path")),xU=Zx(_o("fs")),Bx=Zx(_o("os")),wU=Hc();function SU(){try{let e=process.cwd();for(;e!==Wc.default.dirname(e);){let t=Wc.default.join(e,".vercel");if(xU.default.existsSync(t))return e;e=Wc.default.dirname(e)}}catch{throw new wU.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function _U(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(Bx.default.platform()){case"darwin":return Wc.default.join(Bx.default.homedir(),"Library/Application Support");case"linux":return Wc.default.join(Bx.default.homedir(),".local/share");case"win32":return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}});var WT=Ce((eY,HT)=>{"use strict";var IU=Object.create,Pf=Object.defineProperty,EU=Object.getOwnPropertyDescriptor,kU=Object.getOwnPropertyNames,TU=Object.getPrototypeOf,CU=Object.prototype.hasOwnProperty,$U=(e,t)=>{for(var r in t)Pf(e,r,{get:t[r],enumerable:!0})},zT=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of kU(t))!CU.call(e,n)&&n!==r&&Pf(e,n,{get:()=>t[n],enumerable:!(o=EU(t,n))||o.enumerable});return e},BT=(e,t,r)=>(r=e!=null?IU(TU(e)):{},zT(t||!e||!e.__esModule?Pf(r,"default",{value:e,enumerable:!0}):r,e)),NU=e=>zT(Pf({},"__esModule",{value:!0}),e),ZT={};$U(ZT,{isValidAccessToken:()=>PU,readAuthConfig:()=>OU,writeAuthConfig:()=>DU});HT.exports=NU(ZT);var qc=BT(_o("fs")),GT=BT(_o("path")),RU=Mf();function VT(){let e=(0,RU.getVercelDataDir)();if(!e)throw new Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return GT.join(e,"auth.json")}function OU(){try{let e=VT();if(!qc.existsSync(e))return null;let t=qc.readFileSync(e,"utf8");return t?JSON.parse(t):null}catch{return null}}function DU(e){let t=VT(),r=GT.dirname(t);qc.existsSync(r)||qc.mkdirSync(r,{mode:504,recursive:!0}),qc.writeFileSync(t,JSON.stringify(e,null,2),{mode:384})}function PU(e){if(!e.token)return!1;if(typeof e.expiresAt!="number")return!0;let t=Math.floor(Date.now()/1e3);return e.expiresAt>=t}});var QT=Ce((tY,KT)=>{"use strict";var Hx=Object.defineProperty,MU=Object.getOwnPropertyDescriptor,jU=Object.getOwnPropertyNames,UU=Object.prototype.hasOwnProperty,LU=(e,t)=>{for(var r in t)Hx(e,r,{get:t[r],enumerable:!0})},FU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of jU(t))!UU.call(e,n)&&n!==r&&Hx(e,n,{get:()=>t[n],enumerable:!(o=MU(t,n))||o.enumerable});return e},zU=e=>FU(Hx({},"__esModule",{value:!0}),e),qT={};LU(qT,{processTokenResponse:()=>HU,refreshTokenRequest:()=>VU});KT.exports=zU(qT);var Gx=_o("os"),BU="https://vercel.com",ZU="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",JT=`@vercel/oidc node-${process.version} ${(0,Gx.platform)()} (${(0,Gx.arch)()}) ${(0,Gx.hostname)()}`,Vx=null;async function GU(){if(Vx)return Vx;let e=`${BU}/.well-known/openid-configuration`,t=await fetch(e,{headers:{"user-agent":JT}});if(!t.ok)throw new Error("Failed to discover OAuth endpoints");let r=await t.json();if(!r||typeof r.token_endpoint!="string")throw new Error("Invalid OAuth discovery response");let o=r.token_endpoint;return Vx=o,o}async function VU(e){let t=await GU();return await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":JT},body:new URLSearchParams({client_id:ZU,grant_type:"refresh_token",...e})})}async function HU(e){let t=await e.json();if(!e.ok){let r=typeof t=="object"&&t&&"error"in t?String(t.error):"Token refresh failed";return[new Error(r)]}return typeof t!="object"||t===null?[new Error("Invalid token response")]:typeof t.access_token!="string"?[new Error("Missing access_token in response")]:t.token_type!=="Bearer"?[new Error("Invalid token_type in response")]:typeof t.expires_in!="number"?[new Error("Missing expires_in in response")]:[null,t]}});var Mf=Ce((rY,rC)=>{"use strict";var WU=Object.create,jf=Object.defineProperty,qU=Object.getOwnPropertyDescriptor,JU=Object.getOwnPropertyNames,KU=Object.getPrototypeOf,QU=Object.prototype.hasOwnProperty,YU=(e,t)=>{for(var r in t)jf(e,r,{get:t[r],enumerable:!0})},XT=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of JU(t))!QU.call(e,n)&&n!==r&&jf(e,n,{get:()=>t[n],enumerable:!(o=qU(t,n))||o.enumerable});return e},eC=(e,t,r)=>(r=e!=null?WU(KU(e)):{},XT(t||!e||!e.__esModule?jf(r,"default",{value:e,enumerable:!0}):r,e)),XU=e=>XT(jf({},"__esModule",{value:!0}),e),tC={};YU(tC,{assertVercelOidcTokenResponse:()=>Wx,findProjectInfo:()=>nL,getTokenPayload:()=>aL,getVercelCliToken:()=>tL,getVercelDataDir:()=>eL,getVercelOidcToken:()=>rL,isExpired:()=>sL,loadToken:()=>iL,saveToken:()=>oL});rC.exports=XU(tC);var Jc=eC(_o("path")),ya=eC(_o("fs")),qs=Hc(),Uf=FT(),Ws=WT(),YT=QT();function eL(){let e="com.vercel.cli",t=(0,Uf.getUserDataDir)();return t?Jc.join(t,e):null}async function tL(){let e=(0,Ws.readAuthConfig)();if(!e)return null;if((0,Ws.isValidAccessToken)(e))return e.token||null;if(!e.refreshToken)return(0,Ws.writeAuthConfig)({}),null;try{let t=await(0,YT.refreshTokenRequest)({refresh_token:e.refreshToken}),[r,o]=await(0,YT.processTokenResponse)(t);if(r||!o)return(0,Ws.writeAuthConfig)({}),null;let n={token:o.access_token,expiresAt:Math.floor(Date.now()/1e3)+o.expires_in};return o.refresh_token&&(n.refreshToken=o.refresh_token),(0,Ws.writeAuthConfig)(n),n.token??null}catch{return(0,Ws.writeAuthConfig)({}),null}}async function rL(e,t,r){let o=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${r?`&teamId=${r}`:""}`,n=await fetch(o,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw new qs.VercelOidcTokenError(`Failed to refresh OIDC token: ${n.statusText}`);let i=await n.json();return Wx(i),i}function Wx(e){if(!e||typeof e!="object")throw new TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||typeof e.token!="string")throw new TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function nL(){let e=(0,Uf.findRootDir)();if(!e)throw new qs.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=Jc.join(e,".vercel","project.json");if(!ya.existsSync(t))throw new qs.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let r=JSON.parse(ya.readFileSync(t,"utf8"));if(typeof r.projectId!="string"&&typeof r.orgId!="string")throw new TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:r.projectId,teamId:r.orgId}}function oL(e,t){let r=(0,Uf.getUserDataDir)();if(!r)throw new qs.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let o=Jc.join(r,"com.vercel.token",`${t}.json`),n=JSON.stringify(e);ya.mkdirSync(Jc.dirname(o),{mode:504,recursive:!0}),ya.writeFileSync(o,n),ya.chmodSync(o,432)}function iL(e){let t=(0,Uf.getUserDataDir)();if(!t)throw new qs.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let r=Jc.join(t,"com.vercel.token",`${e}.json`);if(!ya.existsSync(r))return null;let o=JSON.parse(ya.readFileSync(r,"utf8"));return Wx(o),o}function aL(e){let t=e.split(".");if(t.length!==3)throw new qs.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let r=t[1].replace(/-/g,"+").replace(/_/g,"/"),o=r.padEnd(r.length+(4-r.length%4)%4,"=");return JSON.parse(Buffer.from(o,"base64").toString("utf8"))}function sL(e){return e.exp*1e3<Date.now()}});var iC=Ce((nY,oC)=>{"use strict";var Jx=Object.defineProperty,uL=Object.getOwnPropertyDescriptor,cL=Object.getOwnPropertyNames,lL=Object.prototype.hasOwnProperty,dL=(e,t)=>{for(var r in t)Jx(e,r,{get:t[r],enumerable:!0})},pL=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cL(t))!lL.call(e,n)&&n!==r&&Jx(e,n,{get:()=>t[n],enumerable:!(o=uL(t,n))||o.enumerable});return e},fL=e=>pL(Jx({},"__esModule",{value:!0}),e),nC={};dL(nC,{refreshToken:()=>mL});oC.exports=fL(nC);var qx=Hc(),Aa=Mf();async function mL(){let{projectId:e,teamId:t}=(0,Aa.findProjectInfo)(),r=(0,Aa.loadToken)(e);if(!r||(0,Aa.isExpired)((0,Aa.getTokenPayload)(r.token))){let o=await(0,Aa.getVercelCliToken)();if(!o)throw new qx.VercelOidcTokenError("Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`");if(!e)throw new qx.VercelOidcTokenError("Failed to refresh OIDC token: Try re-linking your project with `vc link`");if(r=await(0,Aa.getVercelOidcToken)(o,e,t),!r)throw new qx.VercelOidcTokenError("Failed to refresh OIDC token");(0,Aa.saveToken)(r,e)}process.env.VERCEL_OIDC_TOKEN=r.token}});var uC=Ce((oY,sC)=>{"use strict";var Qx=Object.defineProperty,hL=Object.getOwnPropertyDescriptor,gL=Object.getOwnPropertyNames,vL=Object.prototype.hasOwnProperty,yL=(e,t)=>{for(var r in t)Qx(e,r,{get:t[r],enumerable:!0})},AL=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of gL(t))!vL.call(e,n)&&n!==r&&Qx(e,n,{get:()=>t[n],enumerable:!(o=hL(t,n))||o.enumerable});return e},bL=e=>AL(Qx({},"__esModule",{value:!0}),e),aC={};yL(aC,{getVercelOidcToken:()=>SL,getVercelOidcTokenSync:()=>Kx});sC.exports=bL(aC);var xL=Lx(),wL=Hc();async function SL(){let e="",t;try{e=Kx()}catch(r){t=r}try{let[{getTokenPayload:r,isExpired:o},{refreshToken:n}]=await Promise.all([await Promise.resolve().then(()=>Ut(Mf())),await Promise.resolve().then(()=>Ut(iC()))]);(!e||o(r(e)))&&(await n(),e=Kx())}catch(r){let o=t instanceof Error?t.message:"";throw r instanceof Error&&(o=`${o}
4
- ${r.message}`),o?new wL.VercelOidcTokenError(o):r}return e}function Kx(){let e=(0,xL.getContext)().headers?.["x-vercel-oidc-token"]??process.env.VERCEL_OIDC_TOKEN;if(!e)throw new Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return e}});var Xx=Ce((iY,dC)=>{"use strict";var Yx=Object.defineProperty,_L=Object.getOwnPropertyDescriptor,IL=Object.getOwnPropertyNames,EL=Object.prototype.hasOwnProperty,kL=(e,t)=>{for(var r in t)Yx(e,r,{get:t[r],enumerable:!0})},TL=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of IL(t))!EL.call(e,n)&&n!==r&&Yx(e,n,{get:()=>t[n],enumerable:!(o=_L(t,n))||o.enumerable});return e},CL=e=>TL(Yx({},"__esModule",{value:!0}),e),lC={};kL(lC,{getContext:()=>$L.getContext,getVercelOidcToken:()=>cC.getVercelOidcToken,getVercelOidcTokenSync:()=>cC.getVercelOidcTokenSync});dC.exports=CL(lC);var cC=uC(),$L=Lx()});function Nt(e){Dw.push({time:new Date,error:e}),Dw.length>20&&Dw.shift()}var Dw,Di=Ud(()=>{"use strict";Dw=[]});import*as Mi from"node:fs";import*as LN from"node:os";import*as ji from"node:path";function nr(){Mi.existsSync(an)||Mi.mkdirSync(an,{recursive:!0})}function lm(){nr(),Mi.existsSync(Pi)||Mi.mkdirSync(Pi,{recursive:!0})}function cl(){nr(),Mi.existsSync(Nr)||Mi.mkdirSync(Nr,{recursive:!0})}var an,to,Pi,br,kn,Nr,cm,xr=Ud(()=>{"use strict";an=ji.join(LN.homedir(),".ai-cli"),to=ji.join(an,"config.json"),Pi=ji.join(an,"chats"),br=ji.join(an,"memories.json"),kn=ji.join(an,"AGENTS.md"),Nr=ji.join(an,"skills"),cm=ji.join(an,"mcp.json")});var I4=Ce((mne,Gw)=>{function _4(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(t=t||{},this._doc=e,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._metadata={},this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._keepClasses=!!t.keepClasses,this._serializer=t.serializer||function(r){return r.innerHTML},this._disableJSONLD=!!t.disableJSONLD,this._allowedVideoRegex=t.allowedVideoRegex||this.REGEXPS.videos,this._linkDensityModifier=t.linkDensityModifier||0,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let r=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let n=Array.from(o.attributes||[],function(i){return`${i.name}="${i.value}"`}).join(" ");return`<${o.localName} ${n}>`};this.log=function(){if(typeof console<"u"){let n=Array.from(arguments,i=>i&&i.nodeType==this.ELEMENT_NODE?r(i):i);n.unshift("Reader: (Readability)"),console.log(...n)}else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(n){return n&&n.nodeName?r(n):n}).join(" ");dump("Reader: (Readability) "+o+`
5
- `)}}}else this.log=function(){}}_4.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|footer|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,commas:/\u002C|\u060C|\uFE50|\uFE10|\uFE11|\u2E41|\u2E34|\u2E32|\uFF0C/g,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/,adWords:/^(ad(vertising|vertisement)?|pub(licité)?|werb(ung)?|广告|Реклама|Anuncio)$/iu,loadingWords:/^((loading|正在加载|Загрузка|chargement|cargando)(…|\.\.\.)?)$/iu},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P","OL","UL"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent(e){this._fixRelativeUris(e),this._simplifyNestedElements(e),this._keepClasses||this._cleanClasses(e)},_removeNodes(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var r=e.length-1;r>=0;r--){var o=e[r],n=o.parentNode;n&&(!t||t.call(this,o,r,e))&&n.removeChild(o)}},_replaceNodeTags(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let r of e)this._setNodeTag(r,t)},_forEachNode(e,t){Array.prototype.forEach.call(e,t,this)},_findNode(e,t){return Array.prototype.find.call(e,t,this)},_someNode(e,t){return Array.prototype.some.call(e,t,this)},_everyNode(e,t){return Array.prototype.every.call(e,t,this)},_getAllNodesWithTag(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(r){var o=e.getElementsByTagName(r);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses(e){var t=this._classesToPreserve,r=(e.getAttribute("class")||"").split(/\s+/).filter(o=>t.includes(o)).join(" ");for(r?e.setAttribute("class",r):e.removeAttribute("class"),e=e.firstElementChild;e;e=e.nextElementSibling)this._cleanClasses(e)},_isUrl(e){try{return new URL(e),!0}catch{return!1}},_fixRelativeUris(e){var t=this._doc.baseURI,r=this._doc.documentURI;function o(a){if(t==r&&a.charAt(0)=="#")return a;try{return new URL(a,t).href}catch{}return a}var n=this._getAllNodesWithTag(e,["a"]);this._forEachNode(n,function(a){var s=a.getAttribute("href");if(s)if(s.indexOf("javascript:")===0)if(a.childNodes.length===1&&a.childNodes[0].nodeType===this.TEXT_NODE){var c=this._doc.createTextNode(a.textContent);a.parentNode.replaceChild(c,a)}else{for(var l=this._doc.createElement("span");a.firstChild;)l.appendChild(a.firstChild);a.parentNode.replaceChild(l,a)}else a.setAttribute("href",o(s))});var i=this._getAllNodesWithTag(e,["img","picture","figure","video","audio","source"]);this._forEachNode(i,function(a){var s=a.getAttribute("src"),c=a.getAttribute("poster"),l=a.getAttribute("srcset");if(s&&a.setAttribute("src",o(s)),c&&a.setAttribute("poster",o(c)),l){var d=l.replace(this.REGEXPS.srcsetUrl,function(f,p,m,v){return o(p)+(m||"")+v});a.setAttribute("srcset",d)}})},_simplifyNestedElements(e){for(var t=e;t;){if(t.parentNode&&["DIV","SECTION"].includes(t.tagName)&&!(t.id&&t.id.startsWith("readability"))){if(this._isElementWithoutContent(t)){t=this._removeAndGetNext(t);continue}else if(this._hasSingleTagInsideElement(t,"DIV")||this._hasSingleTagInsideElement(t,"SECTION")){for(var r=t.children[0],o=0;o<t.attributes.length;o++)r.setAttributeNode(t.attributes[o].cloneNode());t.parentNode.replaceChild(r,t),t=r;continue}}t=this._getNextNode(t)}},_getArticleTitle(){var e=this._doc,t="",r="";try{t=r=e.title.trim(),typeof t!="string"&&(t=r=this._getInnerText(e.getElementsByTagName("title")[0]))}catch{}var o=!1;function n(d){return d.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(t)){o=/ [\\\/>»] /.test(t);let d=Array.from(r.matchAll(/ [\|\-\\\/>»] /gi));t=r.substring(0,d.pop().index),n(t)<3&&(t=r.replace(/^[^\|\-\\\/>»]*[\|\-\\\/>»]/gi,""))}else if(t.includes(": ")){var i=this._getAllNodesWithTag(e,["h1","h2"]),a=t.trim(),s=this._someNode(i,function(d){return d.textContent.trim()===a});s||(t=r.substring(r.lastIndexOf(":")+1),n(t)<3?t=r.substring(r.indexOf(":")+1):n(r.substr(0,r.indexOf(":")))>5&&(t=r))}else if(t.length>150||t.length<15){var c=e.getElementsByTagName("h1");c.length===1&&(t=this._getInnerText(c[0]))}t=t.trim().replace(this.REGEXPS.normalize," ");var l=n(t);return l<=4&&(!o||l!=n(r.replace(/[\|\-\\\/>»]+/g,""))-1)&&(t=r),t},_prepDocument(){var e=this._doc;this._removeNodes(this._getAllNodesWithTag(e,["style"])),e.body&&this._replaceBrs(e.body),this._replaceNodeTags(this._getAllNodesWithTag(e,["font"]),"SPAN")},_nextNode(e){for(var t=e;t&&t.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(t.textContent);)t=t.nextSibling;return t},_replaceBrs(e){this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(t){for(var r=t.nextSibling,o=!1;(r=this._nextNode(r))&&r.tagName=="BR";){o=!0;var n=r.nextSibling;r.remove(),r=n}if(o){var i=this._doc.createElement("p");for(t.parentNode.replaceChild(i,t),r=i.nextSibling;r;){if(r.tagName=="BR"){var a=this._nextNode(r.nextSibling);if(a&&a.tagName=="BR")break}if(!this._isPhrasingContent(r))break;var s=r.nextSibling;i.appendChild(r),r=s}for(;i.lastChild&&this._isWhitespace(i.lastChild);)i.lastChild.remove();i.parentNode.tagName==="P"&&this._setNodeTag(i.parentNode,"DIV")}})},_setNodeTag(e,t){if(this.log("_setNodeTag",e,t),this._docJSDOMParser)return e.localName=t.toLowerCase(),e.tagName=t.toUpperCase(),e;for(var r=e.ownerDocument.createElement(t);e.firstChild;)r.appendChild(e.firstChild);e.parentNode.replaceChild(r,e),e.readability&&(r.readability=e.readability);for(var o=0;o<e.attributes.length;o++)r.setAttributeNode(e.attributes[o].cloneNode());return r},_prepArticle(e){this._cleanStyles(e),this._markDataTables(e),this._fixLazyImages(e),this._cleanConditionally(e,"form"),this._cleanConditionally(e,"fieldset"),this._clean(e,"object"),this._clean(e,"embed"),this._clean(e,"footer"),this._clean(e,"link"),this._clean(e,"aside");var t=this.DEFAULT_CHAR_THRESHOLD;this._forEachNode(e.children,function(r){this._cleanMatchedNodes(r,function(o,n){return this.REGEXPS.shareElements.test(n)&&o.textContent.length<t})}),this._clean(e,"iframe"),this._clean(e,"input"),this._clean(e,"textarea"),this._clean(e,"select"),this._clean(e,"button"),this._cleanHeaders(e),this._cleanConditionally(e,"table"),this._cleanConditionally(e,"ul"),this._cleanConditionally(e,"div"),this._replaceNodeTags(this._getAllNodesWithTag(e,["h1"]),"h2"),this._removeNodes(this._getAllNodesWithTag(e,["p"]),function(r){var o=this._getAllNodesWithTag(r,["img","embed","object","iframe"]).length;return o===0&&!this._getInnerText(r,!1)}),this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(r){var o=this._nextNode(r.nextSibling);o&&o.tagName=="P"&&r.remove()}),this._forEachNode(this._getAllNodesWithTag(e,["table"]),function(r){var o=this._hasSingleTagInsideElement(r,"TBODY")?r.firstElementChild:r;if(this._hasSingleTagInsideElement(o,"TR")){var n=o.firstElementChild;if(this._hasSingleTagInsideElement(n,"TD")){var i=n.firstElementChild;i=this._setNodeTag(i,this._everyNode(i.childNodes,this._isPhrasingContent)?"P":"DIV"),r.parentNode.replaceChild(i,r)}}})},_initializeNode(e){switch(e.readability={contentScore:0},e.tagName){case"DIV":e.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":e.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":e.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":e.readability.contentScore-=5;break}e.readability.contentScore+=this._getClassWeight(e)},_removeAndGetNext(e){var t=this._getNextNode(e,!0);return e.remove(),t},_getNextNode(e,t){if(!t&&e.firstElementChild)return e.firstElementChild;if(e.nextElementSibling)return e.nextElementSibling;do e=e.parentNode;while(e&&!e.nextElementSibling);return e&&e.nextElementSibling},_textSimilarity(e,t){var r=e.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean),o=t.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean);if(!r.length||!o.length)return 0;var n=o.filter(a=>!r.includes(a)),i=n.join(" ").length/o.join(" ").length;return 1-i},_isValidByline(e,t){var r=e.getAttribute("rel"),o=e.getAttribute("itemprop"),n=e.textContent.trim().length;return(r==="author"||o&&o.includes("author")||this.REGEXPS.byline.test(t))&&!!n&&n<100},_getNodeAncestors(e,t){t=t||0;for(var r=0,o=[];e.parentNode&&(o.push(e.parentNode),!(t&&++r===t));)e=e.parentNode;return o},_grabArticle(e){this.log("**** grabArticle ****");var t=this._doc,r=e!==null;if(e=e||this._doc.body,!e)return this.log("No body found in document. Abort."),null;for(var o=e.innerHTML;;){this.log("Starting grabArticle loop");var n=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),i=[],a=this._doc.documentElement;let Qr=!0;for(;a;){a.tagName==="HTML"&&(this._articleLang=a.getAttribute("lang"));var s=a.className+" "+a.id;if(!this._isProbablyVisible(a)){this.log("Removing hidden node - "+s),a=this._removeAndGetNext(a);continue}if(a.getAttribute("aria-modal")=="true"&&a.getAttribute("role")=="dialog"){a=this._removeAndGetNext(a);continue}if(!this._articleByline&&!this._metadata.byline&&this._isValidByline(a,s)){for(var c=this._getNextNode(a,!0),l=this._getNextNode(a),d=null;l&&l!=c;){var f=l.getAttribute("itemprop");if(f&&f.includes("name")){d=l;break}else l=this._getNextNode(l)}this._articleByline=(d??a).textContent.trim(),a=this._removeAndGetNext(a);continue}if(Qr&&this._headerDuplicatesTitle(a)){this.log("Removing header: ",a.textContent.trim(),this._articleTitle.trim()),Qr=!1,a=this._removeAndGetNext(a);continue}if(n){if(this.REGEXPS.unlikelyCandidates.test(s)&&!this.REGEXPS.okMaybeItsACandidate.test(s)&&!this._hasAncestorTag(a,"table")&&!this._hasAncestorTag(a,"code")&&a.tagName!=="BODY"&&a.tagName!=="A"){this.log("Removing unlikely candidate - "+s),a=this._removeAndGetNext(a);continue}if(this.UNLIKELY_ROLES.includes(a.getAttribute("role"))){this.log("Removing content with role "+a.getAttribute("role")+" - "+s),a=this._removeAndGetNext(a);continue}}if((a.tagName==="DIV"||a.tagName==="SECTION"||a.tagName==="HEADER"||a.tagName==="H1"||a.tagName==="H2"||a.tagName==="H3"||a.tagName==="H4"||a.tagName==="H5"||a.tagName==="H6")&&this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}if(this.DEFAULT_TAGS_TO_SCORE.includes(a.tagName)&&i.push(a),a.tagName==="DIV"){for(var p=null,m=a.firstChild;m;){var v=m.nextSibling;if(this._isPhrasingContent(m))p!==null?p.appendChild(m):this._isWhitespace(m)||(p=t.createElement("p"),a.replaceChild(p,m),p.appendChild(m));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.lastChild.remove();p=null}m=v}if(this._hasSingleTagInsideElement(a,"P")&&this._getLinkDensity(a)<.25){var g=a.children[0];a.parentNode.replaceChild(g,a),a=g,i.push(a)}else this._hasChildBlockElement(a)||(a=this._setNodeTag(a,"P"),i.push(a))}a=this._getNextNode(a)}var y=[];this._forEachNode(i,function($t){if(!(!$t.parentNode||typeof $t.parentNode.tagName>"u")){var at=this._getInnerText($t);if(!(at.length<25)){var xt=this._getNodeAncestors($t,5);if(xt.length!==0){var Yr=0;Yr+=1,Yr+=at.split(this.REGEXPS.commas).length,Yr+=Math.min(Math.floor(at.length/100),3),this._forEachNode(xt,function(Ze,ze){if(!(!Ze.tagName||!Ze.parentNode||typeof Ze.parentNode.tagName>"u")){if(typeof Ze.readability>"u"&&(this._initializeNode(Ze),y.push(Ze)),ze===0)var ke=1;else ze===1?ke=2:ke=ze*3;Ze.readability.contentScore+=Yr/ke}})}}}});for(var E=[],I=0,h=y.length;I<h;I+=1){var N=y[I],L=N.readability.contentScore*(1-this._getLinkDensity(N));N.readability.contentScore=L,this.log("Candidate:",N,"with score "+L);for(var b=0;b<this._nbTopCandidates;b++){var M=E[b];if(!M||L>M.readability.contentScore){E.splice(b,0,N),E.length>this._nbTopCandidates&&E.pop();break}}}var P=E[0]||null,Q=!1,O;if(P===null||P.tagName==="BODY"){for(P=t.createElement("DIV"),Q=!0;e.firstChild;)this.log("Moving child out:",e.firstChild),P.appendChild(e.firstChild);e.appendChild(P),this._initializeNode(P)}else if(P){for(var ne=[],we=1;we<E.length;we++)E[we].readability.contentScore/P.readability.contentScore>=.75&&ne.push(this._getNodeAncestors(E[we]));var De=3;if(ne.length>=De)for(O=P.parentNode;O.tagName!=="BODY";){for(var ge=0,xe=0;xe<ne.length&&ge<De;xe++)ge+=Number(ne[xe].includes(O));if(ge>=De){P=O;break}O=O.parentNode}P.readability||this._initializeNode(P),O=P.parentNode;for(var Ie=P.readability.contentScore,K=Ie/3;O.tagName!=="BODY";){if(!O.readability){O=O.parentNode;continue}var ae=O.readability.contentScore;if(ae<K)break;if(ae>Ie){P=O;break}Ie=O.readability.contentScore,O=O.parentNode}for(O=P.parentNode;O.tagName!="BODY"&&O.children.length==1;)P=O,O=P.parentNode;P.readability||this._initializeNode(P)}var ye=t.createElement("DIV");r&&(ye.id="readability-content");var C=Math.max(10,P.readability.contentScore*.2);O=P.parentNode;for(var V=O.children,Y=0,J=V.length;Y<J;Y++){var k=V[Y],re=!1;if(this.log("Looking at sibling node:",k,k.readability?"with score "+k.readability.contentScore:""),this.log("Sibling has score",k.readability?k.readability.contentScore:"Unknown"),k===P)re=!0;else{var se=0;if(k.className===P.className&&P.className!==""&&(se+=P.readability.contentScore*.2),k.readability&&k.readability.contentScore+se>=C)re=!0;else if(k.nodeName==="P"){var it=this._getLinkDensity(k),X=this._getInnerText(k),Ct=X.length;(Ct>80&&it<.25||Ct<80&&Ct>0&&it===0&&X.search(/\.( |$)/)!==-1)&&(re=!0)}}re&&(this.log("Appending node:",k),this.ALTER_TO_DIV_EXCEPTIONS.includes(k.nodeName)||(this.log("Altering sibling:",k,"to div."),k=this._setNodeTag(k,"DIV")),ye.appendChild(k),V=O.children,Y-=1,J-=1)}if(this._debug&&this.log("Article content pre-prep: "+ye.innerHTML),this._prepArticle(ye),this._debug&&this.log("Article content post-prep: "+ye.innerHTML),Q)P.id="readability-page-1",P.className="page";else{var cr=t.createElement("DIV");for(cr.id="readability-page-1",cr.className="page";ye.firstChild;)cr.appendChild(ye.firstChild);ye.appendChild(cr)}this._debug&&this.log("Article content after paging: "+ye.innerHTML);var Mt=!0,Kr=this._getInnerText(ye,!0).length;if(Kr<this._charThreshold)if(Mt=!1,e.innerHTML=o,this._attempts.push({articleContent:ye,textLength:Kr}),this._flagIsActive(this.FLAG_STRIP_UNLIKELYS))this._removeFlag(this.FLAG_STRIP_UNLIKELYS);else if(this._flagIsActive(this.FLAG_WEIGHT_CLASSES))this._removeFlag(this.FLAG_WEIGHT_CLASSES);else if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY);else{if(this._attempts.sort(function($t,at){return at.textLength-$t.textLength}),!this._attempts[0].textLength)return null;ye=this._attempts[0].articleContent,Mt=!0}if(Mt){var Ur=[O,P].concat(this._getNodeAncestors(O));return this._someNode(Ur,function($t){if(!$t.tagName)return!1;var at=$t.getAttribute("dir");return at?(this._articleDir=at,!0):!1}),ye}}},_unescapeHtmlEntities(e){if(!e)return e;var t=this.HTML_ESCAPE_MAP;return e.replace(/&(quot|amp|apos|lt|gt);/g,function(r,o){return t[o]}).replace(/&#(?:x([0-9a-f]+)|([0-9]+));/gi,function(r,o,n){var i=parseInt(o||n,o?16:10);return(i==0||i>1114111||i>=55296&&i<=57343)&&(i=65533),String.fromCodePoint(i)})},_getJSONLD(e){var t=this._getAllNodesWithTag(e,["script"]),r;return this._forEachNode(t,function(o){if(!r&&o.getAttribute("type")==="application/ld+json")try{var n=o.textContent.replace(/^\s*<!\[CDATA\[|\]\]>\s*$/g,""),i=JSON.parse(n);if(Array.isArray(i)&&(i=i.find(f=>f["@type"]&&f["@type"].match(this.REGEXPS.jsonLdArticleTypes)),!i))return;var a=/^https?\:\/\/schema\.org\/?$/,s=typeof i["@context"]=="string"&&i["@context"].match(a)||typeof i["@context"]=="object"&&typeof i["@context"]["@vocab"]=="string"&&i["@context"]["@vocab"].match(a);if(!s||(!i["@type"]&&Array.isArray(i["@graph"])&&(i=i["@graph"].find(f=>(f["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes))),!i||!i["@type"]||!i["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(r={},typeof i.name=="string"&&typeof i.headline=="string"&&i.name!==i.headline){var c=this._getArticleTitle(),l=this._textSimilarity(i.name,c)>.75,d=this._textSimilarity(i.headline,c)>.75;d&&!l?r.title=i.headline:r.title=i.name}else typeof i.name=="string"?r.title=i.name.trim():typeof i.headline=="string"&&(r.title=i.headline.trim());i.author&&(typeof i.author.name=="string"?r.byline=i.author.name.trim():Array.isArray(i.author)&&i.author[0]&&typeof i.author[0].name=="string"&&(r.byline=i.author.filter(function(f){return f&&typeof f.name=="string"}).map(function(f){return f.name.trim()}).join(", "))),typeof i.description=="string"&&(r.excerpt=i.description.trim()),i.publisher&&typeof i.publisher.name=="string"&&(r.siteName=i.publisher.name.trim()),typeof i.datePublished=="string"&&(r.datePublished=i.datePublished.trim())}catch(f){this.log(f.message)}}),r||{}},_getArticleMetadata(e){var t={},r={},o=this._doc.getElementsByTagName("meta"),n=/\s*(article|dc|dcterm|og|twitter)\s*:\s*(author|creator|description|published_time|title|site_name)\s*/gi,i=/^\s*(?:(dc|dcterm|og|twitter|parsely|weibo:(article|webpage))\s*[-\.:]\s*)?(author|creator|pub-date|description|title|site_name)\s*$/i;this._forEachNode(o,function(s){var c=s.getAttribute("name"),l=s.getAttribute("property"),d=s.getAttribute("content");if(d){var f=null,p=null;l&&(f=l.match(n),f&&(p=f[0].toLowerCase().replace(/\s/g,""),r[p]=d.trim())),!f&&c&&i.test(c)&&(p=c,d&&(p=p.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),r[p]=d.trim()))}}),t.title=e.title||r["dc:title"]||r["dcterm:title"]||r["og:title"]||r["weibo:article:title"]||r["weibo:webpage:title"]||r.title||r["twitter:title"]||r["parsely-title"],t.title||(t.title=this._getArticleTitle());let a=typeof r["article:author"]=="string"&&!this._isUrl(r["article:author"])?r["article:author"]:void 0;return t.byline=e.byline||r["dc:creator"]||r["dcterm:creator"]||r.author||r["parsely-author"]||a,t.excerpt=e.excerpt||r["dc:description"]||r["dcterm:description"]||r["og:description"]||r["weibo:article:description"]||r["weibo:webpage:description"]||r.description||r["twitter:description"],t.siteName=e.siteName||r["og:site_name"],t.publishedTime=e.datePublished||r["article:published_time"]||r["parsely-pub-date"]||null,t.title=this._unescapeHtmlEntities(t.title),t.byline=this._unescapeHtmlEntities(t.byline),t.excerpt=this._unescapeHtmlEntities(t.excerpt),t.siteName=this._unescapeHtmlEntities(t.siteName),t.publishedTime=this._unescapeHtmlEntities(t.publishedTime),t},_isSingleImage(e){for(;e;){if(e.tagName==="IMG")return!0;if(e.children.length!==1||e.textContent.trim()!=="")return!1;e=e.children[0]}return!1},_unwrapNoscriptImages(e){var t=Array.from(e.getElementsByTagName("img"));this._forEachNode(t,function(o){for(var n=0;n<o.attributes.length;n++){var i=o.attributes[n];switch(i.name){case"src":case"srcset":case"data-src":case"data-srcset":return}if(/\.(jpg|jpeg|png|webp)/i.test(i.value))return}o.remove()});var r=Array.from(e.getElementsByTagName("noscript"));this._forEachNode(r,function(o){if(this._isSingleImage(o)){var n=e.createElement("div");n.innerHTML=o.innerHTML;var i=o.previousElementSibling;if(i&&this._isSingleImage(i)){var a=i;a.tagName!=="IMG"&&(a=i.getElementsByTagName("img")[0]);for(var s=n.getElementsByTagName("img")[0],c=0;c<a.attributes.length;c++){var l=a.attributes[c];if(l.value!==""&&(l.name==="src"||l.name==="srcset"||/\.(jpg|jpeg|png|webp)/i.test(l.value))){if(s.getAttribute(l.name)===l.value)continue;var d=l.name;s.hasAttribute(d)&&(d="data-old-"+d),s.setAttribute(d,l.value)}}o.parentNode.replaceChild(n.firstElementChild,i)}}})},_removeScripts(e){this._removeNodes(this._getAllNodesWithTag(e,["script","noscript"]))},_hasSingleTagInsideElement(e,t){return e.children.length!=1||e.children[0].tagName!==t?!1:!this._someNode(e.childNodes,function(r){return r.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(r.textContent)})},_isElementWithoutContent(e){return e.nodeType===this.ELEMENT_NODE&&!e.textContent.trim().length&&(!e.children.length||e.children.length==e.getElementsByTagName("br").length+e.getElementsByTagName("hr").length)},_hasChildBlockElement(e){return this._someNode(e.childNodes,function(t){return this.DIV_TO_P_ELEMS.has(t.tagName)||this._hasChildBlockElement(t)})},_isPhrasingContent(e){return e.nodeType===this.TEXT_NODE||this.PHRASING_ELEMS.includes(e.tagName)||(e.tagName==="A"||e.tagName==="DEL"||e.tagName==="INS")&&this._everyNode(e.childNodes,this._isPhrasingContent)},_isWhitespace(e){return e.nodeType===this.TEXT_NODE&&e.textContent.trim().length===0||e.nodeType===this.ELEMENT_NODE&&e.tagName==="BR"},_getInnerText(e,t){t=typeof t>"u"?!0:t;var r=e.textContent.trim();return t?r.replace(this.REGEXPS.normalize," "):r},_getCharCount(e,t){return t=t||",",this._getInnerText(e).split(t).length-1},_cleanStyles(e){if(!(!e||e.tagName.toLowerCase()==="svg")){for(var t=0;t<this.PRESENTATIONAL_ATTRIBUTES.length;t++)e.removeAttribute(this.PRESENTATIONAL_ATTRIBUTES[t]);this.DEPRECATED_SIZE_ATTRIBUTE_ELEMS.includes(e.tagName)&&(e.removeAttribute("width"),e.removeAttribute("height"));for(var r=e.firstElementChild;r!==null;)this._cleanStyles(r),r=r.nextElementSibling}},_getLinkDensity(e){var t=this._getInnerText(e).length;if(t===0)return 0;var r=0;return this._forEachNode(e.getElementsByTagName("a"),function(o){var n=o.getAttribute("href"),i=n&&this.REGEXPS.hashUrl.test(n)?.3:1;r+=this._getInnerText(o).length*i}),r/t},_getClassWeight(e){if(!this._flagIsActive(this.FLAG_WEIGHT_CLASSES))return 0;var t=0;return typeof e.className=="string"&&e.className!==""&&(this.REGEXPS.negative.test(e.className)&&(t-=25),this.REGEXPS.positive.test(e.className)&&(t+=25)),typeof e.id=="string"&&e.id!==""&&(this.REGEXPS.negative.test(e.id)&&(t-=25),this.REGEXPS.positive.test(e.id)&&(t+=25)),t},_clean(e,t){var r=["object","embed","iframe"].includes(t);this._removeNodes(this._getAllNodesWithTag(e,[t]),function(o){if(r){for(var n=0;n<o.attributes.length;n++)if(this._allowedVideoRegex.test(o.attributes[n].value))return!1;if(o.tagName==="object"&&this._allowedVideoRegex.test(o.innerHTML))return!1}return!0})},_hasAncestorTag(e,t,r,o){r=r||3,t=t.toUpperCase();for(var n=0;e.parentNode;){if(r>0&&n>r)return!1;if(e.parentNode.tagName===t&&(!o||o(e.parentNode)))return!0;e=e.parentNode,n++}return!1},_getRowAndColumnCount(e){for(var t=0,r=0,o=e.getElementsByTagName("tr"),n=0;n<o.length;n++){var i=o[n].getAttribute("rowspan")||0;i&&(i=parseInt(i,10)),t+=i||1;for(var a=0,s=o[n].getElementsByTagName("td"),c=0;c<s.length;c++){var l=s[c].getAttribute("colspan")||0;l&&(l=parseInt(l,10)),a+=l||1}r=Math.max(r,a)}return{rows:t,columns:r}},_markDataTables(e){for(var t=e.getElementsByTagName("table"),r=0;r<t.length;r++){var o=t[r],n=o.getAttribute("role");if(n=="presentation"){o._readabilityDataTable=!1;continue}var i=o.getAttribute("datatable");if(i=="0"){o._readabilityDataTable=!1;continue}var a=o.getAttribute("summary");if(a){o._readabilityDataTable=!0;continue}var s=o.getElementsByTagName("caption")[0];if(s&&s.childNodes.length){o._readabilityDataTable=!0;continue}var c=["col","colgroup","tfoot","thead","th"],l=function(f){return!!o.getElementsByTagName(f)[0]};if(c.some(l)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var d=this._getRowAndColumnCount(o);if(d.columns==1||d.rows==1){o._readabilityDataTable=!1;continue}if(d.rows>=10||d.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=d.rows*d.columns>10}},_fixLazyImages(e){this._forEachNode(this._getAllNodesWithTag(e,["img","picture","figure"]),function(t){if(t.src&&this.REGEXPS.b64DataUrl.test(t.src)){var r=this.REGEXPS.b64DataUrl.exec(t.src);if(r[1]==="image/svg+xml")return;for(var o=!1,n=0;n<t.attributes.length;n++){var i=t.attributes[n];if(i.name!=="src"&&/\.(jpg|jpeg|png|webp)/i.test(i.value)){o=!0;break}}if(o){var a=r[0].length,s=t.src.length-a;s<133&&t.removeAttribute("src")}}if(!((t.src||t.srcset&&t.srcset!="null")&&!t.className.toLowerCase().includes("lazy"))){for(var c=0;c<t.attributes.length;c++)if(i=t.attributes[c],!(i.name==="src"||i.name==="srcset"||i.name==="alt")){var l=null;if(/\.(jpg|jpeg|png|webp)\s+\d/.test(i.value)?l="srcset":/^\s*\S+\.(jpg|jpeg|png|webp)\S*\s*$/.test(i.value)&&(l="src"),l){if(t.tagName==="IMG"||t.tagName==="PICTURE")t.setAttribute(l,i.value);else if(t.tagName==="FIGURE"&&!this._getAllNodesWithTag(t,["img","picture"]).length){var d=this._doc.createElement("img");d.setAttribute(l,i.value),t.appendChild(d)}}}}})},_getTextDensity(e,t){var r=this._getInnerText(e,!0).length;if(r===0)return 0;var o=0,n=this._getAllNodesWithTag(e,t);return this._forEachNode(n,i=>o+=this._getInnerText(i,!0).length),o/r},_cleanConditionally(e,t){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(e,[t]),function(r){var o=function(O){return O._readabilityDataTable},n=t==="ul"||t==="ol";if(!n){var i=0,a=this._getAllNodesWithTag(r,["ul","ol"]);this._forEachNode(a,O=>i+=this._getInnerText(O).length),n=i/this._getInnerText(r).length>.9}if(t==="table"&&o(r)||this._hasAncestorTag(r,"table",-1,o)||this._hasAncestorTag(r,"code")||[...r.getElementsByTagName("table")].some(O=>O._readabilityDataTable))return!1;var s=this._getClassWeight(r);this.log("Cleaning Conditionally",r);var c=0;if(s+c<0)return!0;if(this._getCharCount(r,",")<10){for(var l=r.getElementsByTagName("p").length,d=r.getElementsByTagName("img").length,f=r.getElementsByTagName("li").length-100,p=r.getElementsByTagName("input").length,m=this._getTextDensity(r,["h1","h2","h3","h4","h5","h6"]),v=0,g=this._getAllNodesWithTag(r,["object","embed","iframe"]),y=0;y<g.length;y++){for(var E=0;E<g[y].attributes.length;E++)if(this._allowedVideoRegex.test(g[y].attributes[E].value))return!1;if(g[y].tagName==="object"&&this._allowedVideoRegex.test(g[y].innerHTML))return!1;v++}var I=this._getInnerText(r);if(this.REGEXPS.adWords.test(I)||this.REGEXPS.loadingWords.test(I))return!0;var h=I.length,N=this._getLinkDensity(r),L=["SPAN","LI","TD"].concat(Array.from(this.DIV_TO_P_ELEMS)),b=this._getTextDensity(r,L),M=this._hasAncestorTag(r,"figure"),P=(()=>{let ne=[];return!M&&d>1&&l/d<.5&&ne.push(`Bad p to img ratio (img=${d}, p=${l})`),!n&&f>l&&ne.push(`Too many li's outside of a list. (li=${f} > p=${l})`),p>Math.floor(l/3)&&ne.push(`Too many inputs per p. (input=${p}, p=${l})`),!n&&!M&&m<.9&&h<25&&(d===0||d>2)&&N>0&&ne.push(`Suspiciously short. (headingDensity=${m}, img=${d}, linkDensity=${N})`),!n&&s<25&&N>.2+this._linkDensityModifier&&ne.push(`Low weight and a little linky. (linkDensity=${N})`),s>=25&&N>.5+this._linkDensityModifier&&ne.push(`High weight and mostly links. (linkDensity=${N})`),(v===1&&h<75||v>1)&&ne.push(`Suspicious embed. (embedCount=${v}, contentLength=${h})`),d===0&&b===0&&ne.push(`No useful content. (img=${d}, textDensity=${b})`),ne.length?(this.log("Checks failed",ne),!0):!1})();if(n&&P){for(var Q=0;Q<r.children.length;Q++)if(r.children[Q].children.length>1)return P;let ne=r.getElementsByTagName("li").length;if(d==ne)return!1}return P}return!1})},_cleanMatchedNodes(e,t){for(var r=this._getNextNode(e,!0),o=this._getNextNode(e);o&&o!=r;)t.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders(e){let t=this._getAllNodesWithTag(e,["h1","h2"]);this._removeNodes(t,function(r){let o=this._getClassWeight(r)<0;return o&&this.log("Removing header with low class weight:",r),o})},_headerDuplicatesTitle(e){if(e.tagName!="H1"&&e.tagName!="H2")return!1;var t=this._getInnerText(e,!1);return this.log("Evaluating similarity of header:",t,this._articleTitle),this._textSimilarity(this._articleTitle,t)>.75},_flagIsActive(e){return(this._flags&e)>0},_removeFlag(e){this._flags=this._flags&~e},_isProbablyVisible(e){return(!e.style||e.style.display!="none")&&(!e.style||e.style.visibility!="hidden")&&!e.hasAttribute("hidden")&&(!e.hasAttribute("aria-hidden")||e.getAttribute("aria-hidden")!="true"||e.className&&e.className.includes&&e.className.includes("fallback-image"))},parse(){if(this._maxElemsToParse>0){var e=this._doc.getElementsByTagName("*").length;if(e>this._maxElemsToParse)throw new Error("Aborting parsing document; "+e+" elements found")}this._unwrapNoscriptImages(this._doc);var t=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var r=this._getArticleMetadata(t);this._metadata=r,this._articleTitle=r.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!r.excerpt){var n=o.getElementsByTagName("p");n.length&&(r.excerpt=n[0].textContent.trim())}var i=o.textContent;return{title:this._articleTitle,byline:r.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:i,length:i.length,excerpt:r.excerpt,siteName:r.siteName||this._articleSiteName,publishedTime:r.publishedTime}}};typeof Gw=="object"&&(Gw.exports=_4)});var k4=Ce((hne,Vw)=>{var E4={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function RZ(e){return(!e.style||e.style.display!="none")&&!e.hasAttribute("hidden")&&(!e.hasAttribute("aria-hidden")||e.getAttribute("aria-hidden")!="true"||e.className&&e.className.includes&&e.className.includes("fallback-image"))}function OZ(e,t={}){typeof t=="function"&&(t={visibilityChecker:t});var r={minScore:20,minContentLength:140,visibilityChecker:RZ};t=Object.assign(r,t);var o=e.querySelectorAll("p, pre, article"),n=e.querySelectorAll("div > br");if(n.length){var i=new Set(o);[].forEach.call(n,function(s){i.add(s.parentNode)}),o=Array.from(i)}var a=0;return[].some.call(o,function(s){if(!t.visibilityChecker(s))return!1;var c=s.className+" "+s.id;if(E4.unlikelyCandidates.test(c)&&!E4.okMaybeItsACandidate.test(c)||s.matches("li p"))return!1;var l=s.textContent.trim().length;return l<t.minContentLength?!1:(a+=Math.sqrt(l-t.minContentLength),a>t.minScore)})}typeof Vw=="object"&&(Vw.exports=OZ)});var C4=Ce((gne,T4)=>{var DZ=I4(),PZ=k4();T4.exports={Readability:DZ,isProbablyReaderable:PZ}});var Da=Ce((Sae,CR)=>{CR.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}});var Ym=Ce(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.AttributeAction=so.IgnoreCaseMode=so.SelectorType=void 0;var QG;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(QG=so.SelectorType||(so.SelectorType={}));so.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var YG;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(YG=so.AttributeAction||(so.AttributeAction={}))});var DR=Ce(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.parse=wu.isTraversal=void 0;var We=Ym(),$R=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,XG=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,eV=new Map([[126,We.AttributeAction.Element],[94,We.AttributeAction.Start],[36,We.AttributeAction.End],[42,We.AttributeAction.Any],[33,We.AttributeAction.Not],[124,We.AttributeAction.Hyphen]]),tV=new Set(["has","not","matches","is","where","host","host-context"]);function RR(e){switch(e.type){case We.SelectorType.Adjacent:case We.SelectorType.Child:case We.SelectorType.Descendant:case We.SelectorType.Parent:case We.SelectorType.Sibling:case We.SelectorType.ColumnCombinator:return!0;default:return!1}}wu.isTraversal=RR;var rV=new Set(["contains","icontains"]);function nV(e,t,r){var o=parseInt(t,16)-65536;return o!==o||r?t:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,o&1023|56320)}function Rl(e){return e.replace(XG,nV)}function DS(e){return e===39||e===34}function NR(e){return e===32||e===9||e===10||e===12||e===13}function oV(e){var t=[],r=OR(t,"".concat(e),0);if(r<e.length)throw new Error("Unmatched selector: ".concat(e.slice(r)));return t}wu.parse=oV;function OR(e,t,r){var o=[];function n(De){var ge=t.slice(r+De).match($R);if(!ge)throw new Error("Expected name, found ".concat(t.slice(r)));var xe=ge[0];return r+=De+xe.length,Rl(xe)}function i(De){for(r+=De;r<t.length&&NR(t.charCodeAt(r));)r++}function a(){r+=1;for(var De=r,ge=1;ge>0&&r<t.length;r++)t.charCodeAt(r)===40&&!s(r)?ge++:t.charCodeAt(r)===41&&!s(r)&&ge--;if(ge)throw new Error("Parenthesis not matched");return Rl(t.slice(De,r-1))}function s(De){for(var ge=0;t.charCodeAt(--De)===92;)ge++;return(ge&1)===1}function c(){if(o.length>0&&RR(o[o.length-1]))throw new Error("Did not expect successive traversals.")}function l(De){if(o.length>0&&o[o.length-1].type===We.SelectorType.Descendant){o[o.length-1].type=De;return}c(),o.push({type:De})}function d(De,ge){o.push({type:We.SelectorType.Attribute,name:De,action:ge,value:n(1),namespace:null,ignoreCase:"quirks"})}function f(){if(o.length&&o[o.length-1].type===We.SelectorType.Descendant&&o.pop(),o.length===0)throw new Error("Empty sub-selector");e.push(o)}if(i(0),t.length===r)return r;e:for(;r<t.length;){var p=t.charCodeAt(r);switch(p){case 32:case 9:case 10:case 12:case 13:{(o.length===0||o[0].type!==We.SelectorType.Descendant)&&(c(),o.push({type:We.SelectorType.Descendant})),i(1);break}case 62:{l(We.SelectorType.Child),i(1);break}case 60:{l(We.SelectorType.Parent),i(1);break}case 126:{l(We.SelectorType.Sibling),i(1);break}case 43:{l(We.SelectorType.Adjacent),i(1);break}case 46:{d("class",We.AttributeAction.Element);break}case 35:{d("id",We.AttributeAction.Equals);break}case 91:{i(1);var m=void 0,v=null;t.charCodeAt(r)===124?m=n(1):t.startsWith("*|",r)?(v="*",m=n(2)):(m=n(0),t.charCodeAt(r)===124&&t.charCodeAt(r+1)!==61&&(v=m,m=n(1))),i(0);var g=We.AttributeAction.Exists,y=eV.get(t.charCodeAt(r));if(y){if(g=y,t.charCodeAt(r+1)!==61)throw new Error("Expected `=`");i(2)}else t.charCodeAt(r)===61&&(g=We.AttributeAction.Equals,i(1));var E="",I=null;if(g!=="exists"){if(DS(t.charCodeAt(r))){for(var h=t.charCodeAt(r),N=r+1;N<t.length&&(t.charCodeAt(N)!==h||s(N));)N+=1;if(t.charCodeAt(N)!==h)throw new Error("Attribute value didn't end");E=Rl(t.slice(r+1,N)),r=N+1}else{for(var L=r;r<t.length&&(!NR(t.charCodeAt(r))&&t.charCodeAt(r)!==93||s(r));)r+=1;E=Rl(t.slice(L,r))}i(0);var b=t.charCodeAt(r)|32;b===115?(I=!1,i(1)):b===105&&(I=!0,i(1))}if(t.charCodeAt(r)!==93)throw new Error("Attribute selector didn't terminate");r+=1;var M={type:We.SelectorType.Attribute,name:m,action:g,value:E,namespace:v,ignoreCase:I};o.push(M);break}case 58:{if(t.charCodeAt(r+1)===58){o.push({type:We.SelectorType.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(r)===40?a():null});continue}var P=n(1).toLowerCase(),Q=null;if(t.charCodeAt(r)===40)if(tV.has(P)){if(DS(t.charCodeAt(r+1)))throw new Error("Pseudo-selector ".concat(P," cannot be quoted"));if(Q=[],r=OR(Q,t,r+1),t.charCodeAt(r)!==41)throw new Error("Missing closing parenthesis in :".concat(P," (").concat(t,")"));r+=1}else{if(Q=a(),rV.has(P)){var O=Q.charCodeAt(0);O===Q.charCodeAt(Q.length-1)&&DS(O)&&(Q=Q.slice(1,-1))}Q=Rl(Q)}o.push({type:We.SelectorType.Pseudo,name:P,data:Q});break}case 44:{f(),o=[],i(1);break}default:{if(t.startsWith("/*",r)){var ne=t.indexOf("*/",r+2);if(ne<0)throw new Error("Comment was not terminated");r=ne+2,o.length===0&&i(0);break}var v=null,we=void 0;if(p===42)r+=1,we="*";else if(p===124){if(we="",t.charCodeAt(r+1)===124){l(We.SelectorType.ColumnCombinator),i(2);break}}else if($R.test(t.slice(r)))we=n(0);else break e;t.charCodeAt(r)===124&&t.charCodeAt(r+1)!==124&&(v=we,t.charCodeAt(r+1)===42?(we="*",r+=2):we=n(1)),o.push(we==="*"?{type:We.SelectorType.Universal,namespace:v}:{type:We.SelectorType.Tag,name:we,namespace:v})}}}return f(),r}});var zR=Ce(_u=>{"use strict";var Xm=_u&&_u.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(_u,"__esModule",{value:!0});_u.stringify=void 0;var At=Ym(),jR=["\\",'"'],UR=Xm(Xm([],jR,!0),["(",")"],!1),iV=new Set(jR.map(function(e){return e.charCodeAt(0)})),PR=new Set(UR.map(function(e){return e.charCodeAt(0)})),Su=new Set(Xm(Xm([],UR,!0),["~","^","$","*","+","!","|",":","[","]"," ","."],!1).map(function(e){return e.charCodeAt(0)}));function LR(e){return e.map(function(t){return t.map(aV).join("")}).join(", ")}_u.stringify=LR;function aV(e,t,r){switch(e.type){case At.SelectorType.Child:return t===0?"> ":" > ";case At.SelectorType.Parent:return t===0?"< ":" < ";case At.SelectorType.Sibling:return t===0?"~ ":" ~ ";case At.SelectorType.Adjacent:return t===0?"+ ":" + ";case At.SelectorType.Descendant:return" ";case At.SelectorType.ColumnCombinator:return t===0?"|| ":" || ";case At.SelectorType.Universal:return e.namespace==="*"&&t+1<r.length&&"name"in r[t+1]?"":"".concat(FR(e.namespace),"*");case At.SelectorType.Tag:return MR(e);case At.SelectorType.PseudoElement:return"::".concat(Xo(e.name,Su)).concat(e.data===null?"":"(".concat(Xo(e.data,PR),")"));case At.SelectorType.Pseudo:return":".concat(Xo(e.name,Su)).concat(e.data===null?"":"(".concat(typeof e.data=="string"?Xo(e.data,PR):LR(e.data),")"));case At.SelectorType.Attribute:{if(e.name==="id"&&e.action===At.AttributeAction.Equals&&e.ignoreCase==="quirks"&&!e.namespace)return"#".concat(Xo(e.value,Su));if(e.name==="class"&&e.action===At.AttributeAction.Element&&e.ignoreCase==="quirks"&&!e.namespace)return".".concat(Xo(e.value,Su));var o=MR(e);return e.action===At.AttributeAction.Exists?"[".concat(o,"]"):"[".concat(o).concat(sV(e.action),'="').concat(Xo(e.value,iV),'"').concat(e.ignoreCase===null?"":e.ignoreCase?" i":" s","]")}}}function sV(e){switch(e){case At.AttributeAction.Equals:return"";case At.AttributeAction.Element:return"~";case At.AttributeAction.Start:return"^";case At.AttributeAction.End:return"$";case At.AttributeAction.Any:return"*";case At.AttributeAction.Not:return"!";case At.AttributeAction.Hyphen:return"|";case At.AttributeAction.Exists:throw new Error("Shouldn't be here")}}function MR(e){return"".concat(FR(e.namespace)).concat(Xo(e.name,Su))}function FR(e){return e!==null?"".concat(e==="*"?"*":Xo(e,Su),"|"):""}function Xo(e,t){for(var r=0,o="",n=0;n<e.length;n++)t.has(e.charCodeAt(n))&&(o+="".concat(e.slice(r,n),"\\").concat(e.charAt(n)),r=n+1);return o.length>0?o+e.slice(r):e}});var Ol=Ce(Wr=>{"use strict";var uV=Wr&&Wr.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]})),cV=Wr&&Wr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&uV(t,e,r)};Object.defineProperty(Wr,"__esModule",{value:!0});Wr.stringify=Wr.parse=Wr.isTraversal=void 0;cV(Ym(),Wr);var BR=DR();Object.defineProperty(Wr,"isTraversal",{enumerable:!0,get:function(){return BR.isTraversal}});Object.defineProperty(Wr,"parse",{enumerable:!0,get:function(){return BR.parse}});var lV=zR();Object.defineProperty(Wr,"stringify",{enumerable:!0,get:function(){return lV.stringify}})});var p_=Ce(v6=>{var g6={};g6.StyleSheet=function(){this.parentStyleSheet=null};v6.StyleSheet=g6.StyleSheet});var Mr=Ce(y6=>{var _t={};_t.CSSRule=function(){this.parentRule=null,this.parentStyleSheet=null};_t.CSSRule.UNKNOWN_RULE=0;_t.CSSRule.STYLE_RULE=1;_t.CSSRule.CHARSET_RULE=2;_t.CSSRule.IMPORT_RULE=3;_t.CSSRule.MEDIA_RULE=4;_t.CSSRule.FONT_FACE_RULE=5;_t.CSSRule.PAGE_RULE=6;_t.CSSRule.KEYFRAMES_RULE=7;_t.CSSRule.KEYFRAME_RULE=8;_t.CSSRule.MARGIN_RULE=9;_t.CSSRule.NAMESPACE_RULE=10;_t.CSSRule.COUNTER_STYLE_RULE=11;_t.CSSRule.SUPPORTS_RULE=12;_t.CSSRule.DOCUMENT_RULE=13;_t.CSSRule.FONT_FEATURE_VALUES_RULE=14;_t.CSSRule.VIEWPORT_RULE=15;_t.CSSRule.REGION_STYLE_RULE=16;_t.CSSRule.prototype={constructor:_t.CSSRule};y6.CSSRule=_t.CSSRule});var Vl=Ce(A6=>{var qr={CSSStyleDeclaration:Ua().CSSStyleDeclaration,CSSRule:Mr().CSSRule};qr.CSSStyleRule=function(){qr.CSSRule.call(this),this.selectorText="",this.style=new qr.CSSStyleDeclaration,this.style.parentRule=this};qr.CSSStyleRule.prototype=new qr.CSSRule;qr.CSSStyleRule.prototype.constructor=qr.CSSStyleRule;qr.CSSStyleRule.prototype.type=1;Object.defineProperty(qr.CSSStyleRule.prototype,"cssText",{get:function(){var e;return this.selectorText?e=this.selectorText+" {"+this.style.cssText+"}":e="",e},set:function(e){var t=qr.CSSStyleRule.parse(e);this.style=t.style,this.selectorText=t.selectorText}});qr.CSSStyleRule.parse=function(e){for(var t=0,r="selector",o,n=t,i="",a={selector:!0,value:!0},s=new qr.CSSStyleRule,c,l="",d;d=e.charAt(t);t++)switch(d){case" ":case" ":case"\r":case`
6
- `:case"\f":if(a[r])switch(e.charAt(t-1)){case" ":case" ":case"\r":case`
7
- `:case"\f":break;default:i+=" ";break}break;case'"':if(n=t+1,o=e.indexOf('"',n)+1,!o)throw'" is missing';i+=e.slice(t,o),t=o-1;break;case"'":if(n=t+1,o=e.indexOf("'",n)+1,!o)throw"' is missing";i+=e.slice(t,o),t=o-1;break;case"/":if(e.charAt(t+1)==="*"){if(t+=2,o=e.indexOf("*/",t),o===-1)throw new SyntaxError("Missing */");t=o+1}else i+=d;break;case"{":r==="selector"&&(s.selectorText=i.trim(),i="",r="name");break;case":":r==="name"?(c=i.trim(),i="",r="value"):i+=d;break;case"!":r==="value"&&e.indexOf("!important",t)===t?(l="important",t+=9):i+=d;break;case";":r==="value"?(s.style.setProperty(c,i.trim(),l),l="",i="",r="name"):i+=d;break;case"}":if(r==="value")s.style.setProperty(c,i.trim(),l),l="",i="";else{if(r==="name")break;i+=d}r="selector";break;default:i+=d;break}return s};A6.CSSStyleRule=qr.CSSStyleRule});var Hl=Ce(b6=>{var mn={StyleSheet:p_().StyleSheet,CSSStyleRule:Vl().CSSStyleRule};mn.CSSStyleSheet=function(){mn.StyleSheet.call(this),this.cssRules=[]};mn.CSSStyleSheet.prototype=new mn.StyleSheet;mn.CSSStyleSheet.prototype.constructor=mn.CSSStyleSheet;mn.CSSStyleSheet.prototype.insertRule=function(e,t){if(t<0||t>this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");var r=mn.parse(e).cssRules[0];return r.parentStyleSheet=this,this.cssRules.splice(t,0,r),t};mn.CSSStyleSheet.prototype.deleteRule=function(e){if(e<0||e>=this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");this.cssRules.splice(e,1)};mn.CSSStyleSheet.prototype.toString=function(){for(var e="",t=this.cssRules,r=0;r<t.length;r++)e+=t[r].cssText+`
8
- `;return e};b6.CSSStyleSheet=mn.CSSStyleSheet;mn.parse=yh().parse});var bh=Ce(x6=>{var Ah={};Ah.MediaList=function(){this.length=0};Ah.MediaList.prototype={constructor:Ah.MediaList,get mediaText(){return Array.prototype.join.call(this,", ")},set mediaText(e){for(var t=e.split(","),r=this.length=t.length,o=0;o<r;o++)this[o]=t[o].trim()},appendMedium:function(e){Array.prototype.indexOf.call(this,e)===-1&&(this[this.length]=e,this.length++)},deleteMedium:function(e){var t=Array.prototype.indexOf.call(this,e);t!==-1&&Array.prototype.splice.call(this,t,1)}};x6.MediaList=Ah.MediaList});var f_=Ce(w6=>{var Un={CSSRule:Mr().CSSRule,CSSStyleSheet:Hl().CSSStyleSheet,MediaList:bh().MediaList};Un.CSSImportRule=function(){Un.CSSRule.call(this),this.href="",this.media=new Un.MediaList,this.styleSheet=new Un.CSSStyleSheet};Un.CSSImportRule.prototype=new Un.CSSRule;Un.CSSImportRule.prototype.constructor=Un.CSSImportRule;Un.CSSImportRule.prototype.type=3;Object.defineProperty(Un.CSSImportRule.prototype,"cssText",{get:function(){var e=this.media.mediaText;return"@import url("+this.href+")"+(e?" "+e:"")+";"},set:function(e){for(var t=0,r="",o="",n,i;i=e.charAt(t);t++)switch(i){case" ":case" ":case"\r":case`
9
- `:case"\f":r==="after-import"?r="url":o+=i;break;case"@":!r&&e.indexOf("@import",t)===t&&(r="after-import",t+=6,o="");break;case"u":if(r==="url"&&e.indexOf("url(",t)===t){if(n=e.indexOf(")",t+1),n===-1)throw t+': ")" not found';t+=4;var a=e.slice(t,n);a[0]===a[a.length-1]&&(a[0]==='"'||a[0]==="'")&&(a=a.slice(1,-1)),this.href=a,t=n,r="media"}break;case'"':if(r==="url"){if(n=e.indexOf('"',t+1),!n)throw t+`: '"' not found`;this.href=e.slice(t+1,n),t=n,r="media"}break;case"'":if(r==="url"){if(n=e.indexOf("'",t+1),!n)throw t+`: "'" not found`;this.href=e.slice(t+1,n),t=n,r="media"}break;case";":r==="media"&&o&&(this.media.mediaText=o.trim());break;default:r==="media"&&(o+=i);break}}});w6.CSSImportRule=Un.CSSImportRule});var La=Ce(S6=>{var co={CSSRule:Mr().CSSRule};co.CSSGroupingRule=function(){co.CSSRule.call(this),this.cssRules=[]};co.CSSGroupingRule.prototype=new co.CSSRule;co.CSSGroupingRule.prototype.constructor=co.CSSGroupingRule;co.CSSGroupingRule.prototype.insertRule=function(t,r){if(r<0||r>this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");var o=co.parse(t).cssRules[0];return o.parentRule=this,this.cssRules.splice(r,0,o),r};co.CSSGroupingRule.prototype.deleteRule=function(t){if(t<0||t>=this.cssRules.length)throw new RangeError("INDEX_SIZE_ERR");this.cssRules.splice(t,1)[0].parentRule=null};S6.CSSGroupingRule=co.CSSGroupingRule});var $u=Ce(_6=>{var ri={CSSRule:Mr().CSSRule,CSSGroupingRule:La().CSSGroupingRule};ri.CSSConditionRule=function(){ri.CSSGroupingRule.call(this),this.cssRules=[]};ri.CSSConditionRule.prototype=new ri.CSSGroupingRule;ri.CSSConditionRule.prototype.constructor=ri.CSSConditionRule;ri.CSSConditionRule.prototype.conditionText="";ri.CSSConditionRule.prototype.cssText="";_6.CSSConditionRule=ri.CSSConditionRule});var xh=Ce(I6=>{var lo={CSSRule:Mr().CSSRule,CSSGroupingRule:La().CSSGroupingRule,CSSConditionRule:$u().CSSConditionRule,MediaList:bh().MediaList};lo.CSSMediaRule=function(){lo.CSSConditionRule.call(this),this.media=new lo.MediaList};lo.CSSMediaRule.prototype=new lo.CSSConditionRule;lo.CSSMediaRule.prototype.constructor=lo.CSSMediaRule;lo.CSSMediaRule.prototype.type=4;Object.defineProperties(lo.CSSMediaRule.prototype,{conditionText:{get:function(){return this.media.mediaText},set:function(e){this.media.mediaText=e},configurable:!0,enumerable:!0},cssText:{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(this.cssRules[t].cssText);return"@media "+this.media.mediaText+" {"+e.join("")+"}"},configurable:!0,enumerable:!0}});I6.CSSMediaRule=lo.CSSMediaRule});var wh=Ce(E6=>{var ni={CSSRule:Mr().CSSRule,CSSGroupingRule:La().CSSGroupingRule,CSSConditionRule:$u().CSSConditionRule};ni.CSSSupportsRule=function(){ni.CSSConditionRule.call(this)};ni.CSSSupportsRule.prototype=new ni.CSSConditionRule;ni.CSSSupportsRule.prototype.constructor=ni.CSSSupportsRule;ni.CSSSupportsRule.prototype.type=12;Object.defineProperty(ni.CSSSupportsRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(this.cssRules[t].cssText);return"@supports "+this.conditionText+" {"+e.join("")+"}"}});E6.CSSSupportsRule=ni.CSSSupportsRule});var m_=Ce(k6=>{var po={CSSStyleDeclaration:Ua().CSSStyleDeclaration,CSSRule:Mr().CSSRule};po.CSSFontFaceRule=function(){po.CSSRule.call(this),this.style=new po.CSSStyleDeclaration,this.style.parentRule=this};po.CSSFontFaceRule.prototype=new po.CSSRule;po.CSSFontFaceRule.prototype.constructor=po.CSSFontFaceRule;po.CSSFontFaceRule.prototype.type=5;Object.defineProperty(po.CSSFontFaceRule.prototype,"cssText",{get:function(){return"@font-face {"+this.style.cssText+"}"}});k6.CSSFontFaceRule=po.CSSFontFaceRule});var h_=Ce(T6=>{var oi={CSSRule:Mr().CSSRule};oi.CSSHostRule=function(){oi.CSSRule.call(this),this.cssRules=[]};oi.CSSHostRule.prototype=new oi.CSSRule;oi.CSSHostRule.prototype.constructor=oi.CSSHostRule;oi.CSSHostRule.prototype.type=1001;Object.defineProperty(oi.CSSHostRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(this.cssRules[t].cssText);return"@host {"+e.join("")+"}"}});T6.CSSHostRule=oi.CSSHostRule});var Sh=Ce(C6=>{var fo={CSSRule:Mr().CSSRule,CSSStyleDeclaration:Ua().CSSStyleDeclaration};fo.CSSKeyframeRule=function(){fo.CSSRule.call(this),this.keyText="",this.style=new fo.CSSStyleDeclaration,this.style.parentRule=this};fo.CSSKeyframeRule.prototype=new fo.CSSRule;fo.CSSKeyframeRule.prototype.constructor=fo.CSSKeyframeRule;fo.CSSKeyframeRule.prototype.type=8;Object.defineProperty(fo.CSSKeyframeRule.prototype,"cssText",{get:function(){return this.keyText+" {"+this.style.cssText+"} "}});C6.CSSKeyframeRule=fo.CSSKeyframeRule});var _h=Ce($6=>{var ii={CSSRule:Mr().CSSRule};ii.CSSKeyframesRule=function(){ii.CSSRule.call(this),this.name="",this.cssRules=[]};ii.CSSKeyframesRule.prototype=new ii.CSSRule;ii.CSSKeyframesRule.prototype.constructor=ii.CSSKeyframesRule;ii.CSSKeyframesRule.prototype.type=7;Object.defineProperty(ii.CSSKeyframesRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(" "+this.cssRules[t].cssText);return"@"+(this._vendorPrefix||"")+"keyframes "+this.name+` {
10
- `+e.join(`
11
- `)+`
12
- }`}});$6.CSSKeyframesRule=ii.CSSKeyframesRule});var g_=Ce(N6=>{var Ih={};Ih.CSSValue=function(){};Ih.CSSValue.prototype={constructor:Ih.CSSValue,set cssText(e){var t=this._getConstructorName();throw new Error('DOMException: property "cssText" of "'+t+'" is readonly and can not be replaced with "'+e+'"!')},get cssText(){var e=this._getConstructorName();throw new Error('getter "cssText" of "'+e+'" is not implemented!')},_getConstructorName:function(){var e=this.constructor.toString(),t=e.match(/function\s([^\(]+)/),r=t[1];return r}};N6.CSSValue=Ih.CSSValue});var v_=Ce(R6=>{var Ln={CSSValue:g_().CSSValue};Ln.CSSValueExpression=function(t,r){this._token=t,this._idx=r};Ln.CSSValueExpression.prototype=new Ln.CSSValue;Ln.CSSValueExpression.prototype.constructor=Ln.CSSValueExpression;Ln.CSSValueExpression.prototype.parse=function(){for(var e=this._token,t=this._idx,r="",o="",n="",i,a=[];;++t){if(r=e.charAt(t),r===""){n="css expression error: unfinished expression!";break}switch(r){case"(":a.push(r),o+=r;break;case")":a.pop(r),o+=r;break;case"/":(i=this._parseJSComment(e,t))?i.error?n="css expression error: unfinished comment in expression!":t=i.idx:(i=this._parseJSRexExp(e,t))?(t=i.idx,o+=i.text):o+=r;break;case"'":case'"':i=this._parseJSString(e,t,r),i?(t=i.idx,o+=i.text):o+=r;break;default:o+=r;break}if(n||a.length===0)break}var s;return n?s={error:n}:s={idx:t,expression:o},s};Ln.CSSValueExpression.prototype._parseJSComment=function(e,t){var r=e.charAt(t+1),o;if(r==="/"||r==="*"){var n=t,i,a;if(r==="/"?a=`
13
- `:r==="*"&&(a="*/"),i=e.indexOf(a,n+1+1),i!==-1)return i=i+a.length-1,o=e.substring(t,i+1),{idx:i,text:o};var s="css expression error: unfinished comment in expression!";return{error:s}}else return!1};Ln.CSSValueExpression.prototype._parseJSString=function(e,t,r){var o=this._findMatchedIdx(e,t,r),n;return o===-1?!1:(n=e.substring(t,o+r.length),{idx:o,text:n})};Ln.CSSValueExpression.prototype._parseJSRexExp=function(e,t){var r=e.substring(0,t).replace(/\s+$/,""),o=[/^$/,/\($/,/\[$/,/\!$/,/\+$/,/\-$/,/\*$/,/\/\s+/,/\%$/,/\=$/,/\>$/,/<$/,/\&$/,/\|$/,/\^$/,/\~$/,/\?$/,/\,$/,/delete$/,/in$/,/instanceof$/,/new$/,/typeof$/,/void$/],n=o.some(function(a){return a.test(r)});if(n){var i="/";return this._parseJSString(e,t,i)}else return!1};Ln.CSSValueExpression.prototype._findMatchedIdx=function(e,t,r){for(var o=t,n,i=-1;;)if(n=e.indexOf(r,o+1),n===-1){n=i;break}else{var a=e.substring(t+1,n),s=a.match(/\\+$/);if(!s||s[0]%2===0)break;o=n}var c=e.indexOf(`
14
- `,t+1);return c<n&&(n=i),n};R6.CSSValueExpression=Ln.CSSValueExpression});var y_=Ce(O6=>{var Eh={};Eh.MatcherList=function(){this.length=0};Eh.MatcherList.prototype={constructor:Eh.MatcherList,get matcherText(){return Array.prototype.join.call(this,", ")},set matcherText(e){for(var t=e.split(","),r=this.length=t.length,o=0;o<r;o++)this[o]=t[o].trim()},appendMatcher:function(e){Array.prototype.indexOf.call(this,e)===-1&&(this[this.length]=e,this.length++)},deleteMatcher:function(e){var t=Array.prototype.indexOf.call(this,e);t!==-1&&Array.prototype.splice.call(this,t,1)}};O6.MatcherList=Eh.MatcherList});var A_=Ce(D6=>{var mo={CSSRule:Mr().CSSRule,MatcherList:y_().MatcherList};mo.CSSDocumentRule=function(){mo.CSSRule.call(this),this.matcher=new mo.MatcherList,this.cssRules=[]};mo.CSSDocumentRule.prototype=new mo.CSSRule;mo.CSSDocumentRule.prototype.constructor=mo.CSSDocumentRule;mo.CSSDocumentRule.prototype.type=10;Object.defineProperty(mo.CSSDocumentRule.prototype,"cssText",{get:function(){for(var e=[],t=0,r=this.cssRules.length;t<r;t++)e.push(this.cssRules[t].cssText);return"@-moz-document "+this.matcher.matcherText+" {"+e.join("")+"}"}});D6.CSSDocumentRule=mo.CSSDocumentRule});var yh=Ce(P6=>{var rt={};rt.parse=function(t){for(var r=0,o="before-selector",n,i="",a=0,s={selector:!0,value:!0,"value-parenthesis":!0,atRule:!0,"importRule-begin":!0,importRule:!0,atBlock:!0,conditionBlock:!0,"documentRule-begin":!0},c=new rt.CSSStyleSheet,l=c,d,f=[],p=!1,m,v,g="",y,E,I,h,N,L,b,M,P=/@(-(?:\w+-)+)?keyframes/g,Q=function(De){var ge=t.substring(0,r).split(`
15
- `),xe=ge.length,Ie=ge.pop().length+1,K=new Error(De+" (line "+xe+", char "+Ie+")");throw K.line=xe,K.char=Ie,K.styleSheet=c,K},O;O=t.charAt(r);r++)switch(O){case" ":case" ":case"\r":case`
16
- `:case"\f":s[o]&&(i+=O);break;case'"':n=r+1;do n=t.indexOf('"',n)+1,n||Q('Unmatched "');while(t[n-2]==="\\");switch(i+=t.slice(r,n),r=n-1,o){case"before-value":o="value";break;case"importRule-begin":o="importRule";break}break;case"'":n=r+1;do n=t.indexOf("'",n)+1,n||Q("Unmatched '");while(t[n-2]==="\\");switch(i+=t.slice(r,n),r=n-1,o){case"before-value":o="value";break;case"importRule-begin":o="importRule";break}break;case"/":t.charAt(r+1)==="*"?(r+=2,n=t.indexOf("*/",r),n===-1?Q("Missing */"):r=n+1):i+=O,o==="importRule-begin"&&(i+=" ",o="importRule");break;case"@":if(t.indexOf("@-moz-document",r)===r){o="documentRule-begin",b=new rt.CSSDocumentRule,b.__starts=r,r+=13,i="";break}else if(t.indexOf("@media",r)===r){o="atBlock",E=new rt.CSSMediaRule,E.__starts=r,r+=5,i="";break}else if(t.indexOf("@supports",r)===r){o="conditionBlock",I=new rt.CSSSupportsRule,I.__starts=r,r+=8,i="";break}else if(t.indexOf("@host",r)===r){o="hostRule-begin",r+=4,M=new rt.CSSHostRule,M.__starts=r,i="";break}else if(t.indexOf("@import",r)===r){o="importRule-begin",r+=6,i+="@import";break}else if(t.indexOf("@font-face",r)===r){o="fontFaceRule-begin",r+=9,N=new rt.CSSFontFaceRule,N.__starts=r,i="";break}else{P.lastIndex=r;var ne=P.exec(t);if(ne&&ne.index===r){o="keyframesRule-begin",L=new rt.CSSKeyframesRule,L.__starts=r,L._vendorPrefix=ne[1],r+=ne[0].length-1,i="";break}else o==="selector"&&(o="atRule")}i+=O;break;case"{":o==="selector"||o==="atRule"?(y.selectorText=i.trim(),y.style.__starts=r,i="",o="before-name"):o==="atBlock"?(E.media.mediaText=i.trim(),d&&f.push(d),l=d=E,E.parentStyleSheet=c,i="",o="before-selector"):o==="conditionBlock"?(I.conditionText=i.trim(),d&&f.push(d),l=d=I,I.parentStyleSheet=c,i="",o="before-selector"):o==="hostRule-begin"?(d&&f.push(d),l=d=M,M.parentStyleSheet=c,i="",o="before-selector"):o==="fontFaceRule-begin"?(d&&(N.parentRule=d),N.parentStyleSheet=c,y=N,i="",o="before-name"):o==="keyframesRule-begin"?(L.name=i.trim(),d&&(f.push(d),L.parentRule=d),L.parentStyleSheet=c,l=d=L,i="",o="keyframeRule-begin"):o==="keyframeRule-begin"?(y=new rt.CSSKeyframeRule,y.keyText=i.trim(),y.__starts=r,i="",o="before-name"):o==="documentRule-begin"&&(b.matcher.matcherText=i.trim(),d&&(f.push(d),b.parentRule=d),l=d=b,b.parentStyleSheet=c,i="",o="before-selector");break;case":":o==="name"?(v=i.trim(),i="",o="before-value"):i+=O;break;case"(":if(o==="value")if(i.trim()==="expression"){var we=new rt.CSSValueExpression(t,r).parse();we.error?Q(we.error):(i+=we.expression,r=we.idx)}else o="value-parenthesis",a=1,i+=O;else o==="value-parenthesis"&&a++,i+=O;break;case")":o==="value-parenthesis"&&(a--,a===0&&(o="value")),i+=O;break;case"!":o==="value"&&t.indexOf("!important",r)===r?(g="important",r+=9):i+=O;break;case";":switch(o){case"value":y.style.setProperty(v,i.trim(),g),g="",i="",o="before-name";break;case"atRule":i="",o="before-selector";break;case"importRule":h=new rt.CSSImportRule,h.parentStyleSheet=h.styleSheet.parentStyleSheet=c,h.cssText=i+O,c.cssRules.push(h),i="",o="before-selector";break;default:i+=O;break}break;case"}":switch(o){case"value":y.style.setProperty(v,i.trim(),g),g="";case"before-name":case"name":y.__ends=r+1,d&&(y.parentRule=d),y.parentStyleSheet=c,l.cssRules.push(y),i="",l.constructor===rt.CSSKeyframesRule?o="keyframeRule-begin":o="before-selector";break;case"keyframeRule-begin":case"before-selector":case"selector":for(d||Q("Unexpected }"),p=f.length>0;f.length>0;){if(d=f.pop(),d.constructor.name==="CSSMediaRule"||d.constructor.name==="CSSSupportsRule"){m=l,l=d,l.cssRules.push(m);break}f.length===0&&(p=!1)}p||(l.__ends=r+1,c.cssRules.push(l),l=c,d=null),i="",o="before-selector";break}break;default:switch(o){case"before-selector":o="selector",y=new rt.CSSStyleRule,y.__starts=r;break;case"before-name":o="name";break;case"before-value":o="value";break;case"importRule-begin":o="importRule";break}i+=O;break}return c};P6.parse=rt.parse;rt.CSSStyleSheet=Hl().CSSStyleSheet;rt.CSSStyleRule=Vl().CSSStyleRule;rt.CSSImportRule=f_().CSSImportRule;rt.CSSGroupingRule=La().CSSGroupingRule;rt.CSSMediaRule=xh().CSSMediaRule;rt.CSSConditionRule=$u().CSSConditionRule;rt.CSSSupportsRule=wh().CSSSupportsRule;rt.CSSFontFaceRule=m_().CSSFontFaceRule;rt.CSSHostRule=h_().CSSHostRule;rt.CSSStyleDeclaration=Ua().CSSStyleDeclaration;rt.CSSKeyframeRule=Sh().CSSKeyframeRule;rt.CSSKeyframesRule=_h().CSSKeyframesRule;rt.CSSValueExpression=v_().CSSValueExpression;rt.CSSDocumentRule=A_().CSSDocumentRule});var Ua=Ce(M6=>{var Nu={};Nu.CSSStyleDeclaration=function(){this.length=0,this.parentRule=null,this._importants={}};Nu.CSSStyleDeclaration.prototype={constructor:Nu.CSSStyleDeclaration,getPropertyValue:function(e){return this[e]||""},setProperty:function(e,t,r){if(this[e]){var o=Array.prototype.indexOf.call(this,e);o<0&&(this[this.length]=e,this.length++)}else this[this.length]=e,this.length++;this[e]=t+"",this._importants[e]=r},removeProperty:function(e){if(!(e in this))return"";var t=Array.prototype.indexOf.call(this,e);if(t<0)return"";var r=this[e];return this[e]="",Array.prototype.splice.call(this,t,1),r},getPropertyCSSValue:function(){},getPropertyPriority:function(e){return this._importants[e]||""},getPropertyShorthand:function(){},isPropertyImplicit:function(){},get cssText(){for(var e=[],t=0,r=this.length;t<r;++t){var o=this[t],n=this.getPropertyValue(o),i=this.getPropertyPriority(o);i&&(i=" !"+i),e[t]=o+": "+n+i+";"}return e.join(" ")},set cssText(e){var t,r;for(t=this.length;t--;)r=this[t],this[r]="";Array.prototype.splice.call(this,0,this.length),this._importants={};var o=Nu.parse("#bogus{"+e+"}").cssRules[0].style,n=o.length;for(t=0;t<n;++t)r=o[t],this.setProperty(o[t],o.getPropertyValue(r),o.getPropertyPriority(r))}};M6.CSSStyleDeclaration=Nu.CSSStyleDeclaration;Nu.parse=yh().parse});var U6=Ce(j6=>{var kh={CSSStyleSheet:Hl().CSSStyleSheet,CSSRule:Mr().CSSRule,CSSStyleRule:Vl().CSSStyleRule,CSSGroupingRule:La().CSSGroupingRule,CSSConditionRule:$u().CSSConditionRule,CSSMediaRule:xh().CSSMediaRule,CSSSupportsRule:wh().CSSSupportsRule,CSSStyleDeclaration:Ua().CSSStyleDeclaration,CSSKeyframeRule:Sh().CSSKeyframeRule,CSSKeyframesRule:_h().CSSKeyframesRule};kh.clone=function e(t){var r=new kh.CSSStyleSheet,o=t.cssRules;if(!o)return r;for(var n=0,i=o.length;n<i;n++){var a=o[n],s=r.cssRules[n]=new a.constructor,c=a.style;if(c){for(var l=s.style=new kh.CSSStyleDeclaration,d=0,f=c.length;d<f;d++){var p=l[d]=c[d];l[p]=c[p],l._importants[p]=c.getPropertyPriority(p)}l.length=c.length}a.hasOwnProperty("keyText")&&(s.keyText=a.keyText),a.hasOwnProperty("selectorText")&&(s.selectorText=a.selectorText),a.hasOwnProperty("mediaText")&&(s.mediaText=a.mediaText),a.hasOwnProperty("conditionText")&&(s.conditionText=a.conditionText),a.hasOwnProperty("cssRules")&&(s.cssRules=e(a).cssRules)}return r};j6.clone=kh.clone});var L6=Ce(bt=>{"use strict";bt.CSSStyleDeclaration=Ua().CSSStyleDeclaration;bt.CSSRule=Mr().CSSRule;bt.CSSGroupingRule=La().CSSGroupingRule;bt.CSSConditionRule=$u().CSSConditionRule;bt.CSSStyleRule=Vl().CSSStyleRule;bt.MediaList=bh().MediaList;bt.CSSMediaRule=xh().CSSMediaRule;bt.CSSSupportsRule=wh().CSSSupportsRule;bt.CSSImportRule=f_().CSSImportRule;bt.CSSFontFaceRule=m_().CSSFontFaceRule;bt.CSSHostRule=h_().CSSHostRule;bt.StyleSheet=p_().StyleSheet;bt.CSSStyleSheet=Hl().CSSStyleSheet;bt.CSSKeyframesRule=_h().CSSKeyframesRule;bt.CSSKeyframeRule=Sh().CSSKeyframeRule;bt.MatcherList=y_().MatcherList;bt.CSSDocumentRule=A_().CSSDocumentRule;bt.CSSValue=g_().CSSValue;bt.CSSValueExpression=v_().CSSValueExpression;bt.parse=yh().parse;bt.clone=U6().clone});var V6=Ce((Ple,G6)=>{var b_=class{constructor(t,r){this.width=t,this.height=r}getContext(){return null}toDataURL(){return""}};G6.exports={createCanvas:(e,t)=>new b_(e,t)}});var H6=Ce((Mle,x_)=>{try{x_.exports=_o("canvas")}catch{x_.exports=V6()}});var cO={};lr(cO,{createChat:()=>pi,deleteAllChats:()=>_d,deleteChat:()=>Kg,findEmptyChat:()=>uO,generateId:()=>Jg,getOrCreateChat:()=>W_,listChats:()=>vo,loadChat:()=>V_,saveChat:()=>jr,searchChats:()=>H_});import*as di from"node:fs";import*as Z_ from"node:path";function G_(e){return Z_.join(Pi,`${e}.json`)}function Jg(){return Date.now().toString(36)+Math.random().toString(36).slice(2,6)}function pi(e){lm();let t={id:Jg(),title:"New chat",messages:[],model:e,tokens:0,cost:0,createdAt:Date.now(),updatedAt:Date.now()};return jr(t),t}function jr(e){if(lm(),e.updatedAt=Date.now(),e.messages.length>0&&e.title==="New chat"){let t=e.messages.find(r=>r.role==="user");t&&(e.title=t.content.slice(0,50).trim(),t.content.length>50&&(e.title+="..."))}di.writeFileSync(G_(e.id),JSON.stringify(e))}function V_(e){try{let t=di.readFileSync(G_(e),"utf-8");return JSON.parse(t)}catch(t){return Nt(t),null}}function vo(){lm();try{let e=di.readdirSync(Pi).filter(r=>r.endsWith(".json")),t=[];for(let r of e)try{let o=di.readFileSync(Z_.join(Pi,r),"utf-8");t.push(JSON.parse(o))}catch(o){Nt(o)}return t.sort((r,o)=>o.updatedAt-r.updatedAt)}catch(e){return Nt(e),[]}}function Kg(e){try{return di.unlinkSync(G_(e)),!0}catch{return!1}}function _d(){let e=vo(),t=0;for(let r of e)Kg(r.id)&&t++;return t}function H_(e){let t=vo(),r=e.toLowerCase(),o=t.find(n=>n.id===e);return o?[o]:t.filter(n=>n.title.toLowerCase().includes(r)||n.messages.some(i=>i.role==="user"&&i.content.toLowerCase().includes(r)))}function uO(){return vo().find(t=>t.messages.length===0)||null}function W_(e){let t=uO();return t?(t.model=e,jr(t),t):pi(e)}var fi=Ud(()=>{"use strict";Di();xr()});var lO={};lr(lO,{chat:()=>J_,restoreHistory:()=>Id});function Id(e,t){let r={user:[],assistant:[]};for(let o of e.chat.messages)o.role==="user"?(t.push({role:"user",content:o.content}),r.user.push(o.content)):o.role==="assistant"&&(t.push({role:"assistant",content:[{type:"text",text:o.content}]}),r.assistant.push(o.content));return r}var q_,J_,K_=Ud(()=>{"use strict";fi();q_=10,J_=(e,t)=>{let r=t?.trim().toLowerCase()||"",o=vo();if(r==="new"||r==="n")return{chat:pi(e.model),tokens:0,cost:0,clearHistory:!0,clearScreen:!0};if(r==="delete all"){if(o.length===0)return{output:"no chats"};let s=_d();return{chat:pi(e.model),tokens:0,cost:0,clearHistory:!0,clearScreen:!0,output:`deleted ${s} chat(s)`}}if(r==="delete"||r==="d")return!e.chat||e.chat.messages.length===0?{output:"nothing to delete"}:(Kg(e.chat.id),{chat:null,tokens:0,cost:0,clearHistory:!0,clearScreen:!0,output:"deleted"});if(!r){if(o.length===0)return{output:"no saved chats"};let s=["saved chats:"];for(let c=0;c<Math.min(o.length,q_);c++){let l=o[c],d=new Date(l.updatedAt).toLocaleDateString(),f=e.chat&&l.id===e.chat.id?"\u203A ":" ";s.push(`${f}${c+1}. ${l.title} (${d})`)}return o.length>q_&&s.push(` ... and ${o.length-q_} more`),s.push(`
17
- /chat <n> | new | delete | delete all`),{output:s.join(`
18
- `)}}let n=Number.parseInt(r,10),i;if(!Number.isNaN(n)&&n>0&&n<=o.length)i=o[n-1];else{let s=H_(r);s.length>0&&(i=s[0])}return i?{chat:i,model:i.model,tokens:i.tokens||0,cost:i.cost||0,clearHistory:!0,clearScreen:!0}:{output:"not found"}}});var hD=Ut(d1(),1);var F1="vercel.ai.error",wD=Symbol.for(F1),p1,f1,W=class z1 extends(f1=Error,p1=wD,f1){constructor({name:t,message:r,cause:o}){super(r),this[p1]=!0,this.name=t,this.cause=o}static isInstance(t){return z1.hasMarker(t,F1)}static hasMarker(t,r){let o=Symbol.for(r);return t!=null&&typeof t=="object"&&o in t&&typeof t[o]=="boolean"&&t[o]===!0}},B1="AI_APICallError",Z1=`vercel.ai.error.${B1}`,SD=Symbol.for(Z1),m1,h1,ht=class extends(h1=W,m1=SD,h1){constructor({message:e,url:t,requestBodyValues:r,statusCode:o,responseHeaders:n,responseBody:i,cause:a,isRetryable:s=o!=null&&(o===408||o===409||o===429||o>=500),data:c}){super({name:B1,message:e,cause:a}),this[m1]=!0,this.url=t,this.requestBodyValues=r,this.statusCode=o,this.responseHeaders=n,this.responseBody=i,this.isRetryable=s,this.data=c}static isInstance(e){return W.hasMarker(e,Z1)}},G1="AI_EmptyResponseBodyError",V1=`vercel.ai.error.${G1}`,_D=Symbol.for(V1),g1,v1,H1=class extends(v1=W,g1=_D,v1){constructor({message:e="Empty response body"}={}){super({name:G1,message:e}),this[g1]=!0}static isInstance(e){return W.hasMarker(e,V1)}};function gn(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var W1="AI_InvalidArgumentError",q1=`vercel.ai.error.${W1}`,ID=Symbol.for(q1),y1,A1,Ld=class extends(A1=W,y1=ID,A1){constructor({message:e,cause:t,argument:r}){super({name:W1,message:e,cause:t}),this[y1]=!0,this.argument=r}static isInstance(e){return W.hasMarker(e,q1)}},J1="AI_InvalidPromptError",K1=`vercel.ai.error.${J1}`,ED=Symbol.for(K1),b1,x1,oa=class extends(x1=W,b1=ED,x1){constructor({prompt:e,message:t,cause:r}){super({name:J1,message:`Invalid prompt: ${t}`,cause:r}),this[b1]=!0,this.prompt=e}static isInstance(e){return W.hasMarker(e,K1)}},Q1="AI_InvalidResponseDataError",Y1=`vercel.ai.error.${Q1}`,kD=Symbol.for(Y1),w1,S1,lW=class extends(S1=W,w1=kD,S1){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:Q1,message:t}),this[w1]=!0,this.data=e}static isInstance(e){return W.hasMarker(e,Y1)}},X1="AI_JSONParseError",eI=`vercel.ai.error.${X1}`,TD=Symbol.for(eI),_1,I1,gi=class extends(I1=W,_1=TD,I1){constructor({text:e,cause:t}){super({name:X1,message:`JSON parsing failed: Text: ${e}.
19
- Error message: ${gn(t)}`,cause:t}),this[_1]=!0,this.text=e}static isInstance(e){return W.hasMarker(e,eI)}},tI="AI_LoadAPIKeyError",rI=`vercel.ai.error.${tI}`,CD=Symbol.for(rI),E1,k1,dW=class extends(k1=W,E1=CD,k1){constructor({message:e}){super({name:tI,message:e}),this[E1]=!0}static isInstance(e){return W.hasMarker(e,rI)}},nI="AI_LoadSettingError",oI=`vercel.ai.error.${nI}`,$D=Symbol.for(oI),T1,C1,pW=class extends(C1=W,T1=$D,C1){constructor({message:e}){super({name:nI,message:e}),this[T1]=!0}static isInstance(e){return W.hasMarker(e,oI)}},iI="AI_NoContentGeneratedError",aI=`vercel.ai.error.${iI}`,ND=Symbol.for(aI),$1,N1,fW=class extends(N1=W,$1=ND,N1){constructor({message:e="No content generated."}={}){super({name:iI,message:e}),this[$1]=!0}static isInstance(e){return W.hasMarker(e,aI)}},sI="AI_NoSuchModelError",uI=`vercel.ai.error.${sI}`,RD=Symbol.for(uI),R1,O1,mW=class extends(O1=W,R1=RD,O1){constructor({errorName:e=sI,modelId:t,modelType:r,message:o=`No such ${r}: ${t}`}){super({name:e,message:o}),this[R1]=!0,this.modelId=t,this.modelType=r}static isInstance(e){return W.hasMarker(e,uI)}},cI="AI_TooManyEmbeddingValuesForCallError",lI=`vercel.ai.error.${cI}`,OD=Symbol.for(lI),D1,P1,hW=class extends(P1=W,D1=OD,P1){constructor(e){super({name:cI,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[D1]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return W.hasMarker(e,lI)}},dI="AI_TypeValidationError",pI=`vercel.ai.error.${dI}`,DD=Symbol.for(pI),M1,j1,qt=class E0 extends(j1=W,M1=DD,j1){constructor({value:t,cause:r,context:o}){let n="Type validation failed";if(o?.field&&(n+=` for ${o.field}`),o?.entityName||o?.entityId){n+=" (";let i=[];o.entityName&&i.push(o.entityName),o.entityId&&i.push(`id: "${o.entityId}"`),n+=i.join(", "),n+=")"}super({name:dI,message:`${n}: Value: ${JSON.stringify(t)}.
20
- Error message: ${gn(r)}`,cause:r}),this[M1]=!0,this.value=t,this.context=o}static isInstance(t){return W.hasMarker(t,pI)}static wrap({value:t,cause:r,context:o}){var n,i,a;return E0.isInstance(r)&&r.value===t&&((n=r.context)==null?void 0:n.field)===o?.field&&((i=r.context)==null?void 0:i.entityName)===o?.entityName&&((a=r.context)==null?void 0:a.entityId)===o?.entityId?r:new E0({value:t,cause:r,context:o})}},fI="AI_UnsupportedFunctionalityError",mI=`vercel.ai.error.${fI}`,PD=Symbol.for(mI),U1,L1,hI=class extends(L1=W,U1=PD,L1){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:fI,message:t}),this[U1]=!0,this.functionality=e}static isInstance(e){return W.hasMarker(e,mI)}};var u={};lr(u,{$brand:()=>Fd,$input:()=>Hy,$output:()=>Vy,NEVER:()=>k0,TimePrecision:()=>Ky,ZodAny:()=>Ub,ZodArray:()=>Bb,ZodBase64:()=>ff,ZodBase64URL:()=>mf,ZodBigInt:()=>$s,ZodBigIntFormat:()=>vf,ZodBoolean:()=>Cs,ZodCIDRv4:()=>df,ZodCIDRv6:()=>pf,ZodCUID:()=>nf,ZodCUID2:()=>of,ZodCatch:()=>lx,ZodCodec:()=>If,ZodCustom:()=>$c,ZodCustomStringFormat:()=>ks,ZodDate:()=>Ic,ZodDefault:()=>ox,ZodDiscriminatedUnion:()=>Gb,ZodE164:()=>hf,ZodEmail:()=>ef,ZodEmoji:()=>tf,ZodEnum:()=>Is,ZodError:()=>cj,ZodExactOptional:()=>tx,ZodFile:()=>Xb,ZodFirstPartyTypeKind:()=>wx,ZodFunction:()=>Ax,ZodGUID:()=>bc,ZodIPv4:()=>cf,ZodIPv6:()=>lf,ZodISODate:()=>qp,ZodISODateTime:()=>Wp,ZodISODuration:()=>Kp,ZodISOTime:()=>Jp,ZodIntersection:()=>Vb,ZodIssueCode:()=>dj,ZodJWT:()=>gf,ZodKSUID:()=>uf,ZodLazy:()=>gx,ZodLiteral:()=>Yb,ZodMAC:()=>Nb,ZodMap:()=>Kb,ZodNaN:()=>px,ZodNanoID:()=>rf,ZodNever:()=>Fb,ZodNonOptional:()=>Sf,ZodNull:()=>Mb,ZodNullable:()=>nx,ZodNumber:()=>Ts,ZodNumberFormat:()=>fa,ZodObject:()=>kc,ZodOptional:()=>wf,ZodPipe:()=>_f,ZodPrefault:()=>ax,ZodPromise:()=>yx,ZodReadonly:()=>fx,ZodRealError:()=>Tr,ZodRecord:()=>Cc,ZodSet:()=>Qb,ZodString:()=>Es,ZodStringFormat:()=>et,ZodSuccess:()=>cx,ZodSymbol:()=>Db,ZodTemplateLiteral:()=>hx,ZodTransform:()=>ex,ZodTuple:()=>Wb,ZodType:()=>$e,ZodULID:()=>af,ZodURL:()=>_c,ZodUUID:()=>Kn,ZodUndefined:()=>Pb,ZodUnion:()=>Tc,ZodUnknown:()=>Lb,ZodVoid:()=>zb,ZodXID:()=>sf,ZodXor:()=>Zb,_ZodString:()=>Xp,_default:()=>ix,_function:()=>qk,any:()=>Ek,array:()=>Ec,base64:()=>ck,base64url:()=>lk,bigint:()=>xk,boolean:()=>Ob,catch:()=>dx,check:()=>Jk,cidrv4:()=>sk,cidrv6:()=>uk,clone:()=>dr,codec:()=>Vk,coerce:()=>Sx,config:()=>gt,core:()=>ko,cuid:()=>XE,cuid2:()=>ek,custom:()=>Kk,date:()=>Tk,decode:()=>_b,decodeAsync:()=>Eb,describe:()=>Qk,discriminatedUnion:()=>Dk,e164:()=>dk,email:()=>ZE,emoji:()=>QE,encode:()=>Sb,encodeAsync:()=>Ib,endsWith:()=>hs,enum:()=>bf,exactOptional:()=>rx,file:()=>zk,flattenError:()=>sc,float32:()=>vk,float64:()=>yk,formatError:()=>uc,fromJSONSchema:()=>oT,function:()=>qk,getErrorMap:()=>fj,globalRegistry:()=>Jt,gt:()=>qn,gte:()=>pr,guid:()=>GE,hash:()=>gk,hex:()=>hk,hostname:()=>mk,httpUrl:()=>KE,includes:()=>fs,instanceof:()=>Xk,int:()=>Yp,int32:()=>Ak,int64:()=>wk,intersection:()=>Hb,ipv4:()=>ok,ipv6:()=>ak,iso:()=>_s,json:()=>tT,jwt:()=>pk,keyof:()=>Ck,ksuid:()=>nk,lazy:()=>vx,length:()=>la,literal:()=>Fk,locales:()=>gc,looseObject:()=>Rk,looseRecord:()=>Mk,lowercase:()=>ds,lt:()=>Wn,lte:()=>Fr,mac:()=>ik,map:()=>jk,maxLength:()=>ca,maxSize:()=>Si,meta:()=>Yk,mime:()=>gs,minLength:()=>Eo,minSize:()=>Jn,multipleOf:()=>wi,nan:()=>Gk,nanoid:()=>YE,nativeEnum:()=>Lk,negative:()=>Up,never:()=>yf,nonnegative:()=>Fp,nonoptional:()=>ux,nonpositive:()=>Lp,normalize:()=>vs,null:()=>jb,nullable:()=>wc,nullish:()=>Bk,number:()=>Rb,object:()=>$k,optional:()=>xc,overwrite:()=>yn,parse:()=>bb,parseAsync:()=>xb,partialRecord:()=>Pk,pipe:()=>Sc,positive:()=>jp,prefault:()=>sx,preprocess:()=>rT,prettifyError:()=>L0,promise:()=>Wk,property:()=>zp,readonly:()=>mx,record:()=>Jb,refine:()=>bx,regex:()=>ls,regexes:()=>rn,registry:()=>gp,safeDecode:()=>Tb,safeDecodeAsync:()=>$b,safeEncode:()=>kb,safeEncodeAsync:()=>Cb,safeParse:()=>wb,safeParseAsync:()=>da,set:()=>Uk,setErrorMap:()=>pj,size:()=>ua,slugify:()=>xs,startsWith:()=>ms,strictObject:()=>Nk,string:()=>Qp,stringFormat:()=>fk,stringbool:()=>eT,success:()=>Zk,superRefine:()=>xx,symbol:()=>_k,templateLiteral:()=>Hk,toJSONSchema:()=>ki,toLowerCase:()=>As,toUpperCase:()=>bs,transform:()=>xf,treeifyError:()=>U0,trim:()=>ys,tuple:()=>qb,uint32:()=>bk,uint64:()=>Sk,ulid:()=>tk,undefined:()=>Ik,union:()=>Af,unknown:()=>pa,uppercase:()=>ps,url:()=>JE,util:()=>B,uuid:()=>VE,uuidv4:()=>HE,uuidv6:()=>WE,uuidv7:()=>qE,void:()=>kk,xid:()=>rk,xor:()=>Ok});var ko={};lr(ko,{$ZodAny:()=>fy,$ZodArray:()=>yy,$ZodAsyncError:()=>vn,$ZodBase64:()=>ny,$ZodBase64URL:()=>oy,$ZodBigInt:()=>cp,$ZodBigIntFormat:()=>cy,$ZodBoolean:()=>pc,$ZodCIDRv4:()=>ey,$ZodCIDRv6:()=>ty,$ZodCUID:()=>Bv,$ZodCUID2:()=>Zv,$ZodCatch:()=>My,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>yv,$ZodCheckEndsWith:()=>$v,$ZodCheckGreaterThan:()=>rp,$ZodCheckIncludes:()=>Tv,$ZodCheckLengthEquals:()=>_v,$ZodCheckLessThan:()=>tp,$ZodCheckLowerCase:()=>Ev,$ZodCheckMaxLength:()=>wv,$ZodCheckMaxSize:()=>Av,$ZodCheckMimeType:()=>Rv,$ZodCheckMinLength:()=>Sv,$ZodCheckMinSize:()=>bv,$ZodCheckMultipleOf:()=>gv,$ZodCheckNumberFormat:()=>vv,$ZodCheckOverwrite:()=>Ov,$ZodCheckProperty:()=>Nv,$ZodCheckRegex:()=>Iv,$ZodCheckSizeEquals:()=>xv,$ZodCheckStartsWith:()=>Cv,$ZodCheckStringFormat:()=>us,$ZodCheckUpperCase:()=>kv,$ZodCodec:()=>mc,$ZodCustom:()=>Gy,$ZodCustomStringFormat:()=>sy,$ZodDate:()=>vy,$ZodDefault:()=>Ry,$ZodDiscriminatedUnion:()=>xy,$ZodE164:()=>iy,$ZodEmail:()=>Uv,$ZodEmoji:()=>Fv,$ZodEncodeError:()=>vi,$ZodEnum:()=>Ey,$ZodError:()=>ac,$ZodExactOptional:()=>$y,$ZodFile:()=>Ty,$ZodFunction:()=>zy,$ZodGUID:()=>Mv,$ZodIPv4:()=>Qv,$ZodIPv6:()=>Yv,$ZodISODate:()=>qv,$ZodISODateTime:()=>Wv,$ZodISODuration:()=>Kv,$ZodISOTime:()=>Jv,$ZodIntersection:()=>wy,$ZodJWT:()=>ay,$ZodKSUID:()=>Hv,$ZodLazy:()=>Zy,$ZodLiteral:()=>ky,$ZodMAC:()=>Xv,$ZodMap:()=>_y,$ZodNaN:()=>jy,$ZodNanoID:()=>zv,$ZodNever:()=>hy,$ZodNonOptional:()=>Dy,$ZodNull:()=>py,$ZodNullable:()=>Ny,$ZodNumber:()=>up,$ZodNumberFormat:()=>uy,$ZodObject:()=>BI,$ZodObjectJIT:()=>Ay,$ZodOptional:()=>dp,$ZodPipe:()=>Uy,$ZodPrefault:()=>Oy,$ZodPromise:()=>By,$ZodReadonly:()=>Ly,$ZodRealError:()=>kr,$ZodRecord:()=>Sy,$ZodRegistry:()=>hp,$ZodSet:()=>Iy,$ZodString:()=>sa,$ZodStringFormat:()=>Xe,$ZodSuccess:()=>Py,$ZodSymbol:()=>ly,$ZodTemplateLiteral:()=>Fy,$ZodTransform:()=>Cy,$ZodTuple:()=>lp,$ZodType:()=>Ee,$ZodULID:()=>Gv,$ZodURL:()=>Lv,$ZodUUID:()=>jv,$ZodUndefined:()=>dy,$ZodUnion:()=>fc,$ZodUnknown:()=>my,$ZodVoid:()=>gy,$ZodXID:()=>Vv,$ZodXor:()=>by,$brand:()=>Fd,$constructor:()=>A,$input:()=>Hy,$output:()=>Vy,Doc:()=>dc,JSONSchema:()=>zE,JSONSchemaGenerator:()=>Vp,NEVER:()=>k0,TimePrecision:()=>Ky,_any:()=>vA,_array:()=>_A,_base64:()=>Op,_base64url:()=>Dp,_bigint:()=>lA,_boolean:()=>uA,_catch:()=>tj,_check:()=>FE,_cidrv4:()=>Np,_cidrv6:()=>Rp,_coercedBigint:()=>dA,_coercedBoolean:()=>cA,_coercedDate:()=>wA,_coercedNumber:()=>rA,_coercedString:()=>qy,_cuid:()=>_p,_cuid2:()=>Ip,_custom:()=>EA,_date:()=>xA,_decode:()=>Hd,_decodeAsync:()=>qd,_default:()=>YM,_discriminatedUnion:()=>FM,_e164:()=>Pp,_email:()=>vp,_emoji:()=>wp,_encode:()=>Vd,_encodeAsync:()=>Wd,_endsWith:()=>hs,_enum:()=>HM,_file:()=>IA,_float32:()=>oA,_float64:()=>iA,_gt:()=>qn,_gte:()=>pr,_guid:()=>vc,_includes:()=>fs,_int:()=>nA,_int32:()=>aA,_int64:()=>pA,_intersection:()=>zM,_ipv4:()=>Cp,_ipv6:()=>$p,_isoDate:()=>Yy,_isoDateTime:()=>Qy,_isoDuration:()=>eA,_isoTime:()=>Xy,_jwt:()=>Mp,_ksuid:()=>Tp,_lazy:()=>ij,_length:()=>la,_literal:()=>qM,_lowercase:()=>ds,_lt:()=>Wn,_lte:()=>Fr,_mac:()=>Jy,_map:()=>GM,_max:()=>Fr,_maxLength:()=>ca,_maxSize:()=>Si,_mime:()=>gs,_min:()=>pr,_minLength:()=>Eo,_minSize:()=>Jn,_multipleOf:()=>wi,_nan:()=>SA,_nanoid:()=>Sp,_nativeEnum:()=>WM,_negative:()=>Up,_never:()=>AA,_nonnegative:()=>Fp,_nonoptional:()=>XM,_nonpositive:()=>Lp,_normalize:()=>vs,_null:()=>gA,_nullable:()=>QM,_number:()=>tA,_optional:()=>KM,_overwrite:()=>yn,_parse:()=>os,_parseAsync:()=>is,_pipe:()=>rj,_positive:()=>jp,_promise:()=>aj,_property:()=>zp,_readonly:()=>nj,_record:()=>ZM,_refine:()=>kA,_regex:()=>ls,_safeDecode:()=>Kd,_safeDecodeAsync:()=>Yd,_safeEncode:()=>Jd,_safeEncodeAsync:()=>Qd,_safeParse:()=>as,_safeParseAsync:()=>ss,_set:()=>VM,_size:()=>ua,_slugify:()=>xs,_startsWith:()=>ms,_string:()=>Wy,_stringFormat:()=>ws,_stringbool:()=>NA,_success:()=>ej,_superRefine:()=>TA,_symbol:()=>mA,_templateLiteral:()=>oj,_toLowerCase:()=>As,_toUpperCase:()=>bs,_transform:()=>JM,_trim:()=>ys,_tuple:()=>BM,_uint32:()=>sA,_uint64:()=>fA,_ulid:()=>Ep,_undefined:()=>hA,_union:()=>UM,_unknown:()=>yA,_uppercase:()=>ps,_url:()=>yc,_uuid:()=>yp,_uuidv4:()=>Ap,_uuidv6:()=>bp,_uuidv7:()=>xp,_void:()=>bA,_xid:()=>kp,_xor:()=>LM,clone:()=>dr,config:()=>gt,createStandardJSONSchemaMethod:()=>Ss,createToJSONSchemaMethod:()=>RA,decode:()=>cP,decodeAsync:()=>dP,describe:()=>CA,encode:()=>uP,encodeAsync:()=>lP,extractDefs:()=>Ii,finalize:()=>Ei,flattenError:()=>sc,formatError:()=>uc,globalConfig:()=>Xu,globalRegistry:()=>Jt,initializeContext:()=>_i,isValidBase64:()=>ry,isValidBase64URL:()=>UI,isValidJWT:()=>LI,locales:()=>gc,meta:()=>$A,parse:()=>Zd,parseAsync:()=>Gd,prettifyError:()=>L0,process:()=>qe,regexes:()=>rn,registry:()=>gp,safeDecode:()=>fP,safeDecodeAsync:()=>hP,safeEncode:()=>pP,safeEncodeAsync:()=>mP,safeParse:()=>F0,safeParseAsync:()=>z0,toDotPath:()=>bI,toJSONSchema:()=>ki,treeifyError:()=>U0,util:()=>B,version:()=>Dv});var k0=Object.freeze({status:"aborted"});function A(e,t,r){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,d=Object.keys(l);for(let f=0;f<d.length;f++){let p=d[f];p in s||(s[p]=l[p].bind(s))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=r?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Fd=Symbol("zod_brand"),vn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},vi=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Xu={};function gt(e){return e&&Object.assign(Xu,e),Xu}var B={};lr(B,{BIGINT_FORMAT_RANGES:()=>j0,Class:()=>C0,NUMBER_FORMAT_RANGES:()=>M0,aborted:()=>xi,allowsEval:()=>R0,assert:()=>FD,assertEqual:()=>MD,assertIs:()=>UD,assertNever:()=>LD,assertNotEqual:()=>jD,assignProp:()=>Ai,base64ToUint8Array:()=>vI,base64urlToUint8Array:()=>nP,cached:()=>rs,captureStackTrace:()=>Bd,cleanEnum:()=>rP,cleanRegex:()=>rc,clone:()=>dr,cloneDef:()=>BD,createTransparentProxy:()=>qD,defineLazy:()=>Oe,esc:()=>zd,escapeRegex:()=>tn,extend:()=>QD,finalizeIssue:()=>Er,floatSafeRemainder:()=>$0,getElementAtPath:()=>ZD,getEnumValues:()=>tc,getLengthableOrigin:()=>ic,getParsedType:()=>WD,getSizableOrigin:()=>oc,hexToUint8Array:()=>iP,isObject:()=>ia,isPlainObject:()=>bi,issue:()=>ns,joinValues:()=>x,jsonStringifyReplacer:()=>ts,merge:()=>XD,mergeDefs:()=>Io,normalizeParams:()=>G,nullish:()=>yi,numKeys:()=>HD,objectClone:()=>zD,omit:()=>KD,optionalKeys:()=>P0,parsedType:()=>z,partial:()=>eP,pick:()=>JD,prefixIssues:()=>Lr,primitiveTypes:()=>D0,promiseAllObject:()=>GD,propertyKeyTypes:()=>nc,randomString:()=>VD,required:()=>tP,safeExtend:()=>YD,shallowClone:()=>O0,slugify:()=>N0,stringifyPrimitive:()=>U,uint8ArrayToBase64:()=>yI,uint8ArrayToBase64url:()=>oP,uint8ArrayToHex:()=>aP,unwrapMessage:()=>ec});function MD(e){return e}function jD(e){return e}function UD(e){}function LD(e){throw new Error("Unexpected value in exhaustive check")}function FD(e){}function tc(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function x(e,t="|"){return e.map(r=>U(r)).join(t)}function ts(e,t){return typeof t=="bigint"?t.toString():t}function rs(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function yi(e){return e==null}function rc(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function $0(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]))}let i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var gI=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==gI)return o===void 0&&(o=gI,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function zD(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ai(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Io(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function BD(e){return Io(e._zod.def)}function ZD(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function GD(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function VD(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function zd(e){return JSON.stringify(e)}function N0(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Bd="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ia(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var R0=rs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function bi(e){if(ia(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(ia(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function O0(e){return bi(e)?{...e}:Array.isArray(e)?[...e]:e}function HD(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var WD=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},nc=new Set(["string","number","symbol"]),D0=new Set(["string","number","bigint","boolean","symbol","undefined"]);function tn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dr(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function G(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function qD(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function U(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function P0(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var M0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},j0={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function JD(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Io(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return Ai(this,"shape",a),a},checks:[]});return dr(e,i)}function KD(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Io(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return Ai(this,"shape",a),a},checks:[]});return dr(e,i)}function QD(e,t){if(!bi(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Io(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ai(this,"shape",i),i}});return dr(e,n)}function YD(e,t){if(!bi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Io(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ai(this,"shape",o),o}});return dr(e,r)}function XD(e,t){let r=Io(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Ai(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return dr(e,r)}function eP(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Io(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return Ai(this,"shape",c),c},checks:[]});return dr(t,a)}function tP(e,t,r){let o=Io(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return Ai(this,"shape",i),i}});return dr(t,o)}function xi(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Lr(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function ec(e){return typeof e=="string"?e:e?.message}function Er(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=ec(e.inst?._zod.def?.error?.(e))??ec(t?.error?.(e))??ec(r.customError?.(e))??ec(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function oc(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ic(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function z(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function ns(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function rP(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function vI(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function yI(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function nP(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return vI(t+r)}function oP(e){return yI(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function iP(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function aP(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var C0=class{constructor(...t){}};var AI=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ts,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ac=A("$ZodError",AI),kr=A("$ZodError",AI,{Parent:Error});function sc(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function uc(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let a=r,s=0;for(;s<i.path.length;){let c=i.path[s];s===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(i))):a[c]=a[c]||{_errors:[]},a=a[c],s++}}};return o(e),r}function U0(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var a,s;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else{let l=[...i,...c.path];if(l.length===0){r.errors.push(t(c));continue}let d=r,f=0;for(;f<l.length;){let p=l[f],m=f===l.length-1;typeof p=="string"?(d.properties??(d.properties={}),(a=d.properties)[p]??(a[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(s=d.items)[p]??(s[p]={errors:[]}),d=d.items[p]),m&&d.errors.push(t(c)),f++}}};return o(e),r}function bI(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function L0(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${bI(o.path)}`);return t.join(`
21
- `)}var os=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new vn;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>Er(c,i,gt())));throw Bd(s,n?.callee),s}return a.value},Zd=os(kr),is=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>Er(c,i,gt())));throw Bd(s,n?.callee),s}return a.value},Gd=is(kr),as=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new vn;return i.issues.length?{success:!1,error:new(e??ac)(i.issues.map(a=>Er(a,n,gt())))}:{success:!0,data:i.value}},F0=as(kr),ss=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Er(a,n,gt())))}:{success:!0,data:i.value}},z0=ss(kr),Vd=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return os(e)(t,r,n)},uP=Vd(kr),Hd=e=>(t,r,o)=>os(e)(t,r,o),cP=Hd(kr),Wd=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return is(e)(t,r,n)},lP=Wd(kr),qd=e=>async(t,r,o)=>is(e)(t,r,o),dP=qd(kr),Jd=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return as(e)(t,r,n)},pP=Jd(kr),Kd=e=>(t,r,o)=>as(e)(t,r,o),fP=Kd(kr),Qd=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ss(e)(t,r,n)},mP=Qd(kr),Yd=e=>async(t,r,o)=>ss(e)(t,r,o),hP=Yd(kr);var rn={};lr(rn,{base64:()=>nv,base64url:()=>Xd,bigint:()=>cv,boolean:()=>dv,browserEmail:()=>SP,cidrv4:()=>tv,cidrv6:()=>rv,cuid:()=>B0,cuid2:()=>Z0,date:()=>iv,datetime:()=>sv,domain:()=>EP,duration:()=>q0,e164:()=>ov,email:()=>K0,emoji:()=>Q0,extendedDuration:()=>gP,guid:()=>J0,hex:()=>kP,hostname:()=>IP,html5Email:()=>bP,idnEmail:()=>wP,integer:()=>lv,ipv4:()=>Y0,ipv6:()=>X0,ksuid:()=>H0,lowercase:()=>mv,mac:()=>ev,md5_base64:()=>CP,md5_base64url:()=>$P,md5_hex:()=>TP,nanoid:()=>W0,null:()=>pv,number:()=>ep,rfc5322Email:()=>xP,sha1_base64:()=>RP,sha1_base64url:()=>OP,sha1_hex:()=>NP,sha256_base64:()=>PP,sha256_base64url:()=>MP,sha256_hex:()=>DP,sha384_base64:()=>UP,sha384_base64url:()=>LP,sha384_hex:()=>jP,sha512_base64:()=>zP,sha512_base64url:()=>BP,sha512_hex:()=>FP,string:()=>uv,time:()=>av,ulid:()=>G0,undefined:()=>fv,unicodeEmail:()=>xI,uppercase:()=>hv,uuid:()=>aa,uuid4:()=>vP,uuid6:()=>yP,uuid7:()=>AP,xid:()=>V0});var B0=/^[cC][^\s-]{8,}$/,Z0=/^[0-9a-z]+$/,G0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,V0=/^[0-9a-vA-V]{20}$/,H0=/^[A-Za-z0-9]{27}$/,W0=/^[a-zA-Z0-9_-]{21}$/,q0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,gP=/^[-+]?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)?)??$/,J0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,aa=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,vP=aa(4),yP=aa(6),AP=aa(7),K0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bP=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,xP=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,xI=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,wP=xI,SP=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_P="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Q0(){return new RegExp(_P,"u")}var Y0=/^(?:(?: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])$/,X0=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,ev=e=>{let t=tn(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},tv=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,rv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nv=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xd=/^[A-Za-z0-9_-]*$/,IP=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,EP=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ov=/^\+[1-9]\d{6,14}$/,wI="(?:(?:\\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])))",iv=new RegExp(`^${wI}$`);function SI(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function av(e){return new RegExp(`^${SI(e)}$`)}function sv(e){let t=SI({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${wI}T(?:${o})$`)}var uv=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},cv=/^-?\d+n?$/,lv=/^-?\d+$/,ep=/^-?\d+(?:\.\d+)?$/,dv=/^(?:true|false)$/i,pv=/^null$/i;var fv=/^undefined$/i;var mv=/^[^A-Z]*$/,hv=/^[^a-z]*$/,kP=/^[0-9a-fA-F]*$/;function cc(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function lc(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var TP=/^[0-9a-fA-F]{32}$/,CP=cc(22,"=="),$P=lc(22),NP=/^[0-9a-fA-F]{40}$/,RP=cc(27,"="),OP=lc(27),DP=/^[0-9a-fA-F]{64}$/,PP=cc(43,"="),MP=lc(43),jP=/^[0-9a-fA-F]{96}$/,UP=cc(64,""),LP=lc(64),FP=/^[0-9a-fA-F]{128}$/,zP=cc(86,"=="),BP=lc(86);var ot=A("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),II={number:"number",bigint:"bigint",object:"date"},tp=A("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=II[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rp=A("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=II[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gv=A("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):$0(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),vv=A("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=M0[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=lv)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),yv=A("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=j0[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Av=A("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!yi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:oc(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),bv=A("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!yi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:oc(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),xv=A("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!yi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:oc(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),wv=A("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!yi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let a=ic(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Sv=A("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!yi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let a=ic(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),_v=A("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!yi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let a=ic(n),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),us=A("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Iv=A("$ZodCheckRegex",(e,t)=>{us.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ev=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mv),us.init(e,t)}),kv=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=hv),us.init(e,t)}),Tv=A("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);let r=tn(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Cv=A("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`^${tn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),$v=A("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`.*${tn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function _I(e,t,r){e.issues.length&&t.issues.push(...Lr(r,e.issues))}var Nv=A("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>_I(n,r,t.property));_I(o,r,t.property)}}),Rv=A("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Ov=A("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var dc=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
22
- `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
23
- `))}};var Dv={major:4,minor:3,patch:6};var Ee=A("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dv;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(a,s,c)=>{let l=xi(a),d;for(let f of s){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(l)continue;let p=a.issues.length,m=f._zod.check(a);if(m instanceof Promise&&c?.async===!1)throw new vn;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,a.issues.length!==p&&(l||(l=xi(a,p)))});else{if(a.issues.length===p)continue;l||(l=xi(a,p))}}return d?d.then(()=>a):a},i=(a,s,c)=>{if(xi(a))return a.aborted=!0,a;let l=n(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new vn;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,a,s)):i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new vn;return c.then(l=>n(l,o,s))}return n(c,o,s)}}Oe(e,"~standard",()=>({validate:n=>{try{let i=F0(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return z0(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),sa=A("$ZodString",(e,t)=>{Ee.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??uv(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Xe=A("$ZodStringFormat",(e,t)=>{us.init(e,t),sa.init(e,t)}),Mv=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=J0),Xe.init(e,t)}),jv=A("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=aa(o))}else t.pattern??(t.pattern=aa());Xe.init(e,t)}),Uv=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=K0),Xe.init(e,t)}),Lv=A("$ZodURL",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Fv=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Q0()),Xe.init(e,t)}),zv=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=W0),Xe.init(e,t)}),Bv=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=B0),Xe.init(e,t)}),Zv=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Z0),Xe.init(e,t)}),Gv=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=G0),Xe.init(e,t)}),Vv=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=V0),Xe.init(e,t)}),Hv=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=H0),Xe.init(e,t)}),Wv=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=sv(t)),Xe.init(e,t)}),qv=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=iv),Xe.init(e,t)}),Jv=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=av(t)),Xe.init(e,t)}),Kv=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=q0),Xe.init(e,t)}),Qv=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Y0),Xe.init(e,t),e._zod.bag.format="ipv4"}),Yv=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=X0),Xe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Xv=A("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ev(t.delimiter)),Xe.init(e,t),e._zod.bag.format="mac"}),ey=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tv),Xe.init(e,t)}),ty=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=rv),Xe.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ry(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var ny=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=nv),Xe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ry(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function UI(e){if(!Xd.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ry(r)}var oy=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Xd),Xe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{UI(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),iy=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ov),Xe.init(e,t)});function LI(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var ay=A("$ZodJWT",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{LI(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),sy=A("$ZodCustomStringFormat",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),up=A("$ZodNumber",(e,t)=>{Ee.init(e,t),e._zod.pattern=e._zod.bag.pattern??ep,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),uy=A("$ZodNumberFormat",(e,t)=>{vv.init(e,t),up.init(e,t)}),pc=A("$ZodBoolean",(e,t)=>{Ee.init(e,t),e._zod.pattern=dv,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),cp=A("$ZodBigInt",(e,t)=>{Ee.init(e,t),e._zod.pattern=cv,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),cy=A("$ZodBigIntFormat",(e,t)=>{yv.init(e,t),cp.init(e,t)}),ly=A("$ZodSymbol",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),dy=A("$ZodUndefined",(e,t)=>{Ee.init(e,t),e._zod.pattern=fv,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),py=A("$ZodNull",(e,t)=>{Ee.init(e,t),e._zod.pattern=pv,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),fy=A("$ZodAny",(e,t)=>{Ee.init(e,t),e._zod.parse=r=>r}),my=A("$ZodUnknown",(e,t)=>{Ee.init(e,t),e._zod.parse=r=>r}),hy=A("$ZodNever",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),gy=A("$ZodVoid",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),vy=A("$ZodDate",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function kI(e,t,r){e.issues.length&&t.issues.push(...Lr(r,e.issues)),t.value[r]=e.value}var yy=A("$ZodArray",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>kI(l,r,a))):kI(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function sp(e,t,r,o,n){if(e.issues.length){if(n&&!(r in o))return;t.issues.push(...Lr(r,e.issues))}e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}function FI(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=P0(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function zI(e,t,r,o,n,i){let a=[],s=n.keySet,c=n.catchall._zod,l=c.def.type,d=c.optout==="optional";for(let f in t){if(s.has(f))continue;if(l==="never"){a.push(f);continue}let p=c.run({value:t[f],issues:[]},o);p instanceof Promise?e.push(p.then(m=>sp(m,r,f,t,d))):sp(p,r,f,t,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var BI=A("$ZodObject",(e,t)=>{if(Ee.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=rs(()=>FI(t));Oe(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let d=s[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let f of d.values)c[l].add(f)}}return c});let n=ia,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let l=s.value;if(!n(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let d=[],f=a.shape;for(let p of a.keys){let m=f[p],v=m._zod.optout==="optional",g=m._zod.run({value:l[p],issues:[]},c);g instanceof Promise?d.push(g.then(y=>sp(y,s,p,l,v))):sp(g,s,p,l,v)}return i?zI(d,l,s,c,o.value,e):d.length?Promise.all(d).then(()=>s):s}}),Ay=A("$ZodObjectJIT",(e,t)=>{BI.init(e,t);let r=e._zod.parse,o=rs(()=>FI(t)),n=p=>{let m=new dc(["shape","payload","ctx"]),v=o.value,g=h=>{let N=zd(h);return`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`};m.write("const input = payload.value;");let y=Object.create(null),E=0;for(let h of v.keys)y[h]=`key_${E++}`;m.write("const newResult = {};");for(let h of v.keys){let N=y[h],L=zd(h),M=p[h]?._zod?.optout==="optional";m.write(`const ${N} = ${g(h)};`),M?m.write(`
24
- if (${N}.issues.length) {
25
- if (${L} in input) {
26
- payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
27
- ...iss,
28
- path: iss.path ? [${L}, ...iss.path] : [${L}]
29
- })));
30
- }
31
- }
32
-
33
- if (${N}.value === undefined) {
34
- if (${L} in input) {
35
- newResult[${L}] = undefined;
36
- }
37
- } else {
38
- newResult[${L}] = ${N}.value;
39
- }
40
-
41
- `):m.write(`
42
- if (${N}.issues.length) {
43
- payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
44
- ...iss,
45
- path: iss.path ? [${L}, ...iss.path] : [${L}]
46
- })));
47
- }
48
-
49
- if (${N}.value === undefined) {
50
- if (${L} in input) {
51
- newResult[${L}] = undefined;
52
- }
53
- } else {
54
- newResult[${L}] = ${N}.value;
55
- }
56
-
57
- `)}m.write("payload.value = newResult;"),m.write("return payload;");let I=m.compile();return(h,N)=>I(p,h,N)},i,a=ia,s=!Xu.jitless,l=s&&R0.value,d=t.catchall,f;e._zod.parse=(p,m)=>{f??(f=o.value);let v=p.value;return a(v)?s&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=n(t.shape)),p=i(p,m),d?zI([],v,p,m,f,e):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function TI(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!xi(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Er(a,o,gt())))}),t)}var fc=A("$ZodUnion",(e,t)=>{Ee.init(e,t),Oe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>rc(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let a=!1,s=[];for(let c of t.options){let l=c._zod.run({value:n.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>TI(c,n,e,i)):TI(s,n,e,i)}});function CI(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Er(a,o,gt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var by=A("$ZodXor",(e,t)=>{fc.init(e,t),t.inclusive=!1;let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let a=!1,s=[];for(let c of t.options){let l=c._zod.run({value:n.value,issues:[]},i);l instanceof Promise?(s.push(l),a=!0):s.push(l)}return a?Promise.all(s).then(c=>CI(c,n,e,i)):CI(s,n,e,i)}}),xy=A("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,fc.init(e,t);let r=e._zod.parse;Oe(e._zod,"propValues",()=>{let n={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(let l of c)n[s].add(l)}}return n});let o=rs(()=>{let n=t.options,i=new Map;for(let a of n){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(n,i)=>{let a=n.value;if(!ia(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)}}),wy=A("$ZodIntersection",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>$I(r,c,l)):$I(r,i,a)}});function Pv(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(bi(e)&&bi(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let a=Pv(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],a=Pv(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function $I(e,t,r){let o=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),xi(e))return e;let a=Pv(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var lp=A("$ZodTuple",(e,t)=>{Ee.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=[...r].reverse().findIndex(d=>d._zod.optin!=="optional"),c=s===-1?0:r.length-s;if(!t.rest){let d=i.length>r.length,f=i.length<c-1;if(d||f)return o.issues.push({...d?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:i,inst:e,origin:"array"}),o}let l=-1;for(let d of r){if(l++,l>=i.length&&l>=c)continue;let f=d._zod.run({value:i[l],issues:[]},n);f instanceof Promise?a.push(f.then(p=>np(p,o,l))):np(f,o,l)}if(t.rest){let d=i.slice(r.length);for(let f of d){l++;let p=t.rest._zod.run({value:f,issues:[]},n);p instanceof Promise?a.push(p.then(m=>np(m,o,l))):np(p,o,l)}}return a.length?Promise.all(a).then(()=>o):o}});function np(e,t,r){e.issues.length&&t.issues.push(...Lr(r,e.issues)),t.value[r]=e.value}var Sy=A("$ZodRecord",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!bi(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let d=t.valueType._zod.run({value:n[l],issues:[]},o);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&r.issues.push(...Lr(l,f.issues)),r.value[l]=f.value})):(d.issues.length&&r.issues.push(...Lr(l,d.issues)),r.value[l]=d.value)}let c;for(let l in n)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&ep.test(s)&&c.issues.length){let f=t.keyType._zod.run({value:Number(s),issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(c=f)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>Er(f,o,gt())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:n[s],issues:[]},o);d instanceof Promise?i.push(d.then(f=>{f.issues.length&&r.issues.push(...Lr(s,f.issues)),r.value[c.value]=f.value})):(d.issues.length&&r.issues.push(...Lr(s,d.issues)),r.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),_y=A("$ZodMap",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[a,s]of n){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([d,f])=>{NI(d,f,r,a,n,e,o)})):NI(c,l,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function NI(e,t,r,o,n,i,a){e.issues.length&&(nc.has(typeof o)?r.issues.push(...Lr(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>Er(s,a,gt()))})),t.issues.length&&(nc.has(typeof o)?r.issues.push(...Lr(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>Er(s,a,gt()))})),r.value.set(e.value,t.value)}var Iy=A("$ZodSet",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of n){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>RI(c,r))):RI(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function RI(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Ey=A("$ZodEnum",(e,t)=>{Ee.init(e,t);let r=tc(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>nc.has(typeof n)).map(n=>typeof n=="string"?tn(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),ky=A("$ZodLiteral",(e,t)=>{if(Ee.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?tn(o):o?tn(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Ty=A("$ZodFile",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Cy=A("$ZodTransform",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new vi(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new vn;return r.value=n,r}});function OI(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var dp=A("$ZodOptional",(e,t)=>{Ee.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${rc(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>OI(i,r.value)):OI(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),$y=A("$ZodExactOptional",(e,t)=>{dp.init(e,t),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Ny=A("$ZodNullable",(e,t)=>{Ee.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${rc(r.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Ry=A("$ZodDefault",(e,t)=>{Ee.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>DI(i,t)):DI(n,t)}});function DI(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Oy=A("$ZodPrefault",(e,t)=>{Ee.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Dy=A("$ZodNonOptional",(e,t)=>{Ee.init(e,t),Oe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>PI(i,e)):PI(n,e)}});function PI(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Py=A("$ZodSuccess",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new vi("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),My=A("$ZodCatch",(e,t)=>{Ee.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>Er(a,o,gt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>Er(i,o,gt()))},input:r.value}),r.issues=[]),r)}}),jy=A("$ZodNaN",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Uy=A("$ZodPipe",(e,t)=>{Ee.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>op(a,t.in,o)):op(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>op(i,t.out,o)):op(n,t.out,o)}});function op(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var mc=A("$ZodCodec",(e,t)=>{Ee.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(a=>ip(a,t,o)):ip(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>ip(a,t,o)):ip(i,t,o)}}});function ip(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>ap(e,i,t.out,r)):ap(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>ap(e,i,t.in,r)):ap(e,n,t.in,r)}}function ap(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var Ly=A("$ZodReadonly",(e,t)=>{Ee.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType?._zod?.optin),Oe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(MI):MI(n)}});function MI(e){return e.value=Object.freeze(e.value),e}var Fy=A("$ZodTemplateLiteral",(e,t)=>{Ee.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||D0.has(typeof o))r.push(tn(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),zy=A("$ZodFunction",(e,t)=>(Ee.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Zd(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Zd(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Gd(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Gd(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new lp({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),By=A("$ZodPromise",(e,t)=>{Ee.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Zy=A("$ZodLazy",(e,t)=>{Ee.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Oe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Gy=A("$ZodCustom",(e,t)=>{ot.init(e,t),Ee.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>jI(i,r,o,e));jI(n,r,o,e)}});function jI(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(ns(n))}}var gc={};lr(gc,{ar:()=>ZI,az:()=>GI,be:()=>HI,bg:()=>WI,ca:()=>qI,cs:()=>JI,da:()=>KI,de:()=>QI,en:()=>pp,eo:()=>YI,es:()=>XI,fa:()=>eE,fi:()=>tE,fr:()=>rE,frCA:()=>nE,he:()=>oE,hu:()=>iE,hy:()=>sE,id:()=>uE,is:()=>cE,it:()=>lE,ja:()=>dE,ka:()=>pE,kh:()=>fE,km:()=>fp,ko:()=>mE,lt:()=>gE,mk:()=>vE,ms:()=>yE,nl:()=>AE,no:()=>bE,ota:()=>xE,pl:()=>SE,ps:()=>wE,pt:()=>_E,ru:()=>EE,sl:()=>kE,sv:()=>TE,ta:()=>CE,th:()=>$E,tr:()=>NE,ua:()=>RE,uk:()=>mp,ur:()=>OE,uz:()=>DE,vi:()=>PE,yo:()=>UE,zhCN:()=>ME,zhTW:()=>jE});var GP=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${U(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${x(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function ZI(){return{localeError:GP()}}var VP=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${U(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function GI(){return{localeError:VP()}}function VI(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var HP=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${U(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=VI(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=VI(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function HI(){return{localeError:HP()}}var WP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${U(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function WI(){return{localeError:WP()}}var qP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${U(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${x(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function qI(){return{localeError:qP()}}var JP=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${U(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${x(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function JI(){return{localeError:JP()}}var KP=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${U(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function KI(){return{localeError:KP()}}var QP=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${U(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function QI(){return{localeError:QP()}}var YP=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${U(n.values[0])}`:`Invalid option: expected one of ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function pp(){return{localeError:YP()}}var XP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${U(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function YI(){return{localeError:XP()}}var eM=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${U(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function XI(){return{localeError:eM()}}var tM=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${U(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${x(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${x(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function eE(){return{localeError:tM()}}var rM=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${U(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${x(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function tE(){return{localeError:rM()}}var nM=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${U(n.values[0])} attendu`:`Option invalide : une valeur parmi ${x(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${x(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function rE(){return{localeError:nM()}}var oM=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${U(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${x(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function nE(){return{localeError:oM()}}var iM=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,o=l=>{let d=r(l);return d?d.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?t[l]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,f=c[d??""]??o(d),p=z(l.input),m=c[p]??e[p]?.label??p;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${f}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${U(l.values[0])}`;let d=l.values.map(m=>U(m));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let f=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${f}`}case"too_big":{let d=a(l.origin),f=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let v=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${f} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let p=l.inclusive?"<=":"<",m=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${f} ${m} ${p}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${f} ${m} ${p}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),f=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let v=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let y=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let g=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${f} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let p=l.inclusive?">=":">",m=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${f} ${m} ${p}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${f} ${m} ${p}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let f=s[d.format],p=f?.label??d.format,v=(f?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${v}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${x(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function oE(){return{localeError:iM()}}var aM=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${U(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function iE(){return{localeError:aM()}}function aE(e,t,r){return Math.abs(e)===1?t:r}function cs(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var sM=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${U(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=aE(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=aE(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${x(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${cs(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${cs(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function sE(){return{localeError:sM()}}var uM=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${U(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function uE(){return{localeError:uM()}}var cM=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${U(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${x(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function cE(){return{localeError:cM()}}var lM=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${U(n.values[0])}`:`Opzione non valida: atteso uno tra ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${x(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function lE(){return{localeError:lM()}}var dM=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${U(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${x(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${x(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function dE(){return{localeError:dM()}}var pM=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${U(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${x(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function pE(){return{localeError:pM()}}var fM=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${U(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${x(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function fp(){return{localeError:fM()}}function fE(){return fp()}var mM=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${U(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${x(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${x(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function mE(){return{localeError:mM()}}var hc=e=>e.charAt(0).toUpperCase()+e.slice(1);function hE(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var hM=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${U(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${x(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,a=t(n.origin,hE(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${hc(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${hc(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,a=t(n.origin,hE(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${hc(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${hc(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${x(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${hc(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function gE(){return{localeError:hM()}}var gM=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${U(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function vE(){return{localeError:gM()}}var vM=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${U(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${x(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function yE(){return{localeError:vM()}}var yM=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${U(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function AE(){return{localeError:yM()}}var AM=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${U(n.values[0])}`:`Ugyldig valg: forventet en av ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function bE(){return{localeError:AM()}}var bM=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${U(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function xE(){return{localeError:bM()}}var xM=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${U(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${x(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${x(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function wE(){return{localeError:xM()}}var wM=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${U(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function SE(){return{localeError:wM()}}var SM=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${U(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${x(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function _E(){return{localeError:SM()}}function IE(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var _M=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${U(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=IE(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=IE(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function EE(){return{localeError:_M()}}var IM=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${U(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${x(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function kE(){return{localeError:IM()}}var EM=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${U(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${x(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function TE(){return{localeError:EM()}}var kM=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${U(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${x(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function CE(){return{localeError:kM()}}var TM=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${U(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${x(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function $E(){return{localeError:TM()}}var CM=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${U(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function NE(){return{localeError:CM()}}var $M=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${U(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${x(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function mp(){return{localeError:$M()}}function RE(){return mp()}var NM=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${U(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${x(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${x(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function OE(){return{localeError:NM()}}var RM=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${U(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function DE(){return{localeError:RM()}}var OM=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${U(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${x(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function PE(){return{localeError:OM()}}var DM=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${U(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${x(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function ME(){return{localeError:DM()}}var PM=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${U(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${x(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function jE(){return{localeError:PM()}}var MM=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=z(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${U(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${x(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${x(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function UE(){return{localeError:MM()}}var LE,Vy=Symbol("ZodOutput"),Hy=Symbol("ZodInput"),hp=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function gp(){return new hp}(LE=globalThis).__zod_globalRegistry??(LE.__zod_globalRegistry=gp());var Jt=globalThis.__zod_globalRegistry;function Wy(e,t){return new e({type:"string",...G(t)})}function qy(e,t){return new e({type:"string",coerce:!0,...G(t)})}function vp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...G(t)})}function vc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...G(t)})}function yp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...G(t)})}function Ap(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...G(t)})}function bp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...G(t)})}function xp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...G(t)})}function yc(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...G(t)})}function wp(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...G(t)})}function Sp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...G(t)})}function _p(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...G(t)})}function Ip(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...G(t)})}function Ep(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...G(t)})}function kp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...G(t)})}function Tp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...G(t)})}function Cp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...G(t)})}function $p(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...G(t)})}function Jy(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...G(t)})}function Np(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...G(t)})}function Rp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...G(t)})}function Op(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...G(t)})}function Dp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...G(t)})}function Pp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...G(t)})}function Mp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...G(t)})}var Ky={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Qy(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...G(t)})}function Yy(e,t){return new e({type:"string",format:"date",check:"string_format",...G(t)})}function Xy(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...G(t)})}function eA(e,t){return new e({type:"string",format:"duration",check:"string_format",...G(t)})}function tA(e,t){return new e({type:"number",checks:[],...G(t)})}function rA(e,t){return new e({type:"number",coerce:!0,checks:[],...G(t)})}function nA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...G(t)})}function oA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...G(t)})}function iA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...G(t)})}function aA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...G(t)})}function sA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...G(t)})}function uA(e,t){return new e({type:"boolean",...G(t)})}function cA(e,t){return new e({type:"boolean",coerce:!0,...G(t)})}function lA(e,t){return new e({type:"bigint",...G(t)})}function dA(e,t){return new e({type:"bigint",coerce:!0,...G(t)})}function pA(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...G(t)})}function fA(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...G(t)})}function mA(e,t){return new e({type:"symbol",...G(t)})}function hA(e,t){return new e({type:"undefined",...G(t)})}function gA(e,t){return new e({type:"null",...G(t)})}function vA(e){return new e({type:"any"})}function yA(e){return new e({type:"unknown"})}function AA(e,t){return new e({type:"never",...G(t)})}function bA(e,t){return new e({type:"void",...G(t)})}function xA(e,t){return new e({type:"date",...G(t)})}function wA(e,t){return new e({type:"date",coerce:!0,...G(t)})}function SA(e,t){return new e({type:"nan",...G(t)})}function Wn(e,t){return new tp({check:"less_than",...G(t),value:e,inclusive:!1})}function Fr(e,t){return new tp({check:"less_than",...G(t),value:e,inclusive:!0})}function qn(e,t){return new rp({check:"greater_than",...G(t),value:e,inclusive:!1})}function pr(e,t){return new rp({check:"greater_than",...G(t),value:e,inclusive:!0})}function jp(e){return qn(0,e)}function Up(e){return Wn(0,e)}function Lp(e){return Fr(0,e)}function Fp(e){return pr(0,e)}function wi(e,t){return new gv({check:"multiple_of",...G(t),value:e})}function Si(e,t){return new Av({check:"max_size",...G(t),maximum:e})}function Jn(e,t){return new bv({check:"min_size",...G(t),minimum:e})}function ua(e,t){return new xv({check:"size_equals",...G(t),size:e})}function ca(e,t){return new wv({check:"max_length",...G(t),maximum:e})}function Eo(e,t){return new Sv({check:"min_length",...G(t),minimum:e})}function la(e,t){return new _v({check:"length_equals",...G(t),length:e})}function ls(e,t){return new Iv({check:"string_format",format:"regex",...G(t),pattern:e})}function ds(e){return new Ev({check:"string_format",format:"lowercase",...G(e)})}function ps(e){return new kv({check:"string_format",format:"uppercase",...G(e)})}function fs(e,t){return new Tv({check:"string_format",format:"includes",...G(t),includes:e})}function ms(e,t){return new Cv({check:"string_format",format:"starts_with",...G(t),prefix:e})}function hs(e,t){return new $v({check:"string_format",format:"ends_with",...G(t),suffix:e})}function zp(e,t,r){return new Nv({check:"property",property:e,schema:t,...G(r)})}function gs(e,t){return new Rv({check:"mime_type",mime:e,...G(t)})}function yn(e){return new Ov({check:"overwrite",tx:e})}function vs(e){return yn(t=>t.normalize(e))}function ys(){return yn(e=>e.trim())}function As(){return yn(e=>e.toLowerCase())}function bs(){return yn(e=>e.toUpperCase())}function xs(){return yn(e=>N0(e))}function _A(e,t,r){return new e({type:"array",element:t,...G(r)})}function UM(e,t,r){return new e({type:"union",options:t,...G(r)})}function LM(e,t,r){return new e({type:"union",options:t,inclusive:!1,...G(r)})}function FM(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...G(o)})}function zM(e,t,r){return new e({type:"intersection",left:t,right:r})}function BM(e,t,r,o){let n=r instanceof Ee,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...G(i)})}function ZM(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...G(o)})}function GM(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...G(o)})}function VM(e,t,r){return new e({type:"set",valueType:t,...G(r)})}function HM(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...G(r)})}function WM(e,t,r){return new e({type:"enum",entries:t,...G(r)})}function qM(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...G(r)})}function IA(e,t){return new e({type:"file",...G(t)})}function JM(e,t){return new e({type:"transform",transform:t})}function KM(e,t){return new e({type:"optional",innerType:t})}function QM(e,t){return new e({type:"nullable",innerType:t})}function YM(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():O0(r)}})}function XM(e,t,r){return new e({type:"nonoptional",innerType:t,...G(r)})}function ej(e,t){return new e({type:"success",innerType:t})}function tj(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function rj(e,t,r){return new e({type:"pipe",in:t,out:r})}function nj(e,t){return new e({type:"readonly",innerType:t})}function oj(e,t,r){return new e({type:"template_literal",parts:t,...G(r)})}function ij(e,t){return new e({type:"lazy",getter:t})}function aj(e,t){return new e({type:"promise",innerType:t})}function EA(e,t,r){let o=G(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function kA(e,t,r){return new e({type:"custom",check:"custom",fn:t,...G(r)})}function TA(e){let t=FE(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(ns(o,r.value,t._zod.def));else{let n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(ns(n))}},e(r.value,r)));return t}function FE(e,t){let r=new ot({check:"custom",...G(t)});return r._zod.check=e,r}function CA(e){let t=new ot({check:"describe"});return t._zod.onattach=[r=>{let o=Jt.get(r)??{};Jt.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function $A(e){let t=new ot({check:"meta"});return t._zod.onattach=[r=>{let o=Jt.get(r)??{};Jt.add(r,{...o,...e})}],t._zod.check=()=>{},t}function NA(e,t){let r=G(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(o),a=new Set(n),s=e.Codec??mc,c=e.Boolean??pc,l=e.String??sa,d=new l({type:"string",error:r.error}),f=new c({type:"boolean",error:r.error}),p=new s({type:"pipe",in:d,out:f,transform:((m,v)=>{let g=m;return r.case!=="sensitive"&&(g=g.toLowerCase()),i.has(g)?!0:a.has(g)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:v.value,inst:p,continue:!1}),{})}),reverseTransform:((m,v)=>m===!0?o[0]||"true":n[0]||"false"),error:r.error});return p}function ws(e,t,r,o={}){let n=G(o),i={...G(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function _i(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Jt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function qe(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let p=a.schema,m=t.processors[n.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);m(e,t,p,d)}let f=e._zod.parent;f&&(a.ref||(a.ref=f),qe(f,t,d),t.seen.get(f).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&fr(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ii(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let f=e.external.registry.get(a[0])?.id,p=e.external.uri??(v=>v);if(f)return{ref:p(f)};let m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${p("__shared")}#/${s}/${m}`}}if(a[1]===r)return{ref:"#"};let l=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=n(a);s.def={...s.schema},l&&(s.defId=l);let d=s.schema;for(let f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
58
-
59
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function Ei(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let s=e.seen.get(a);if(s.ref===null)return;let c=s.def??s.schema,l={...c},d=s.ref;if(s.ref=null,d){o(d);let p=e.seen.get(d),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,l),a._zod.parent===d)for(let g in c)g==="$ref"||g==="allOf"||g in l||delete c[g];if(m.$ref&&p.def)for(let g in c)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(c[g])===JSON.stringify(p.def[g])&&delete c[g]}let f=a._zod.parent;if(f&&f!==d){o(f);let p=e.seen.get(f);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let m in c)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(c[m])===JSON.stringify(p.def[m])&&delete c[m]}e.override({zodSchema:a,jsonSchema:c,path:s.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.external?.defs??{};for(let a of e.seen.entries()){let s=a[1];s.def&&s.defId&&(i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?n.$defs=i:n.definitions=i);try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ss(t,"input",e.processors),output:Ss(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function fr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return fr(o.element,r);if(o.type==="set")return fr(o.valueType,r);if(o.type==="lazy")return fr(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return fr(o.innerType,r);if(o.type==="intersection")return fr(o.left,r)||fr(o.right,r);if(o.type==="record"||o.type==="map")return fr(o.keyType,r)||fr(o.valueType,r);if(o.type==="pipe")return fr(o.in,r)||fr(o.out,r);if(o.type==="object"){for(let n in o.shape)if(fr(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(fr(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(fr(n,r))return!0;return!!(o.rest&&fr(o.rest,r))}return!1}var RA=(e,t={})=>r=>{let o=_i({...r,processors:t});return qe(e,o),Ii(o,e),Ei(o,e)},Ss=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=_i({...n??{},target:i,io:t,processors:r});return qe(e,a),Ii(a,e),Ei(a,e)};var sj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},OA=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=sj[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let d=[...c];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},DA=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d),typeof i=="number"&&(n.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof a=="number"&&(n.maximum=a,typeof l=="number"&&t.target!=="draft-04"&&(l<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof c=="number"&&(n.multipleOf=c)},PA=(e,t,r,o)=>{r.type="boolean"},MA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},jA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},UA=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},LA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},FA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},zA=(e,t,r,o)=>{r.not={}},BA=(e,t,r,o)=>{},ZA=(e,t,r,o)=>{},GA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},VA=(e,t,r,o)=>{let n=e._zod.def,i=tc(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},HA=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},WA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},qA=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},JA=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(n,i)},KA=(e,t,r,o)=>{r.type="boolean"},QA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},YA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},XA=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},eb=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},tb=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},rb=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=qe(i.element,t,{...o,path:[...o.path,"items"]})},nb=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let l in a)n.properties[l]=qe(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=qe(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Zp=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>qe(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},ob=(e,t,r,o)=>{let n=e._zod.def,i=qe(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=qe(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},ib=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,m)=>qe(p,t,{...o,path:[...o.path,a,m]})),l=i.rest?qe(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),n.minItems=c.length,l||(n.maxItems=c.length)):(n.items=c,l&&(n.additionalItems=l));let{minimum:d,maximum:f}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof f=="number"&&(n.maxItems=f)},ab=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=qe(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let f of c)n.patternProperties[f.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=qe(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=qe(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=a._zod.values;if(l){let d=[...l].filter(f=>typeof f=="string"||typeof f=="number");d.length>0&&(n.required=d)}},sb=(e,t,r,o)=>{let n=e._zod.def,i=qe(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},ub=(e,t,r,o)=>{let n=e._zod.def;qe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},cb=(e,t,r,o)=>{let n=e._zod.def;qe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},lb=(e,t,r,o)=>{let n=e._zod.def;qe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},db=(e,t,r,o)=>{let n=e._zod.def;qe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},pb=(e,t,r,o)=>{let n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;qe(i,t,o);let a=t.seen.get(e);a.ref=i},fb=(e,t,r,o)=>{let n=e._zod.def;qe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},mb=(e,t,r,o)=>{let n=e._zod.def;qe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Gp=(e,t,r,o)=>{let n=e._zod.def;qe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},hb=(e,t,r,o)=>{let n=e._zod.innerType;qe(n,t,o);let i=t.seen.get(e);i.ref=n},Bp={string:OA,number:DA,boolean:PA,bigint:MA,symbol:jA,null:UA,undefined:LA,void:FA,never:zA,any:BA,unknown:ZA,date:GA,enum:VA,literal:HA,nan:WA,template_literal:qA,file:JA,success:KA,custom:QA,function:YA,transform:XA,map:eb,set:tb,array:rb,object:nb,union:Zp,intersection:ob,tuple:ib,record:ab,nullable:sb,nonoptional:ub,default:cb,prefault:lb,catch:db,pipe:pb,readonly:fb,promise:mb,optional:Gp,lazy:hb};function ki(e,t){if("_idmap"in e){let o=e,n=_i({...t,processors:Bp}),i={};for(let c of o._idmap.entries()){let[l,d]=c;qe(d,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let c of o._idmap.entries()){let[l,d]=c;Ii(n,d),a[l]=Ei(n,d)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let r=_i({...t,processors:Bp});return qe(e,r),Ii(r,e),Ei(r,e)}var Vp=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=_i({processors:Bp,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return qe(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Ii(this.ctx,t);let o=Ei(this.ctx,t),{"~standard":n,...i}=o;return i}};var zE={};var Ac={};lr(Ac,{ZodAny:()=>Ub,ZodArray:()=>Bb,ZodBase64:()=>ff,ZodBase64URL:()=>mf,ZodBigInt:()=>$s,ZodBigIntFormat:()=>vf,ZodBoolean:()=>Cs,ZodCIDRv4:()=>df,ZodCIDRv6:()=>pf,ZodCUID:()=>nf,ZodCUID2:()=>of,ZodCatch:()=>lx,ZodCodec:()=>If,ZodCustom:()=>$c,ZodCustomStringFormat:()=>ks,ZodDate:()=>Ic,ZodDefault:()=>ox,ZodDiscriminatedUnion:()=>Gb,ZodE164:()=>hf,ZodEmail:()=>ef,ZodEmoji:()=>tf,ZodEnum:()=>Is,ZodExactOptional:()=>tx,ZodFile:()=>Xb,ZodFunction:()=>Ax,ZodGUID:()=>bc,ZodIPv4:()=>cf,ZodIPv6:()=>lf,ZodIntersection:()=>Vb,ZodJWT:()=>gf,ZodKSUID:()=>uf,ZodLazy:()=>gx,ZodLiteral:()=>Yb,ZodMAC:()=>Nb,ZodMap:()=>Kb,ZodNaN:()=>px,ZodNanoID:()=>rf,ZodNever:()=>Fb,ZodNonOptional:()=>Sf,ZodNull:()=>Mb,ZodNullable:()=>nx,ZodNumber:()=>Ts,ZodNumberFormat:()=>fa,ZodObject:()=>kc,ZodOptional:()=>wf,ZodPipe:()=>_f,ZodPrefault:()=>ax,ZodPromise:()=>yx,ZodReadonly:()=>fx,ZodRecord:()=>Cc,ZodSet:()=>Qb,ZodString:()=>Es,ZodStringFormat:()=>et,ZodSuccess:()=>cx,ZodSymbol:()=>Db,ZodTemplateLiteral:()=>hx,ZodTransform:()=>ex,ZodTuple:()=>Wb,ZodType:()=>$e,ZodULID:()=>af,ZodURL:()=>_c,ZodUUID:()=>Kn,ZodUndefined:()=>Pb,ZodUnion:()=>Tc,ZodUnknown:()=>Lb,ZodVoid:()=>zb,ZodXID:()=>sf,ZodXor:()=>Zb,_ZodString:()=>Xp,_default:()=>ix,_function:()=>qk,any:()=>Ek,array:()=>Ec,base64:()=>ck,base64url:()=>lk,bigint:()=>xk,boolean:()=>Ob,catch:()=>dx,check:()=>Jk,cidrv4:()=>sk,cidrv6:()=>uk,codec:()=>Vk,cuid:()=>XE,cuid2:()=>ek,custom:()=>Kk,date:()=>Tk,describe:()=>Qk,discriminatedUnion:()=>Dk,e164:()=>dk,email:()=>ZE,emoji:()=>QE,enum:()=>bf,exactOptional:()=>rx,file:()=>zk,float32:()=>vk,float64:()=>yk,function:()=>qk,guid:()=>GE,hash:()=>gk,hex:()=>hk,hostname:()=>mk,httpUrl:()=>KE,instanceof:()=>Xk,int:()=>Yp,int32:()=>Ak,int64:()=>wk,intersection:()=>Hb,ipv4:()=>ok,ipv6:()=>ak,json:()=>tT,jwt:()=>pk,keyof:()=>Ck,ksuid:()=>nk,lazy:()=>vx,literal:()=>Fk,looseObject:()=>Rk,looseRecord:()=>Mk,mac:()=>ik,map:()=>jk,meta:()=>Yk,nan:()=>Gk,nanoid:()=>YE,nativeEnum:()=>Lk,never:()=>yf,nonoptional:()=>ux,null:()=>jb,nullable:()=>wc,nullish:()=>Bk,number:()=>Rb,object:()=>$k,optional:()=>xc,partialRecord:()=>Pk,pipe:()=>Sc,prefault:()=>sx,preprocess:()=>rT,promise:()=>Wk,readonly:()=>mx,record:()=>Jb,refine:()=>bx,set:()=>Uk,strictObject:()=>Nk,string:()=>Qp,stringFormat:()=>fk,stringbool:()=>eT,success:()=>Zk,superRefine:()=>xx,symbol:()=>_k,templateLiteral:()=>Hk,transform:()=>xf,tuple:()=>qb,uint32:()=>bk,uint64:()=>Sk,ulid:()=>tk,undefined:()=>Ik,union:()=>Af,unknown:()=>pa,url:()=>JE,uuid:()=>VE,uuidv4:()=>HE,uuidv6:()=>WE,uuidv7:()=>qE,void:()=>kk,xid:()=>rk,xor:()=>Ok});var Hp={};lr(Hp,{endsWith:()=>hs,gt:()=>qn,gte:()=>pr,includes:()=>fs,length:()=>la,lowercase:()=>ds,lt:()=>Wn,lte:()=>Fr,maxLength:()=>ca,maxSize:()=>Si,mime:()=>gs,minLength:()=>Eo,minSize:()=>Jn,multipleOf:()=>wi,negative:()=>Up,nonnegative:()=>Fp,nonpositive:()=>Lp,normalize:()=>vs,overwrite:()=>yn,positive:()=>jp,property:()=>zp,regex:()=>ls,size:()=>ua,slugify:()=>xs,startsWith:()=>ms,toLowerCase:()=>As,toUpperCase:()=>bs,trim:()=>ys,uppercase:()=>ps});var _s={};lr(_s,{ZodISODate:()=>qp,ZodISODateTime:()=>Wp,ZodISODuration:()=>Kp,ZodISOTime:()=>Jp,date:()=>vb,datetime:()=>gb,duration:()=>Ab,time:()=>yb});var Wp=A("ZodISODateTime",(e,t)=>{Wv.init(e,t),et.init(e,t)});function gb(e){return Qy(Wp,e)}var qp=A("ZodISODate",(e,t)=>{qv.init(e,t),et.init(e,t)});function vb(e){return Yy(qp,e)}var Jp=A("ZodISOTime",(e,t)=>{Jv.init(e,t),et.init(e,t)});function yb(e){return Xy(Jp,e)}var Kp=A("ZodISODuration",(e,t)=>{Kv.init(e,t),et.init(e,t)});function Ab(e){return eA(Kp,e)}var BE=(e,t)=>{ac.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>uc(e,r)},flatten:{value:r=>sc(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ts,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ts,2)}},isEmpty:{get(){return e.issues.length===0}}})},cj=A("ZodError",BE),Tr=A("ZodError",BE,{Parent:Error});var bb=os(Tr),xb=is(Tr),wb=as(Tr),da=ss(Tr),Sb=Vd(Tr),_b=Hd(Tr),Ib=Wd(Tr),Eb=qd(Tr),kb=Jd(Tr),Tb=Kd(Tr),Cb=Qd(Tr),$b=Yd(Tr);var $e=A("ZodType",(e,t)=>(Ee.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ss(e,"input"),output:Ss(e,"output")}}),e.toJSONSchema=RA(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(B.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(r,o)=>dr(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>bb(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>wb(e,r,o),e.parseAsync=async(r,o)=>xb(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>da(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Sb(e,r,o),e.decode=(r,o)=>_b(e,r,o),e.encodeAsync=async(r,o)=>Ib(e,r,o),e.decodeAsync=async(r,o)=>Eb(e,r,o),e.safeEncode=(r,o)=>kb(e,r,o),e.safeDecode=(r,o)=>Tb(e,r,o),e.safeEncodeAsync=async(r,o)=>Cb(e,r,o),e.safeDecodeAsync=async(r,o)=>$b(e,r,o),e.refine=(r,o)=>e.check(bx(r,o)),e.superRefine=r=>e.check(xx(r)),e.overwrite=r=>e.check(yn(r)),e.optional=()=>xc(e),e.exactOptional=()=>rx(e),e.nullable=()=>wc(e),e.nullish=()=>xc(wc(e)),e.nonoptional=r=>ux(e,r),e.array=()=>Ec(e),e.or=r=>Af([e,r]),e.and=r=>Hb(e,r),e.transform=r=>Sc(e,xf(r)),e.default=r=>ix(e,r),e.prefault=r=>sx(e,r),e.catch=r=>dx(e,r),e.pipe=r=>Sc(e,r),e.readonly=()=>mx(e),e.describe=r=>{let o=e.clone();return Jt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Jt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Jt.get(e);let o=e.clone();return Jt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Xp=A("_ZodString",(e,t)=>{sa.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(o,n,i)=>OA(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(ls(...o)),e.includes=(...o)=>e.check(fs(...o)),e.startsWith=(...o)=>e.check(ms(...o)),e.endsWith=(...o)=>e.check(hs(...o)),e.min=(...o)=>e.check(Eo(...o)),e.max=(...o)=>e.check(ca(...o)),e.length=(...o)=>e.check(la(...o)),e.nonempty=(...o)=>e.check(Eo(1,...o)),e.lowercase=o=>e.check(ds(o)),e.uppercase=o=>e.check(ps(o)),e.trim=()=>e.check(ys()),e.normalize=(...o)=>e.check(vs(...o)),e.toLowerCase=()=>e.check(As()),e.toUpperCase=()=>e.check(bs()),e.slugify=()=>e.check(xs())}),Es=A("ZodString",(e,t)=>{sa.init(e,t),Xp.init(e,t),e.email=r=>e.check(vp(ef,r)),e.url=r=>e.check(yc(_c,r)),e.jwt=r=>e.check(Mp(gf,r)),e.emoji=r=>e.check(wp(tf,r)),e.guid=r=>e.check(vc(bc,r)),e.uuid=r=>e.check(yp(Kn,r)),e.uuidv4=r=>e.check(Ap(Kn,r)),e.uuidv6=r=>e.check(bp(Kn,r)),e.uuidv7=r=>e.check(xp(Kn,r)),e.nanoid=r=>e.check(Sp(rf,r)),e.guid=r=>e.check(vc(bc,r)),e.cuid=r=>e.check(_p(nf,r)),e.cuid2=r=>e.check(Ip(of,r)),e.ulid=r=>e.check(Ep(af,r)),e.base64=r=>e.check(Op(ff,r)),e.base64url=r=>e.check(Dp(mf,r)),e.xid=r=>e.check(kp(sf,r)),e.ksuid=r=>e.check(Tp(uf,r)),e.ipv4=r=>e.check(Cp(cf,r)),e.ipv6=r=>e.check($p(lf,r)),e.cidrv4=r=>e.check(Np(df,r)),e.cidrv6=r=>e.check(Rp(pf,r)),e.e164=r=>e.check(Pp(hf,r)),e.datetime=r=>e.check(gb(r)),e.date=r=>e.check(vb(r)),e.time=r=>e.check(yb(r)),e.duration=r=>e.check(Ab(r))});function Qp(e){return Wy(Es,e)}var et=A("ZodStringFormat",(e,t)=>{Xe.init(e,t),Xp.init(e,t)}),ef=A("ZodEmail",(e,t)=>{Uv.init(e,t),et.init(e,t)});function ZE(e){return vp(ef,e)}var bc=A("ZodGUID",(e,t)=>{Mv.init(e,t),et.init(e,t)});function GE(e){return vc(bc,e)}var Kn=A("ZodUUID",(e,t)=>{jv.init(e,t),et.init(e,t)});function VE(e){return yp(Kn,e)}function HE(e){return Ap(Kn,e)}function WE(e){return bp(Kn,e)}function qE(e){return xp(Kn,e)}var _c=A("ZodURL",(e,t)=>{Lv.init(e,t),et.init(e,t)});function JE(e){return yc(_c,e)}function KE(e){return yc(_c,{protocol:/^https?$/,hostname:rn.domain,...B.normalizeParams(e)})}var tf=A("ZodEmoji",(e,t)=>{Fv.init(e,t),et.init(e,t)});function QE(e){return wp(tf,e)}var rf=A("ZodNanoID",(e,t)=>{zv.init(e,t),et.init(e,t)});function YE(e){return Sp(rf,e)}var nf=A("ZodCUID",(e,t)=>{Bv.init(e,t),et.init(e,t)});function XE(e){return _p(nf,e)}var of=A("ZodCUID2",(e,t)=>{Zv.init(e,t),et.init(e,t)});function ek(e){return Ip(of,e)}var af=A("ZodULID",(e,t)=>{Gv.init(e,t),et.init(e,t)});function tk(e){return Ep(af,e)}var sf=A("ZodXID",(e,t)=>{Vv.init(e,t),et.init(e,t)});function rk(e){return kp(sf,e)}var uf=A("ZodKSUID",(e,t)=>{Hv.init(e,t),et.init(e,t)});function nk(e){return Tp(uf,e)}var cf=A("ZodIPv4",(e,t)=>{Qv.init(e,t),et.init(e,t)});function ok(e){return Cp(cf,e)}var Nb=A("ZodMAC",(e,t)=>{Xv.init(e,t),et.init(e,t)});function ik(e){return Jy(Nb,e)}var lf=A("ZodIPv6",(e,t)=>{Yv.init(e,t),et.init(e,t)});function ak(e){return $p(lf,e)}var df=A("ZodCIDRv4",(e,t)=>{ey.init(e,t),et.init(e,t)});function sk(e){return Np(df,e)}var pf=A("ZodCIDRv6",(e,t)=>{ty.init(e,t),et.init(e,t)});function uk(e){return Rp(pf,e)}var ff=A("ZodBase64",(e,t)=>{ny.init(e,t),et.init(e,t)});function ck(e){return Op(ff,e)}var mf=A("ZodBase64URL",(e,t)=>{oy.init(e,t),et.init(e,t)});function lk(e){return Dp(mf,e)}var hf=A("ZodE164",(e,t)=>{iy.init(e,t),et.init(e,t)});function dk(e){return Pp(hf,e)}var gf=A("ZodJWT",(e,t)=>{ay.init(e,t),et.init(e,t)});function pk(e){return Mp(gf,e)}var ks=A("ZodCustomStringFormat",(e,t)=>{sy.init(e,t),et.init(e,t)});function fk(e,t,r={}){return ws(ks,e,t,r)}function mk(e){return ws(ks,"hostname",rn.hostname,e)}function hk(e){return ws(ks,"hex",rn.hex,e)}function gk(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=rn[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return ws(ks,o,n,t)}var Ts=A("ZodNumber",(e,t)=>{up.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(o,n,i)=>DA(e,o,n,i),e.gt=(o,n)=>e.check(qn(o,n)),e.gte=(o,n)=>e.check(pr(o,n)),e.min=(o,n)=>e.check(pr(o,n)),e.lt=(o,n)=>e.check(Wn(o,n)),e.lte=(o,n)=>e.check(Fr(o,n)),e.max=(o,n)=>e.check(Fr(o,n)),e.int=o=>e.check(Yp(o)),e.safe=o=>e.check(Yp(o)),e.positive=o=>e.check(qn(0,o)),e.nonnegative=o=>e.check(pr(0,o)),e.negative=o=>e.check(Wn(0,o)),e.nonpositive=o=>e.check(Fr(0,o)),e.multipleOf=(o,n)=>e.check(wi(o,n)),e.step=(o,n)=>e.check(wi(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Rb(e){return tA(Ts,e)}var fa=A("ZodNumberFormat",(e,t)=>{uy.init(e,t),Ts.init(e,t)});function Yp(e){return nA(fa,e)}function vk(e){return oA(fa,e)}function yk(e){return iA(fa,e)}function Ak(e){return aA(fa,e)}function bk(e){return sA(fa,e)}var Cs=A("ZodBoolean",(e,t)=>{pc.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>PA(e,r,o,n)});function Ob(e){return uA(Cs,e)}var $s=A("ZodBigInt",(e,t)=>{cp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(o,n,i)=>MA(e,o,n,i),e.gte=(o,n)=>e.check(pr(o,n)),e.min=(o,n)=>e.check(pr(o,n)),e.gt=(o,n)=>e.check(qn(o,n)),e.gte=(o,n)=>e.check(pr(o,n)),e.min=(o,n)=>e.check(pr(o,n)),e.lt=(o,n)=>e.check(Wn(o,n)),e.lte=(o,n)=>e.check(Fr(o,n)),e.max=(o,n)=>e.check(Fr(o,n)),e.positive=o=>e.check(qn(BigInt(0),o)),e.negative=o=>e.check(Wn(BigInt(0),o)),e.nonpositive=o=>e.check(Fr(BigInt(0),o)),e.nonnegative=o=>e.check(pr(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(wi(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function xk(e){return lA($s,e)}var vf=A("ZodBigIntFormat",(e,t)=>{cy.init(e,t),$s.init(e,t)});function wk(e){return pA(vf,e)}function Sk(e){return fA(vf,e)}var Db=A("ZodSymbol",(e,t)=>{ly.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jA(e,r,o,n)});function _k(e){return mA(Db,e)}var Pb=A("ZodUndefined",(e,t)=>{dy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>LA(e,r,o,n)});function Ik(e){return hA(Pb,e)}var Mb=A("ZodNull",(e,t)=>{py.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>UA(e,r,o,n)});function jb(e){return gA(Mb,e)}var Ub=A("ZodAny",(e,t)=>{fy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>BA(e,r,o,n)});function Ek(){return vA(Ub)}var Lb=A("ZodUnknown",(e,t)=>{my.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ZA(e,r,o,n)});function pa(){return yA(Lb)}var Fb=A("ZodNever",(e,t)=>{hy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zA(e,r,o,n)});function yf(e){return AA(Fb,e)}var zb=A("ZodVoid",(e,t)=>{gy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>FA(e,r,o,n)});function kk(e){return bA(zb,e)}var Ic=A("ZodDate",(e,t)=>{vy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(o,n,i)=>GA(e,o,n,i),e.min=(o,n)=>e.check(pr(o,n)),e.max=(o,n)=>e.check(Fr(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Tk(e){return xA(Ic,e)}var Bb=A("ZodArray",(e,t)=>{yy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>rb(e,r,o,n),e.element=t.element,e.min=(r,o)=>e.check(Eo(r,o)),e.nonempty=r=>e.check(Eo(1,r)),e.max=(r,o)=>e.check(ca(r,o)),e.length=(r,o)=>e.check(la(r,o)),e.unwrap=()=>e.element});function Ec(e,t){return _A(Bb,e,t)}function Ck(e){let t=e._zod.def.shape;return bf(Object.keys(t))}var kc=A("ZodObject",(e,t)=>{Ay.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nb(e,r,o,n),B.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>bf(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pa()}),e.loose=()=>e.clone({...e._zod.def,catchall:pa()}),e.strict=()=>e.clone({...e._zod.def,catchall:yf()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>B.extend(e,r),e.safeExtend=r=>B.safeExtend(e,r),e.merge=r=>B.merge(e,r),e.pick=r=>B.pick(e,r),e.omit=r=>B.omit(e,r),e.partial=(...r)=>B.partial(wf,e,r[0]),e.required=(...r)=>B.required(Sf,e,r[0])});function $k(e,t){let r={type:"object",shape:e??{},...B.normalizeParams(t)};return new kc(r)}function Nk(e,t){return new kc({type:"object",shape:e,catchall:yf(),...B.normalizeParams(t)})}function Rk(e,t){return new kc({type:"object",shape:e,catchall:pa(),...B.normalizeParams(t)})}var Tc=A("ZodUnion",(e,t)=>{fc.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zp(e,r,o,n),e.options=t.options});function Af(e,t){return new Tc({type:"union",options:e,...B.normalizeParams(t)})}var Zb=A("ZodXor",(e,t)=>{Tc.init(e,t),by.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zp(e,r,o,n),e.options=t.options});function Ok(e,t){return new Zb({type:"union",options:e,inclusive:!1,...B.normalizeParams(t)})}var Gb=A("ZodDiscriminatedUnion",(e,t)=>{Tc.init(e,t),xy.init(e,t)});function Dk(e,t,r){return new Gb({type:"union",options:t,discriminator:e,...B.normalizeParams(r)})}var Vb=A("ZodIntersection",(e,t)=>{wy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ob(e,r,o,n)});function Hb(e,t){return new Vb({type:"intersection",left:e,right:t})}var Wb=A("ZodTuple",(e,t)=>{lp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ib(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function qb(e,t,r){let o=t instanceof Ee,n=o?r:t,i=o?t:null;return new Wb({type:"tuple",items:e,rest:i,...B.normalizeParams(n)})}var Cc=A("ZodRecord",(e,t)=>{Sy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ab(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Jb(e,t,r){return new Cc({type:"record",keyType:e,valueType:t,...B.normalizeParams(r)})}function Pk(e,t,r){let o=dr(e);return o._zod.values=void 0,new Cc({type:"record",keyType:o,valueType:t,...B.normalizeParams(r)})}function Mk(e,t,r){return new Cc({type:"record",keyType:e,valueType:t,mode:"loose",...B.normalizeParams(r)})}var Kb=A("ZodMap",(e,t)=>{_y.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eb(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Jn(...r)),e.nonempty=r=>e.check(Jn(1,r)),e.max=(...r)=>e.check(Si(...r)),e.size=(...r)=>e.check(ua(...r))});function jk(e,t,r){return new Kb({type:"map",keyType:e,valueType:t,...B.normalizeParams(r)})}var Qb=A("ZodSet",(e,t)=>{Iy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tb(e,r,o,n),e.min=(...r)=>e.check(Jn(...r)),e.nonempty=r=>e.check(Jn(1,r)),e.max=(...r)=>e.check(Si(...r)),e.size=(...r)=>e.check(ua(...r))});function Uk(e,t){return new Qb({type:"set",valueType:e,...B.normalizeParams(t)})}var Is=A("ZodEnum",(e,t)=>{Ey.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(o,n,i)=>VA(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Is({...t,checks:[],...B.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Is({...t,checks:[],...B.normalizeParams(n),entries:i})}});function bf(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Is({type:"enum",entries:r,...B.normalizeParams(t)})}function Lk(e,t){return new Is({type:"enum",entries:e,...B.normalizeParams(t)})}var Yb=A("ZodLiteral",(e,t)=>{ky.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>HA(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Fk(e,t){return new Yb({type:"literal",values:Array.isArray(e)?e:[e],...B.normalizeParams(t)})}var Xb=A("ZodFile",(e,t)=>{Ty.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>JA(e,r,o,n),e.min=(r,o)=>e.check(Jn(r,o)),e.max=(r,o)=>e.check(Si(r,o)),e.mime=(r,o)=>e.check(gs(Array.isArray(r)?r:[r],o))});function zk(e){return IA(Xb,e)}var ex=A("ZodTransform",(e,t)=>{Cy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>XA(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new vi(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(B.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(B.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function xf(e){return new ex({type:"transform",transform:e})}var wf=A("ZodOptional",(e,t)=>{dp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function xc(e){return new wf({type:"optional",innerType:e})}var tx=A("ZodExactOptional",(e,t)=>{$y.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function rx(e){return new tx({type:"optional",innerType:e})}var nx=A("ZodNullable",(e,t)=>{Ny.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>sb(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function wc(e){return new nx({type:"nullable",innerType:e})}function Bk(e){return xc(wc(e))}var ox=A("ZodDefault",(e,t)=>{Ry.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cb(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ix(e,t){return new ox({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():B.shallowClone(t)}})}var ax=A("ZodPrefault",(e,t)=>{Oy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>lb(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function sx(e,t){return new ax({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():B.shallowClone(t)}})}var Sf=A("ZodNonOptional",(e,t)=>{Dy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ub(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function ux(e,t){return new Sf({type:"nonoptional",innerType:e,...B.normalizeParams(t)})}var cx=A("ZodSuccess",(e,t)=>{Py.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>KA(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Zk(e){return new cx({type:"success",innerType:e})}var lx=A("ZodCatch",(e,t)=>{My.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>db(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function dx(e,t){return new lx({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var px=A("ZodNaN",(e,t)=>{jy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>WA(e,r,o,n)});function Gk(e){return SA(px,e)}var _f=A("ZodPipe",(e,t)=>{Uy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pb(e,r,o,n),e.in=t.in,e.out=t.out});function Sc(e,t){return new _f({type:"pipe",in:e,out:t})}var If=A("ZodCodec",(e,t)=>{_f.init(e,t),mc.init(e,t)});function Vk(e,t,r){return new If({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var fx=A("ZodReadonly",(e,t)=>{Ly.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fb(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function mx(e){return new fx({type:"readonly",innerType:e})}var hx=A("ZodTemplateLiteral",(e,t)=>{Fy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qA(e,r,o,n)});function Hk(e,t){return new hx({type:"template_literal",parts:e,...B.normalizeParams(t)})}var gx=A("ZodLazy",(e,t)=>{Zy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hb(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function vx(e){return new gx({type:"lazy",getter:e})}var yx=A("ZodPromise",(e,t)=>{By.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mb(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Wk(e){return new yx({type:"promise",innerType:e})}var Ax=A("ZodFunction",(e,t)=>{zy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>YA(e,r,o,n)});function qk(e){return new Ax({type:"function",input:Array.isArray(e?.input)?qb(e?.input):e?.input??Ec(pa()),output:e?.output??pa()})}var $c=A("ZodCustom",(e,t)=>{Gy.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,o,n)=>QA(e,r,o,n)});function Jk(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function Kk(e,t){return EA($c,e??(()=>!0),t)}function bx(e,t={}){return kA($c,e,t)}function xx(e){return TA(e)}var Qk=CA,Yk=$A;function Xk(e,t={}){let r=new $c({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...B.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var eT=(...e)=>NA({Codec:If,Boolean:Cs,String:Es},...e);function tT(e){let t=vx(()=>Af([Qp(e),Rb(),Ob(),jb(),Ec(t),Jb(Qp(),t)]));return t}function rT(e,t){return Sc(xf(e),t)}var dj={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function pj(e){gt({customError:e})}function fj(){return gt().customError}var wx;wx||(wx={});var ee={...Ac,...Hp,iso:_s},mj=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function hj(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function gj(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function nT(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ee.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return ee.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=gj(n,t),a=tr(i,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return ee.null();if(n.length===0)return ee.never();if(n.length===1)return ee.literal(n[0]);if(n.every(a=>typeof a=="string"))return ee.enum(n);let i=n.map(a=>ee.literal(a));return i.length<2?i[0]:ee.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ee.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return nT(a,t)});return n.length===0?ee.never():n.length===1?n[0]:ee.union(n)}if(!r)return ee.any();let o;switch(r){case"string":{let n=ee.string();if(e.format){let i=e.format;i==="email"?n=n.check(ee.email()):i==="uri"||i==="uri-reference"?n=n.check(ee.url()):i==="uuid"||i==="guid"?n=n.check(ee.uuid()):i==="date-time"?n=n.check(ee.iso.datetime()):i==="date"?n=n.check(ee.iso.date()):i==="time"?n=n.check(ee.iso.time()):i==="duration"?n=n.check(ee.iso.duration()):i==="ipv4"?n=n.check(ee.ipv4()):i==="ipv6"?n=n.check(ee.ipv6()):i==="mac"?n=n.check(ee.mac()):i==="cidr"?n=n.check(ee.cidrv4()):i==="cidr-v6"?n=n.check(ee.cidrv6()):i==="base64"?n=n.check(ee.base64()):i==="base64url"?n=n.check(ee.base64url()):i==="e164"?n=n.check(ee.e164()):i==="jwt"?n=n.check(ee.jwt()):i==="emoji"?n=n.check(ee.emoji()):i==="nanoid"?n=n.check(ee.nanoid()):i==="cuid"?n=n.check(ee.cuid()):i==="cuid2"?n=n.check(ee.cuid2()):i==="ulid"?n=n.check(ee.ulid()):i==="xid"?n=n.check(ee.xid()):i==="ksuid"&&(n=n.check(ee.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?ee.number().int():ee.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=ee.boolean();break}case"null":{o=ee.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let d=tr(l,t);n[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=tr(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?tr(e.additionalProperties,t):ee.any();if(Object.keys(n).length===0){o=ee.record(c,l);break}let d=ee.object(n).passthrough(),f=ee.looseRecord(c,l);o=ee.intersection(d,f);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let p of l){let m=tr(c[p],t),v=ee.string().regex(new RegExp(p));d.push(ee.looseRecord(v,m))}let f=[];if(Object.keys(n).length>0&&f.push(ee.object(n).passthrough()),f.push(...d),f.length===0)o=ee.object({}).passthrough();else if(f.length===1)o=f[0];else{let p=ee.intersection(f[0],f[1]);for(let m=2;m<f.length;m++)p=ee.intersection(p,f[m]);o=p}break}let s=ee.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(tr(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>tr(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?tr(i,t):void 0;s?o=ee.tuple(a).rest(s):o=ee.tuple(a),typeof e.minItems=="number"&&(o=o.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ee.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>tr(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?tr(e.additionalItems,t):void 0;s?o=ee.tuple(a).rest(s):o=ee.tuple(a),typeof e.minItems=="number"&&(o=o.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(ee.maxLength(e.maxItems)))}else if(i!==void 0){let a=tr(i,t),s=ee.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=ee.array(ee.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}function tr(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let r=nT(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>tr(l,t)),c=ee.union(s);r=o?ee.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>tr(l,t)),c=ee.xor(s);r=o?ee.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:ee.any();else{let s=o?r:tr(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=ee.intersection(s,tr(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=ee.nullable(r)),e.readOnly===!0&&(r=ee.readonly(r));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))mj.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function oT(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let r=hj(e,t?.defaultTarget),o=e.$defs||e.definitions||{},n={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Jt};return tr(e,n)}var Sx={};lr(Sx,{bigint:()=>bj,boolean:()=>Aj,date:()=>xj,number:()=>yj,string:()=>vj});function vj(e){return qy(Es,e)}function yj(e){return rA(Ts,e)}function Aj(e){return cA(Cs,e)}function bj(e){return dA($s,e)}function xj(e){return wA(Ic,e)}gt(pp());var Le;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let a of n)i[a]=a;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),a={};for(let s of i)a[s]=n[s];return e.objectValues(a)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.push(a);return i},e.find=(n,i)=>{for(let a of n)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(Le||(Le={}));var aT;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(aT||(aT={}));var oe=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),To=e=>{switch(typeof e){case"undefined":return oe.undefined;case"string":return oe.string;case"number":return Number.isNaN(e)?oe.nan:oe.number;case"boolean":return oe.boolean;case"function":return oe.function;case"bigint":return oe.bigint;case"symbol":return oe.symbol;case"object":return Array.isArray(e)?oe.array:e===null?oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?oe.promise:typeof Map<"u"&&e instanceof Map?oe.map:typeof Set<"u"&&e instanceof Set?oe.set:typeof Date<"u"&&e instanceof Date?oe.date:oe.object;default:return oe.unknown}};var F=Le.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 zr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)o._errors.push(r(a));else{let s=o,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r=Object.create(null),o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};zr.create=e=>new zr(e);var wj=(e,t)=>{let r;switch(e.code){case F.invalid_type:e.received===oe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case F.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Le.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:r=`Unrecognized key(s) in object: ${Le.joinValues(e.keys,", ")}`;break;case F.invalid_union:r="Invalid input";break;case F.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Le.joinValues(e.options)}`;break;case F.invalid_enum_value:r=`Invalid enum value. Expected ${Le.joinValues(e.options)}, received '${e.received}'`;break;case F.invalid_arguments:r="Invalid function arguments";break;case F.invalid_return_type:r="Invalid function return type";break;case F.invalid_date:r="Invalid date";break;case F.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Le.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case F.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case F.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case F.custom:r="Invalid input";break;case F.invalid_intersection_types:r="Intersection results could not be merged";break;case F.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case F.not_finite:r="Number must be finite";break;default:r=t.defaultError,Le.assertNever(e)}return{message:r}},Ti=wj;var Sj=Ti;function Nc(){return Sj}var Ef=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],a={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let s="",c=o.filter(l=>!!l).slice().reverse();for(let l of c)s=l(a,{data:t,defaultError:s}).message;return{...n,path:i,message:s}};function te(e,t){let r=Nc(),o=Ef({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ti?void 0:Ti].filter(n=>!!n)});e.common.issues.push(o)}var rr=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return Se;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,a=await n.value;o.push({key:i,value:a})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:a}=n;if(i.status==="aborted"||a.status==="aborted")return Se;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}},Se=Object.freeze({status:"aborted"}),Ns=e=>({status:"dirty",value:e}),mr=e=>({status:"valid",value:e}),_x=e=>e.status==="aborted",Ix=e=>e.status==="dirty",ma=e=>e.status==="valid",Rc=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(le||(le={}));var nn=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},sT=(e,t)=>{if(ma(t))return{success:!0,data:t.value};if(!e.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 zr(e.common.issues);return this._error=r,this._error}}};function Ne(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(a,s)=>{let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:n}}var Pe=class{get description(){return this._def.description}_getType(t){return To(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:To(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new rr,ctx:{common:t.parent.common,data:t.data,parsedType:To(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Rc(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:To(t)},n=this._parseSync({data:t,path:o.path,parent:o});return sT(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:To(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return ma(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>ma(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:To(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Rc(n)?n:Promise.resolve(n));return sT(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let a=t(n),s=()=>i.addIssue({code:F.custom,...o(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new bn({schema:this,typeName:S.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 An.create(this,this._def)}nullable(){return No.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $i.create(this)}promise(){return ha.create(this,this._def)}or(t){return Ms.create([this,t],this._def)}and(t){return js.create(this,t,this._def)}transform(t){return new bn({...Ne(this._def),schema:this,typeName:S.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Bs({...Ne(this._def),innerType:this,defaultValue:r,typeName:S.ZodDefault})}brand(){return new kf({typeName:S.ZodBranded,type:this,...Ne(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Zs({...Ne(this._def),innerType:this,catchValue:r,typeName:S.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Tf.create(this,t)}readonly(){return Gs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},_j=/^c[^\s-]{8,}$/i,Ij=/^[0-9a-z]+$/,Ej=/^[0-9A-HJKMNP-TV-Z]{26}$/i,kj=/^[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,Tj=/^[a-z0-9_-]{21}$/i,Cj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$j=/^[-+]?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)?)??$/,Nj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Rj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ex,Oj=/^(?:(?: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])$/,Dj=/^(?:(?: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])$/,Pj=/^(([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]))$/,Mj=/^(([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])$/,jj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Uj=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,uT="((\\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])))",Lj=new RegExp(`^${uT}$`);function cT(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Fj(e){return new RegExp(`^${cT(e)}$`)}function zj(e){let t=`${uT}T${cT(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Bj(e,t){return!!((t==="v4"||!t)&&Oj.test(e)||(t==="v6"||!t)&&Pj.test(e))}function Zj(e,t){if(!Cj.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function Gj(e,t){return!!((t==="v4"||!t)&&Dj.test(e)||(t==="v6"||!t)&&Mj.test(e))}var Os=class e extends Pe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==oe.string){let i=this._getOrReturnCtx(t);return te(i,{code:F.invalid_type,expected:oe.string,received:i.parsedType}),Se}let o=new rr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),te(n,{code:F.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),te(n,{code:F.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(n=this._getOrReturnCtx(t,n),a?te(n,{code:F.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&te(n,{code:F.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")Nj.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"email",code:F.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Ex||(Ex=new RegExp(Rj,"u")),Ex.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"emoji",code:F.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")kj.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"uuid",code:F.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")Tj.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"nanoid",code:F.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")_j.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"cuid",code:F.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")Ij.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"cuid2",code:F.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")Ej.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"ulid",code:F.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),te(n,{validation:"url",code:F.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"regex",code:F.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),te(n,{code:F.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),te(n,{code:F.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),te(n,{code:F.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?zj(i).test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{code:F.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?Lj.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{code:F.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?Fj(i).test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{code:F.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?$j.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"duration",code:F.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?Bj(t.data,i.version)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"ip",code:F.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?Zj(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"jwt",code:F.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?Gj(t.data,i.version)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"cidr",code:F.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?jj.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"base64",code:F.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?Uj.test(t.data)||(n=this._getOrReturnCtx(t,n),te(n,{validation:"base64url",code:F.invalid_string,message:i.message}),o.dirty()):Le.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:F.invalid_string,...le.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...le.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...le.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...le.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...le.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...le.errToObj(r)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Os.create=e=>new Os({checks:[],typeName:S.ZodString,coerce:e?.coerce??!1,...Ne(e)});function Vj(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),a=Number.parseInt(t.toFixed(n).replace(".",""));return i%a/10**n}var Oc=class e extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==oe.number){let i=this._getOrReturnCtx(t);return te(i,{code:F.invalid_type,expected:oe.number,received:i.parsedType}),Se}let o,n=new rr;for(let i of this._def.checks)i.kind==="int"?Le.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:F.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),te(o,{code:F.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),te(o,{code:F.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Vj(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),te(o,{code:F.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:F.not_finite,message:i.message}),n.dirty()):Le.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,le.toString(r))}gt(t,r){return this.setLimit("min",t,!1,le.toString(r))}lte(t,r){return this.setLimit("max",t,!0,le.toString(r))}lt(t,r){return this.setLimit("max",t,!1,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Le.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Oc.create=e=>new Oc({checks:[],typeName:S.ZodNumber,coerce:e?.coerce||!1,...Ne(e)});var Dc=class e extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==oe.bigint)return this._getInvalidInput(t);let o,n=new rr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),te(o,{code:F.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),te(o,{code:F.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),te(o,{code:F.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Le.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return te(r,{code:F.invalid_type,expected:oe.bigint,received:r.parsedType}),Se}gte(t,r){return this.setLimit("min",t,!0,le.toString(r))}gt(t,r){return this.setLimit("min",t,!1,le.toString(r))}lte(t,r){return this.setLimit("max",t,!0,le.toString(r))}lt(t,r){return this.setLimit("max",t,!1,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Dc.create=e=>new Dc({checks:[],typeName:S.ZodBigInt,coerce:e?.coerce??!1,...Ne(e)});var Pc=class extends Pe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==oe.boolean){let o=this._getOrReturnCtx(t);return te(o,{code:F.invalid_type,expected:oe.boolean,received:o.parsedType}),Se}return mr(t.data)}};Pc.create=e=>new Pc({typeName:S.ZodBoolean,coerce:e?.coerce||!1,...Ne(e)});var Mc=class e extends Pe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==oe.date){let i=this._getOrReturnCtx(t);return te(i,{code:F.invalid_type,expected:oe.date,received:i.parsedType}),Se}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return te(i,{code:F.invalid_date}),Se}let o=new rr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),te(n,{code:F.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),te(n,{code:F.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):Le.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Mc.create=e=>new Mc({checks:[],coerce:e?.coerce||!1,typeName:S.ZodDate,...Ne(e)});var jc=class extends Pe{_parse(t){if(this._getType(t)!==oe.symbol){let o=this._getOrReturnCtx(t);return te(o,{code:F.invalid_type,expected:oe.symbol,received:o.parsedType}),Se}return mr(t.data)}};jc.create=e=>new jc({typeName:S.ZodSymbol,...Ne(e)});var Ds=class extends Pe{_parse(t){if(this._getType(t)!==oe.undefined){let o=this._getOrReturnCtx(t);return te(o,{code:F.invalid_type,expected:oe.undefined,received:o.parsedType}),Se}return mr(t.data)}};Ds.create=e=>new Ds({typeName:S.ZodUndefined,...Ne(e)});var Ps=class extends Pe{_parse(t){if(this._getType(t)!==oe.null){let o=this._getOrReturnCtx(t);return te(o,{code:F.invalid_type,expected:oe.null,received:o.parsedType}),Se}return mr(t.data)}};Ps.create=e=>new Ps({typeName:S.ZodNull,...Ne(e)});var Uc=class extends Pe{constructor(){super(...arguments),this._any=!0}_parse(t){return mr(t.data)}};Uc.create=e=>new Uc({typeName:S.ZodAny,...Ne(e)});var Ci=class extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mr(t.data)}};Ci.create=e=>new Ci({typeName:S.ZodUnknown,...Ne(e)});var Qn=class extends Pe{_parse(t){let r=this._getOrReturnCtx(t);return te(r,{code:F.invalid_type,expected:oe.never,received:r.parsedType}),Se}};Qn.create=e=>new Qn({typeName:S.ZodNever,...Ne(e)});var Lc=class extends Pe{_parse(t){if(this._getType(t)!==oe.undefined){let o=this._getOrReturnCtx(t);return te(o,{code:F.invalid_type,expected:oe.void,received:o.parsedType}),Se}return mr(t.data)}};Lc.create=e=>new Lc({typeName:S.ZodVoid,...Ne(e)});var $i=class e extends Pe{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==oe.array)return te(r,{code:F.invalid_type,expected:oe.array,received:r.parsedType}),Se;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,s=r.data.length<n.exactLength.value;(a||s)&&(te(r,{code:a?F.too_big:F.too_small,minimum:s?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(te(r,{code:F.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(te(r,{code:F.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>n.type._parseAsync(new nn(r,a,r.path,s)))).then(a=>rr.mergeArray(o,a));let i=[...r.data].map((a,s)=>n.type._parseSync(new nn(r,a,r.path,s)));return rr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:le.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:le.toString(r)}})}nonempty(t){return this.min(1,t)}};$i.create=(e,t)=>new $i({type:e,minLength:null,maxLength:null,exactLength:null,typeName:S.ZodArray,...Ne(t)});function Rs(e){if(e instanceof Br){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=An.create(Rs(o))}return new Br({...e._def,shape:()=>t})}else return e instanceof $i?new $i({...e._def,type:Rs(e.element)}):e instanceof An?An.create(Rs(e.unwrap())):e instanceof No?No.create(Rs(e.unwrap())):e instanceof $o?$o.create(e.items.map(t=>Rs(t))):e}var Br=class e extends Pe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Le.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==oe.object){let l=this._getOrReturnCtx(t);return te(l,{code:F.invalid_type,expected:oe.object,received:l.parsedType}),Se}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Qn&&this._def.unknownKeys==="strip"))for(let l in n.data)a.includes(l)||s.push(l);let c=[];for(let l of a){let d=i[l],f=n.data[l];c.push({key:{status:"valid",value:l},value:d._parse(new nn(n,f,n.path,l)),alwaysSet:l in n.data})}if(this._def.catchall instanceof Qn){let l=this._def.unknownKeys;if(l==="passthrough")for(let d of s)c.push({key:{status:"valid",value:d},value:{status:"valid",value:n.data[d]}});else if(l==="strict")s.length>0&&(te(n,{code:F.unrecognized_keys,keys:s}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let d of s){let f=n.data[d];c.push({key:{status:"valid",value:d},value:l._parse(new nn(n,f,n.path,d)),alwaysSet:d in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let l=[];for(let d of c){let f=await d.key,p=await d.value;l.push({key:f,value:p,alwaysSet:d.alwaysSet})}return l}).then(l=>rr.mergeObjectSync(o,l)):rr.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:S.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of Le.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of Le.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Rs(this)}partial(t){let r={};for(let o of Le.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of Le.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof An;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return lT(Le.objectKeys(this.shape))}};Br.create=(e,t)=>new Br({shape:()=>e,unknownKeys:"strip",catchall:Qn.create(),typeName:S.ZodObject,...Ne(t)});Br.strictCreate=(e,t)=>new Br({shape:()=>e,unknownKeys:"strict",catchall:Qn.create(),typeName:S.ZodObject,...Ne(t)});Br.lazycreate=(e,t)=>new Br({shape:e,unknownKeys:"strip",catchall:Qn.create(),typeName:S.ZodObject,...Ne(t)});var Ms=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new zr(s.ctx.common.issues));return te(r,{code:F.invalid_union,unionErrors:a}),Se}if(r.common.async)return Promise.all(o.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let i,a=[];for(let c of o){let l={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:l});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new zr(c));return te(r,{code:F.invalid_union,unionErrors:s}),Se}}get options(){return this._def.options}};Ms.create=(e,t)=>new Ms({options:e,typeName:S.ZodUnion,...Ne(t)});var Co=e=>e instanceof Us?Co(e.schema):e instanceof bn?Co(e.innerType()):e instanceof Ls?[e.value]:e instanceof Fs?e.options:e instanceof zs?Le.objectValues(e.enum):e instanceof Bs?Co(e._def.innerType):e instanceof Ds?[void 0]:e instanceof Ps?[null]:e instanceof An?[void 0,...Co(e.unwrap())]:e instanceof No?[null,...Co(e.unwrap())]:e instanceof kf||e instanceof Gs?Co(e.unwrap()):e instanceof Zs?Co(e._def.innerType):[],kx=class e extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.object)return te(r,{code:F.invalid_type,expected:oe.object,received:r.parsedType}),Se;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(te(r,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let a=Co(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(n.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);n.set(s,i)}}return new e({typeName:S.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...Ne(o)})}};function Tx(e,t){let r=To(e),o=To(t);if(e===t)return{valid:!0,data:e};if(r===oe.object&&o===oe.object){let n=Le.objectKeys(t),i=Le.objectKeys(e).filter(s=>n.indexOf(s)!==-1),a={...e,...t};for(let s of i){let c=Tx(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===oe.array&&o===oe.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let a=e[i],s=t[i],c=Tx(a,s);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===oe.date&&o===oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var js=class extends Pe{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,a)=>{if(_x(i)||_x(a))return Se;let s=Tx(i.value,a.value);return s.valid?((Ix(i)||Ix(a))&&r.dirty(),{status:r.value,value:s.data}):(te(o,{code:F.invalid_intersection_types}),Se)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>n(i,a)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};js.create=(e,t,r)=>new js({left:e,right:t,typeName:S.ZodIntersection,...Ne(r)});var $o=class e extends Pe{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==oe.array)return te(o,{code:F.invalid_type,expected:oe.array,received:o.parsedType}),Se;if(o.data.length<this._def.items.length)return te(o,{code:F.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&o.data.length>this._def.items.length&&(te(o,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new nn(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>rr.mergeArray(r,a)):rr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};$o.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $o({items:e,typeName:S.ZodTuple,rest:null,...Ne(t)})};var Cx=class e extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==oe.object)return te(o,{code:F.invalid_type,expected:oe.object,received:o.parsedType}),Se;let n=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)n.push({key:i._parse(new nn(o,s,o.path,s)),value:a._parse(new nn(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?rr.mergeObjectAsync(r,n):rr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof Pe?new e({keyType:t,valueType:r,typeName:S.ZodRecord,...Ne(o)}):new e({keyType:Os.create(),valueType:t,typeName:S.ZodRecord,...Ne(r)})}},Fc=class extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==oe.map)return te(o,{code:F.invalid_type,expected:oe.map,received:o.parsedType}),Se;let n=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],l)=>({key:n._parse(new nn(o,s,o.path,[l,"key"])),value:i._parse(new nn(o,c,o.path,[l,"value"]))}));if(o.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let l=await c.key,d=await c.value;if(l.status==="aborted"||d.status==="aborted")return Se;(l.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(l.value,d.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let l=c.key,d=c.value;if(l.status==="aborted"||d.status==="aborted")return Se;(l.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(l.value,d.value)}return{status:r.value,value:s}}}};Fc.create=(e,t,r)=>new Fc({valueType:t,keyType:e,typeName:S.ZodMap,...Ne(r)});var zc=class e extends Pe{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==oe.set)return te(o,{code:F.invalid_type,expected:oe.set,received:o.parsedType}),Se;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(te(o,{code:F.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(te(o,{code:F.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function a(c){let l=new Set;for(let d of c){if(d.status==="aborted")return Se;d.status==="dirty"&&r.dirty(),l.add(d.value)}return{status:r.value,value:l}}let s=[...o.data.values()].map((c,l)=>i._parse(new nn(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:le.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};zc.create=(e,t)=>new zc({valueType:e,minSize:null,maxSize:null,typeName:S.ZodSet,...Ne(t)});var $x=class e extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.function)return te(r,{code:F.invalid_type,expected:oe.function,received:r.parsedType}),Se;function o(s,c){return Ef({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Nc(),Ti].filter(l=>!!l),issueData:{code:F.invalid_arguments,argumentsError:c}})}function n(s,c){return Ef({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Nc(),Ti].filter(l=>!!l),issueData:{code:F.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof ha){let s=this;return mr(async function(...c){let l=new zr([]),d=await s._def.args.parseAsync(c,i).catch(m=>{throw l.addIssue(o(c,m)),l}),f=await Reflect.apply(a,this,d);return await s._def.returns._def.type.parseAsync(f,i).catch(m=>{throw l.addIssue(n(f,m)),l})})}else{let s=this;return mr(function(...c){let l=s._def.args.safeParse(c,i);if(!l.success)throw new zr([o(c,l.error)]);let d=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(d,i);if(!f.success)throw new zr([n(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:$o.create(t).rest(Ci.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||$o.create([]).rest(Ci.create()),returns:r||Ci.create(),typeName:S.ZodFunction,...Ne(o)})}},Us=class extends Pe{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Us.create=(e,t)=>new Us({getter:e,typeName:S.ZodLazy,...Ne(t)});var Ls=class extends Pe{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return te(r,{received:r.data,code:F.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ls.create=(e,t)=>new Ls({value:e,typeName:S.ZodLiteral,...Ne(t)});function lT(e,t){return new Fs({values:e,typeName:S.ZodEnum,...Ne(t)})}var Fs=class e extends Pe{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return te(r,{expected:Le.joinValues(o),received:r.parsedType,code:F.invalid_type}),Se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return te(r,{received:r.data,code:F.invalid_enum_value,options:o}),Se}return mr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};Fs.create=lT;var zs=class extends Pe{_parse(t){let r=Le.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==oe.string&&o.parsedType!==oe.number){let n=Le.objectValues(r);return te(o,{expected:Le.joinValues(n),received:o.parsedType,code:F.invalid_type}),Se}if(this._cache||(this._cache=new Set(Le.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=Le.objectValues(r);return te(o,{received:o.data,code:F.invalid_enum_value,options:n}),Se}return mr(t.data)}get enum(){return this._def.values}};zs.create=(e,t)=>new zs({values:e,typeName:S.ZodNativeEnum,...Ne(t)});var ha=class extends Pe{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.promise&&r.common.async===!1)return te(r,{code:F.invalid_type,expected:oe.promise,received:r.parsedType}),Se;let o=r.parsedType===oe.promise?r.data:Promise.resolve(r.data);return mr(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ha.create=(e,t)=>new ha({type:e,typeName:S.ZodPromise,...Ne(t)});var bn=class extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===S.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:a=>{te(o,a),a.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let a=n.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return Se;let c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?Se:c.status==="dirty"?Ns(c.value):r.value==="dirty"?Ns(c.value):c});{if(r.value==="aborted")return Se;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?Se:s.status==="dirty"?Ns(s.value):r.value==="dirty"?Ns(s.value):s}}if(n.type==="refinement"){let a=s=>{let c=n.refinement(s,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?Se:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?Se:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(n.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ma(a))return Se;let s=n.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>ma(a)?Promise.resolve(n.transform(a.value,i)).then(s=>({status:r.value,value:s})):Se);Le.assertNever(n)}};bn.create=(e,t,r)=>new bn({schema:e,typeName:S.ZodEffects,effect:t,...Ne(r)});bn.createWithPreprocess=(e,t,r)=>new bn({schema:t,effect:{type:"preprocess",transform:e},typeName:S.ZodEffects,...Ne(r)});var An=class extends Pe{_parse(t){return this._getType(t)===oe.undefined?mr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};An.create=(e,t)=>new An({innerType:e,typeName:S.ZodOptional,...Ne(t)});var No=class extends Pe{_parse(t){return this._getType(t)===oe.null?mr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};No.create=(e,t)=>new No({innerType:e,typeName:S.ZodNullable,...Ne(t)});var Bs=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===oe.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Bs.create=(e,t)=>new Bs({innerType:e,typeName:S.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ne(t)});var Zs=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Rc(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new zr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};Zs.create=(e,t)=>new Zs({innerType:e,typeName:S.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ne(t)});var Bc=class extends Pe{_parse(t){if(this._getType(t)!==oe.nan){let o=this._getOrReturnCtx(t);return te(o,{code:F.invalid_type,expected:oe.nan,received:o.parsedType}),Se}return{status:"valid",value:t.data}}};Bc.create=e=>new Bc({typeName:S.ZodNaN,...Ne(e)});var UK=Symbol("zod_brand"),kf=class extends Pe{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Tf=class e extends Pe{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?Se:i.status==="dirty"?(r.dirty(),Ns(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?Se:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:S.ZodPipeline})}},Gs=class extends Pe{_parse(t){let r=this._def.innerType._parse(t),o=n=>(ma(n)&&(n.value=Object.freeze(n.value)),n);return Rc(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};Gs.create=(e,t)=>new Gs({innerType:e,typeName:S.ZodReadonly,...Ne(t)});var LK={object:Br.lazycreate},S;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(S||(S={}));var FK=Os.create,zK=Oc.create,BK=Bc.create,ZK=Dc.create,GK=Pc.create,VK=Mc.create,HK=jc.create,WK=Ds.create,qK=Ps.create,JK=Uc.create,KK=Ci.create,QK=Qn.create,YK=Lc.create,XK=$i.create,eQ=Br.create,tQ=Br.strictCreate,rQ=Ms.create,nQ=kx.create,oQ=js.create,iQ=$o.create,aQ=Cx.create,sQ=Fc.create,uQ=zc.create,cQ=$x.create,lQ=Us.create,dQ=Ls.create,pQ=Fs.create,fQ=zs.create,mQ=ha.create,hQ=bn.create,gQ=An.create,vQ=No.create,yQ=bn.createWithPreprocess,AQ=Tf.create;var Cf=class extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}};function Nx(e){}function dT(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=Nx,onError:r=Nx,onRetry:o=Nx,onComment:n}=e,i="",a=!0,s,c="",l="";function d(g){let y=a?g.replace(/^\xEF\xBB\xBF/,""):g,[E,I]=Wj(`${i}${y}`);for(let h of E)f(h);i=I,a=!1}function f(g){if(g===""){m();return}if(g.startsWith(":")){n&&n(g.slice(g.startsWith(": ")?2:1));return}let y=g.indexOf(":");if(y!==-1){let E=g.slice(0,y),I=g[y+1]===" "?2:1,h=g.slice(y+I);p(E,h,g);return}p(g,"",g)}function p(g,y,E){switch(g){case"event":l=y;break;case"data":c=`${c}${y}
60
- `;break;case"id":s=y.includes("\0")?void 0:y;break;case"retry":/^\d+$/.test(y)?o(parseInt(y,10)):r(new Cf(`Invalid \`retry\` value: "${y}"`,{type:"invalid-retry",value:y,line:E}));break;default:r(new Cf(`Unknown field "${g.length>20?`${g.slice(0,20)}\u2026`:g}"`,{type:"unknown-field",field:g,value:y,line:E}));break}}function m(){c.length>0&&t({id:s,event:l||void 0,data:c.endsWith(`
61
- `)?c.slice(0,-1):c}),s=void 0,c="",l=""}function v(g={}){i&&g.consume&&f(i),a=!0,s=void 0,c="",l="",i=""}return{feed:d,reset:v}}function Wj(e){let t=[],r="",o=0;for(;o<e.length;){let n=e.indexOf("\r",o),i=e.indexOf(`
62
- `,o),a=-1;if(n!==-1&&i!==-1?a=Math.min(n,i):n!==-1?n===e.length-1?a=-1:a=n:i!==-1&&(a=i),a===-1){r=e.slice(o);break}else{let s=e.slice(o,a);t.push(s),o=a+1,e[o-1]==="\r"&&e[o]===`
63
- `&&o++}}return[t,r]}var Yn=class extends TransformStream{constructor({onError:t,onRetry:r,onComment:o}={}){let n;super({start(i){n=dT({onEvent:a=>{i.enqueue(a)},onError(a){t==="terminate"?i.error(a):typeof t=="function"&&t(a)},onRetry:r,onComment:o})},transform(i){n.feed(i)}})}};function Oo(...e){return e.reduce((t,r)=>({...t,...r??{}}),{})}async function yT(e,t){if(e==null)return Promise.resolve();let r=t?.abortSignal;return new Promise((o,n)=>{if(r?.aborted){n(pT());return}let i=setTimeout(()=>{a(),o()},e),a=()=>{clearTimeout(i),r?.removeEventListener("abort",s)},s=()=>{a(),n(pT())};r?.addEventListener("abort",s)})}function pT(){return new DOMException("Delay was aborted","AbortError")}var va=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){return this._promise?this._promise:(this._promise=new Promise((e,t)=>{this.status.type==="resolved"?e(this.status.value):this.status.type==="rejected"&&t(this.status.error),this._resolve=e,this._reject=t}),this._promise)}resolve(e){var t;this.status={type:"resolved",value:e},this._promise&&((t=this._resolve)==null||t.call(this,e))}reject(e){var t;this.status={type:"rejected",error:e},this._promise&&((t=this._reject)==null||t.call(this,e))}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function Zc(e){return Object.fromEntries([...e.headers])}var{btoa:qj,atob:Jj}=globalThis;function Vs(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=Jj(t);return Uint8Array.from(r,o=>o.codePointAt(0))}function Do(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCodePoint(e[r]);return qj(t)}var AT="AI_DownloadError",bT=`vercel.ai.error.${AT}`,Kj=Symbol.for(bT),fT,mT,$f=class extends(mT=W,fT=Kj,mT){constructor({url:e,statusCode:t,statusText:r,cause:o,message:n=o==null?`Failed to download ${e}: ${t} ${r}`:`Failed to download ${e}: ${o}`}){super({name:AT,message:n,cause:o}),this[fT]=!0,this.url=e,this.statusCode=t,this.statusText=r}static isInstance(e){return W.hasMarker(e,bT)}};var Po=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:o="-"}={})=>{let n=()=>{let i=r.length,a=new Array(t);for(let s=0;s<t;s++)a[s]=r[Math.random()*i|0];return a.join("")};if(e==null)return n;if(r.includes(o))throw new Ld({argument:"separator",message:`The separator "${o}" must not be part of the alphabet "${r}".`});return()=>`${e}${o}${n()}`},DQ=Po();function Hs(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}function Ro(e){return(e instanceof Error||e instanceof DOMException)&&(e.name==="AbortError"||e.name==="ResponseAborted"||e.name==="TimeoutError")}var Qj=["fetch failed","failed to fetch"],Yj=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function Xj(e){if(!(e instanceof Error))return!1;let t=e.code;return!!(typeof t=="string"&&Yj.includes(t))}function xT({error:e,url:t,requestBodyValues:r}){if(Ro(e))return e;if(e instanceof TypeError&&Qj.includes(e.message.toLowerCase())){let o=e.cause;if(o!=null)return new ht({message:`Cannot connect to API: ${o.message}`,cause:o,url:t,requestBodyValues:r,isRetryable:!0})}return Xj(e)?new ht({message:`Cannot connect to API: ${e.message}`,cause:e,url:t,requestBodyValues:r,isRetryable:!0}):e}function Nf(e=globalThis){var t,r,o;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(o=(r=e.process)==null?void 0:r.versions)!=null&&o.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function e8(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((r,o)=>{t[o.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(let[r,o]of e)o!=null&&(t[r.toLowerCase()]=o)}return t}function Mo(e,...t){let r=new Headers(e8(e)),o=r.get("user-agent")||"";return r.set("user-agent",[o,...t].filter(Boolean).join(" ")),Object.fromEntries(r.entries())}var wT="4.0.14",t8=()=>globalThis.fetch,Mx=async({url:e,headers:t={},successfulResponseHandler:r,failedResponseHandler:o,abortSignal:n,fetch:i=t8()})=>{try{let a=await i(e,{method:"GET",headers:Mo(t,`ai-sdk/provider-utils/${wT}`,Nf()),signal:n}),s=Zc(a);if(!a.ok){let c;try{c=await o({response:a,url:e,requestBodyValues:{}})}catch(l){throw Ro(l)||ht.isInstance(l)?l:new ht({message:"Failed to process error response",cause:l,statusCode:a.status,url:e,responseHeaders:s,requestBodyValues:{}})}throw c.value}try{return await r({response:a,url:e,requestBodyValues:{}})}catch(c){throw c instanceof Error&&(Ro(c)||ht.isInstance(c))?c:new ht({message:"Failed to process successful response",cause:c,statusCode:a.status,url:e,responseHeaders:s,requestBodyValues:{}})}}catch(a){throw xT({error:a,url:e,requestBodyValues:{}})}};function ST({mediaType:e,url:t,supportedUrls:r}){return t=t.toLowerCase(),e=e.toLowerCase(),Object.entries(r).map(([o,n])=>{let i=o.toLowerCase();return i==="*"||i==="*/*"?{mediaTypePrefix:"",regexes:n}:{mediaTypePrefix:i.replace(/\*/,""),regexes:n}}).filter(({mediaTypePrefix:o})=>e.startsWith(o)).flatMap(({regexes:o})=>o).some(o=>o.test(t))}function Gc({settingValue:e,environmentVariableName:t}){if(typeof e=="string")return e;if(!(e!=null||typeof process>"u")&&(e=process.env[t],!(e==null||typeof e!="string")))return e}var r8=/"__proto__"\s*:/,n8=/"constructor"\s*:/;function hT(e){let t=JSON.parse(e);return t===null||typeof t!="object"||r8.test(e)===!1&&n8.test(e)===!1?t:o8(t)}function o8(e){let t=[e];for(;t.length;){let r=t;t=[];for(let o of r){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let n in o){let i=o[n];i&&typeof i=="object"&&t.push(i)}}}return e}function _T(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return hT(e)}try{return hT(e)}finally{Error.stackTraceLimit=t}}function jx(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;let{properties:r}=e;if(r!=null)for(let o of Object.keys(r))r[o]=ga(r[o])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(ga):ga(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(ga)),e.allOf!=null&&(e.allOf=e.allOf.map(ga)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(ga));let{definitions:t}=e;if(t!=null)for(let r of Object.keys(t))t[r]=ga(t[r]);return e}function ga(e){return typeof e=="boolean"?e:jx(e)}var i8=Symbol("Let zodToJsonSchema decide on which parser to use"),gT={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},a8=e=>typeof e=="string"?{...gT,name:e}:{...gT,...e};function Zr(){return{}}function s8(e,t){var r,o,n;let i={type:"array"};return(r=e.type)!=null&&r._def&&((n=(o=e.type)==null?void 0:o._def)==null?void 0:n.typeName)!==S.ZodAny&&(i.items=Ke(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}function u8(e){let t={type:"integer",format:"int64"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function c8(){return{type:"boolean"}}function IT(e,t){return Ke(e.type._def,t)}var l8=(e,t)=>Ke(e.innerType._def,t);function ET(e,t,r){let o=r??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>ET(e,t,n))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return d8(e)}}var d8=e=>{let t={type:"integer",format:"unix-time"};for(let r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value;break}return t};function p8(e,t){return{...Ke(e.innerType._def,t),default:e.defaultValue()}}function f8(e,t){return t.effectStrategy==="input"?Ke(e.schema._def,t):Zr()}function m8(e){return{type:"string",enum:Array.from(e.values)}}var h8=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function g8(e,t){let r=[Ke(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Ke(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(n=>!!n),o=[];return r.forEach(n=>{if(h8(n))o.push(...n.allOf);else{let i=n;if("additionalProperties"in n&&n.additionalProperties===!1){let{additionalProperties:a,...s}=n;i=s}o.push(i)}}),o.length?{allOf:o}:void 0}function v8(e){let t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var Rx=void 0,xn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Rx===void 0&&(Rx=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Rx),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function kT(e,t){let r={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"email":switch(t.emailStrategy){case"format:email":wn(r,"email",o.message,t);break;case"format:idn-email":wn(r,"idn-email",o.message,t);break;case"pattern:zod":hr(r,xn.email,o.message,t);break}break;case"url":wn(r,"uri",o.message,t);break;case"uuid":wn(r,"uuid",o.message,t);break;case"regex":hr(r,o.regex,o.message,t);break;case"cuid":hr(r,xn.cuid,o.message,t);break;case"cuid2":hr(r,xn.cuid2,o.message,t);break;case"startsWith":hr(r,RegExp(`^${Ox(o.value,t)}`),o.message,t);break;case"endsWith":hr(r,RegExp(`${Ox(o.value,t)}$`),o.message,t);break;case"datetime":wn(r,"date-time",o.message,t);break;case"date":wn(r,"date",o.message,t);break;case"time":wn(r,"time",o.message,t);break;case"duration":wn(r,"duration",o.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"includes":{hr(r,RegExp(Ox(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&wn(r,"ipv4",o.message,t),o.version!=="v4"&&wn(r,"ipv6",o.message,t);break}case"base64url":hr(r,xn.base64url,o.message,t);break;case"jwt":hr(r,xn.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&hr(r,xn.ipv4Cidr,o.message,t),o.version!=="v4"&&hr(r,xn.ipv6Cidr,o.message,t);break}case"emoji":hr(r,xn.emoji(),o.message,t);break;case"ulid":{hr(r,xn.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{wn(r,"binary",o.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{hr(r,xn.base64,o.message,t);break}}break}case"nanoid":hr(r,xn.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Ox(e,t){return t.patternStrategy==="escape"?A8(e):e}var y8=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function A8(e){let t="";for(let r=0;r<e.length;r++)y8.has(e[r])||(t+="\\"),t+=e[r];return t}function wn(e,t,r,o){var n;e.format||(n=e.anyOf)!=null&&n.some(i=>i.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...r&&o.errorMessages&&{errorMessage:{format:r}}})):e.format=t}function hr(e,t,r,o){var n;e.pattern||(n=e.allOf)!=null&&n.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:vT(t,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=vT(t,o)}function vT(e,t){var r;if(!t.applyRegexFlags||!e.flags)return e.source;let o={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=o.i?e.source.toLowerCase():e.source,i="",a=!1,s=!1,c=!1;for(let l=0;l<n.length;l++){if(a){i+=n[l],a=!1;continue}if(o.i){if(s){if(n[l].match(/[a-z]/)){c?(i+=n[l],i+=`${n[l-2]}-${n[l]}`.toUpperCase(),c=!1):n[l+1]==="-"&&((r=n[l+2])!=null&&r.match(/[a-z]/))?(i+=n[l],c=!0):i+=`${n[l]}${n[l].toUpperCase()}`;continue}}else if(n[l].match(/[a-z]/)){i+=`[${n[l]}${n[l].toUpperCase()}]`;continue}}if(o.m){if(n[l]==="^"){i+=`(^|(?<=[\r
64
- ]))`;continue}else if(n[l]==="$"){i+=`($|(?=[\r
65
- ]))`;continue}}if(o.s&&n[l]==="."){i+=s?`${n[l]}\r
66
- `:`[${n[l]}\r
67
- ]`;continue}i+=n[l],n[l]==="\\"?a=!0:s&&n[l]==="]"?s=!1:!s&&n[l]==="["&&(s=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function TT(e,t){var r,o,n,i,a,s;let c={type:"object",additionalProperties:(r=Ke(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((o=e.keyType)==null?void 0:o._def.typeName)===S.ZodString&&((n=e.keyType._def.checks)!=null&&n.length)){let{type:l,...d}=kT(e.keyType._def,t);return{...c,propertyNames:d}}else{if(((i=e.keyType)==null?void 0:i._def.typeName)===S.ZodEnum)return{...c,propertyNames:{enum:e.keyType._def.values}};if(((a=e.keyType)==null?void 0:a._def.typeName)===S.ZodBranded&&e.keyType._def.type._def.typeName===S.ZodString&&((s=e.keyType._def.type._def.checks)!=null&&s.length)){let{type:l,...d}=IT(e.keyType._def,t);return{...c,propertyNames:d}}}return c}function b8(e,t){if(t.mapStrategy==="record")return TT(e,t);let r=Ke(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Zr(),o=Ke(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Zr();return{type:"array",maxItems:125,items:{type:"array",items:[r,o],minItems:2,maxItems:2}}}function x8(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function w8(){return{not:Zr()}}function S8(){return{type:"null"}}var Dx={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function _8(e,t){let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in Dx&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let a=Dx[i._def.typeName];return a&&!n.includes(a)?[...n,a]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((n,i)=>{let a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...n,a];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(o.length===r.length){let n=o.filter((i,a,s)=>s.indexOf(i)===a);return{type:n.length>1?n:n[0],enum:r.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return I8(e,t)}var I8=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>Ke(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function E8(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Dx[e.innerType._def.typeName],"null"]};let r=Ke(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function k8(e){let t={type:"number"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function T8(e,t){let r={type:"object",properties:{}},o=[],n=e.shape();for(let a in n){let s=n[a];if(s===void 0||s._def===void 0)continue;let c=$8(s),l=Ke(s._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});l!==void 0&&(r.properties[a]=l,c||o.push(a))}o.length&&(r.required=o);let i=C8(e,t);return i!==void 0&&(r.additionalProperties=i),r}function C8(e,t){if(e.catchall._def.typeName!=="ZodNever")return Ke(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function $8(e){try{return e.isOptional()}catch{return!0}}var N8=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Ke(e.innerType._def,t);let o=Ke(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return o?{anyOf:[{not:Zr()},o]}:Zr()},R8=(e,t)=>{if(t.pipeStrategy==="input")return Ke(e.in._def,t);if(t.pipeStrategy==="output")return Ke(e.out._def,t);let r=Ke(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=Ke(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function O8(e,t){return Ke(e.type._def,t)}function D8(e,t){let o={type:"array",uniqueItems:!0,items:Ke(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}function P8(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>Ke(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:Ke(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>Ke(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function M8(){return{not:Zr()}}function j8(){return Zr()}var U8=(e,t)=>Ke(e.innerType._def,t),L8=(e,t,r)=>{switch(t){case S.ZodString:return kT(e,r);case S.ZodNumber:return k8(e);case S.ZodObject:return T8(e,r);case S.ZodBigInt:return u8(e);case S.ZodBoolean:return c8();case S.ZodDate:return ET(e,r);case S.ZodUndefined:return M8();case S.ZodNull:return S8();case S.ZodArray:return s8(e,r);case S.ZodUnion:case S.ZodDiscriminatedUnion:return _8(e,r);case S.ZodIntersection:return g8(e,r);case S.ZodTuple:return P8(e,r);case S.ZodRecord:return TT(e,r);case S.ZodLiteral:return v8(e);case S.ZodEnum:return m8(e);case S.ZodNativeEnum:return x8(e);case S.ZodNullable:return E8(e,r);case S.ZodOptional:return N8(e,r);case S.ZodMap:return b8(e,r);case S.ZodSet:return D8(e,r);case S.ZodLazy:return()=>e.getter()._def;case S.ZodPromise:return O8(e,r);case S.ZodNaN:case S.ZodNever:return w8();case S.ZodEffects:return f8(e,r);case S.ZodAny:return Zr();case S.ZodUnknown:return j8();case S.ZodDefault:return p8(e,r);case S.ZodBranded:return IT(e,r);case S.ZodReadonly:return U8(e,r);case S.ZodCatch:return l8(e,r);case S.ZodPipeline:return R8(e,r);case S.ZodFunction:case S.ZodVoid:case S.ZodSymbol:return;default:return(o=>{})(t)}},F8=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Ke(e,t,r=!1){var o;let n=t.seen.get(e);if(t.override){let c=(o=t.override)==null?void 0:o.call(t,e,t,n,r);if(c!==i8)return c}if(n&&!r){let c=z8(n,t);if(c!==void 0)return c}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=L8(e,e.typeName,t),s=typeof a=="function"?Ke(a(),t):a;if(s&&B8(e,t,s),t.postProcess){let c=t.postProcess(s,e,t);return i.jsonSchema=s,c}return i.jsonSchema=s,s}var z8=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:F8(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,o)=>t.currentPath[o]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Zr()):t.$refStrategy==="seen"?Zr():void 0}},B8=(e,t,r)=>(e.description&&(r.description=e.description),r),Z8=e=>{let t=a8(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}},G8=(e,t)=>{var r;let o=Z8(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[d,f])=>{var p;return{...l,[d]:(p=Ke(f._def,{...o,currentPath:[...o.basePath,o.definitionPath,d]},!0))!=null?p:Zr()}},{}):void 0,i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,a=(r=Ke(e._def,i===void 0?o:{...o,currentPath:[...o.basePath,o.definitionPath,i]},!1))!=null?r:Zr(),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(a.title=s);let c=i===void 0?n?{...a,[o.definitionPath]:n}:a:{$ref:[...o.$refStrategy==="relative"?[]:o.basePath,o.definitionPath,i].join("/"),[o.definitionPath]:{...n,[i]:a}};return c.$schema="http://json-schema.org/draft-07/schema#",c},Px=Symbol.for("vercel.ai.schema");function St(e){let t;return()=>(t==null&&(t=e()),t)}function Rf(e,{validate:t}={}){return{[Px]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function V8(e){return typeof e=="object"&&e!==null&&Px in e&&e[Px]===!0&&"jsonSchema"in e&&"validate"in e}function jo(e){return e==null?Rf({properties:{},additionalProperties:!1}):V8(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?vt(e):H8(e):e()}function H8(e){return Rf(()=>jx(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{let r=await e["~standard"].validate(t);return"value"in r?{success:!0,value:r.value}:{success:!1,error:new qt({value:t,cause:r.issues})}}})}function W8(e,t){var r;let o=(r=t?.useReferences)!=null?r:!1;return Rf(()=>G8(e,{$refStrategy:o?"root":"none"}),{validate:async n=>{let i=await e.safeParseAsync(n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function q8(e,t){var r;let o=(r=t?.useReferences)!=null?r:!1;return Rf(()=>jx(ki(e,{target:"draft-7",io:"input",reused:o?"ref":"inline"})),{validate:async n=>{let i=await da(e,n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function J8(e){return"_zod"in e}function vt(e,t){return J8(e)?q8(e,t):W8(e,t)}async function Vc({value:e,schema:t,context:r}){let o=await gr({value:e,schema:t,context:r});if(!o.success)throw qt.wrap({value:e,cause:o.error,context:r});return o.value}async function gr({value:e,schema:t,context:r}){let o=jo(t);try{if(o.validate==null)return{success:!0,value:e,rawValue:e};let n=await o.validate(e);return n.success?{success:!0,value:n.value,rawValue:e}:{success:!1,error:qt.wrap({value:e,cause:n.error,context:r}),rawValue:e}}catch(n){return{success:!1,error:qt.wrap({value:e,cause:n,context:r}),rawValue:e}}}async function K8({text:e,schema:t}){try{let r=_T(e);return t==null?r:Vc({value:r,schema:t})}catch(r){throw gi.isInstance(r)||qt.isInstance(r)?r:new gi({text:e,cause:r})}}async function Cr({text:e,schema:t}){try{let r=_T(e);return t==null?{success:!0,value:r,rawValue:r}:await gr({value:r,schema:t})}catch(r){return{success:!1,error:gi.isInstance(r)?r:new gi({text:e,cause:r}),rawValue:void 0}}}function Q8({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Yn).pipeThrough(new TransformStream({async transform({data:r},o){r!=="[DONE]"&&o.enqueue(await Cr({text:r,schema:t}))}}))}var Y8=()=>globalThis.fetch,Uo=async({url:e,headers:t,body:r,failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:a})=>X8({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(r),values:r},failedResponseHandler:o,successfulResponseHandler:n,abortSignal:i,fetch:a});var X8=async({url:e,headers:t={},body:r,successfulResponseHandler:o,failedResponseHandler:n,abortSignal:i,fetch:a=Y8()})=>{try{let s=await a(e,{method:"POST",headers:Mo(t,`ai-sdk/provider-utils/${wT}`,Nf()),body:r.content,signal:i}),c=Zc(s);if(!s.ok){let l;try{l=await n({response:s,url:e,requestBodyValues:r.values})}catch(d){throw Ro(d)||ht.isInstance(d)?d:new ht({message:"Failed to process error response",cause:d,statusCode:s.status,url:e,responseHeaders:c,requestBodyValues:r.values})}throw l.value}try{return await o({response:s,url:e,requestBodyValues:r.values})}catch(l){throw l instanceof Error&&(Ro(l)||ht.isInstance(l))?l:new ht({message:"Failed to process successful response",cause:l,statusCode:s.status,url:e,responseHeaders:c,requestBodyValues:r.values})}}catch(s){throw xT({error:s,url:e,requestBodyValues:r.values})}};function Of({id:e,inputSchema:t,outputSchema:r,supportsDeferredResults:o}){return({execute:n,needsApproval:i,toModelOutput:a,onInputStart:s,onInputDelta:c,onInputAvailable:l,...d})=>({type:"provider",id:e,args:d,inputSchema:t,outputSchema:r,execute:n,needsApproval:i,toModelOutput:a,onInputStart:s,onInputDelta:c,onInputAvailable:l,supportsDeferredResults:o})}async function It(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var on=({errorSchema:e,errorToMessage:t,isRetryable:r})=>async({response:o,url:n,requestBodyValues:i})=>{let a=await o.text(),s=Zc(o);if(a.trim()==="")return{responseHeaders:s,value:new ht({message:o.statusText,url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:s,responseBody:a,isRetryable:r?.(o)})};try{let c=await K8({text:a,schema:e});return{responseHeaders:s,value:new ht({message:t(c),url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:s,responseBody:a,data:c,isRetryable:r?.(o,c)})}}catch{return{responseHeaders:s,value:new ht({message:o.statusText,url:n,requestBodyValues:i,statusCode:o.status,responseHeaders:s,responseBody:a,isRetryable:r?.(o)})}}},CT=e=>async({response:t})=>{let r=Zc(t);if(t.body==null)throw new H1({});return{responseHeaders:r,value:Q8({stream:t.body,schema:e})}},Sn=e=>async({response:t,url:r,requestBodyValues:o})=>{let n=await t.text(),i=await Cr({text:n,schema:e}),a=Zc(t);if(!i.success)throw new ht({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:a,responseBody:n,url:r,requestBodyValues:o});return{responseHeaders:a,value:i.value,rawValue:i.rawValue}};function $T(e){return e?.replace(/\/$/,"")}function eU(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}async function*NT({execute:e,input:t,options:r}){let o=e(t,r);if(eU(o)){let n;for await(let i of o)n=i,yield{type:"preliminary",output:i};yield{type:"final",output:n}}else yield{type:"final",output:await o}}var YC=Ut(Xx(),1),XC=Ut(Xx(),1);var NL="vercel.ai.gateway.error",ew=Symbol.for(NL),pC,fC,vr=class zC extends(fC=Error,pC=ew,fC){constructor({message:t,statusCode:r=500,cause:o,generationId:n}){super(n?`${t} [${n}]`:t),this[pC]=!0,this.statusCode=r,this.cause=o,this.generationId=n}static isInstance(t){return zC.hasMarker(t)}static hasMarker(t){return typeof t=="object"&&t!==null&&ew in t&&t[ew]===!0}},BC="GatewayAuthenticationError",RL=`vercel.ai.gateway.error.${BC}`,mC=Symbol.for(RL),hC,gC,Lf=class ZC extends(gC=vr,hC=mC,gC){constructor({message:t="Authentication failed",statusCode:r=401,cause:o,generationId:n}={}){super({message:t,statusCode:r,cause:o,generationId:n}),this[hC]=!0,this.name=BC,this.type="authentication_error"}static isInstance(t){return vr.hasMarker(t)&&mC in t}static createContextualError({apiKeyProvided:t,oidcTokenProvided:r,message:o="Authentication failed",statusCode:n=401,cause:i,generationId:a}){let s;return t?s=`AI Gateway authentication failed: Invalid API key.
68
-
69
- Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
70
-
71
- Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.`:r?s=`AI Gateway authentication failed: Invalid OIDC token.
72
-
73
- Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.
74
-
75
- Alternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys`:s=`AI Gateway authentication failed: No authentication provided.
76
-
77
- Option 1 - API key:
78
- Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
79
- Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.
80
-
81
- Option 2 - OIDC token:
82
- Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`,new ZC({message:s,statusCode:n,cause:i,generationId:a})}},GC="GatewayInvalidRequestError",OL=`vercel.ai.gateway.error.${GC}`,vC=Symbol.for(OL),yC,AC,DL=class extends(AC=vr,yC=vC,AC){constructor({message:e="Invalid request",statusCode:t=400,cause:r,generationId:o}={}){super({message:e,statusCode:t,cause:r,generationId:o}),this[yC]=!0,this.name=GC,this.type="invalid_request_error"}static isInstance(e){return vr.hasMarker(e)&&vC in e}},VC="GatewayRateLimitError",PL=`vercel.ai.gateway.error.${VC}`,bC=Symbol.for(PL),xC,wC,ML=class extends(wC=vr,xC=bC,wC){constructor({message:e="Rate limit exceeded",statusCode:t=429,cause:r,generationId:o}={}){super({message:e,statusCode:t,cause:r,generationId:o}),this[xC]=!0,this.name=VC,this.type="rate_limit_exceeded"}static isInstance(e){return vr.hasMarker(e)&&bC in e}},HC="GatewayModelNotFoundError",jL=`vercel.ai.gateway.error.${HC}`,SC=Symbol.for(jL),UL=St(()=>vt(u.object({modelId:u.string()}))),_C,IC,LL=class extends(IC=vr,_C=SC,IC){constructor({message:e="Model not found",statusCode:t=404,modelId:r,cause:o,generationId:n}={}){super({message:e,statusCode:t,cause:o,generationId:n}),this[_C]=!0,this.name=HC,this.type="model_not_found",this.modelId=r}static isInstance(e){return vr.hasMarker(e)&&SC in e}},WC="GatewayInternalServerError",FL=`vercel.ai.gateway.error.${WC}`,EC=Symbol.for(FL),kC,TC,CC=class extends(TC=vr,kC=EC,TC){constructor({message:e="Internal server error",statusCode:t=500,cause:r,generationId:o}={}){super({message:e,statusCode:t,cause:r,generationId:o}),this[kC]=!0,this.name=WC,this.type="internal_server_error"}static isInstance(e){return vr.hasMarker(e)&&EC in e}},qC="GatewayResponseError",zL=`vercel.ai.gateway.error.${qC}`,$C=Symbol.for(zL),NC,RC,BL=class extends(RC=vr,NC=$C,RC){constructor({message:e="Invalid response from Gateway",statusCode:t=502,response:r,validationError:o,cause:n,generationId:i}={}){super({message:e,statusCode:t,cause:n,generationId:i}),this[NC]=!0,this.name=qC,this.type="response_error",this.response=r,this.validationError=o}static isInstance(e){return vr.hasMarker(e)&&$C in e}};async function OC({response:e,statusCode:t,defaultMessage:r="Gateway request failed",cause:o,authMethod:n}){var i;let a=await gr({value:e,schema:ZL});if(!a.success){let f=typeof e=="object"&&e!==null&&"generationId"in e?e.generationId:void 0;return new BL({message:`Invalid error response format: ${r}`,statusCode:t,response:e,validationError:a.error,cause:o,generationId:f})}let s=a.value,c=s.error.type,l=s.error.message,d=(i=s.generationId)!=null?i:void 0;switch(c){case"authentication_error":return Lf.createContextualError({apiKeyProvided:n==="api-key",oidcTokenProvided:n==="oidc",statusCode:t,cause:o,generationId:d});case"invalid_request_error":return new DL({message:l,statusCode:t,cause:o,generationId:d});case"rate_limit_exceeded":return new ML({message:l,statusCode:t,cause:o,generationId:d});case"model_not_found":{let f=await gr({value:s.error.param,schema:UL});return new LL({message:l,statusCode:t,modelId:f.success?f.value.modelId:void 0,cause:o,generationId:d})}case"internal_server_error":return new CC({message:l,statusCode:t,cause:o,generationId:d});default:return new CC({message:l,statusCode:t,cause:o,generationId:d})}}var ZL=St(()=>vt(u.object({error:u.object({message:u.string(),type:u.string().nullish(),param:u.unknown().nullish(),code:u.union([u.string(),u.number()]).nullish()}),generationId:u.string().nullish()}))),JC="GatewayTimeoutError",GL=`vercel.ai.gateway.error.${JC}`,DC=Symbol.for(GL),PC,MC,jC=class KC extends(MC=vr,PC=DC,MC){constructor({message:t="Request timed out",statusCode:r=408,cause:o,generationId:n}={}){super({message:t,statusCode:r,cause:o,generationId:n}),this[PC]=!0,this.name=JC,this.type="timeout_error"}static isInstance(t){return vr.hasMarker(t)&&DC in t}static createTimeoutError({originalMessage:t,statusCode:r=408,cause:o,generationId:n}){let i=`Gateway request timed out: ${t}
83
-
84
- This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new KC({message:i,statusCode:r,cause:o,generationId:n})}};function UC(e){if(!(e instanceof Error))return!1;let t=e.code;return typeof t=="string"?["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(t):!1}async function Lo(e,t){var r;return vr.isInstance(e)?e:UC(e)?jC.createTimeoutError({originalMessage:e instanceof Error?e.message:"Unknown error",cause:e}):ht.isInstance(e)?e.cause&&UC(e.cause)?jC.createTimeoutError({originalMessage:e.message,cause:e}):await OC({response:VL(e),statusCode:(r=e.statusCode)!=null?r:500,defaultMessage:"Gateway request failed",cause:e,authMethod:t}):await OC({response:{},statusCode:500,defaultMessage:e instanceof Error?`Gateway request failed: ${e.message}`:"Unknown Gateway error",cause:e,authMethod:t})}function VL(e){if(e.data!==void 0)return e.data;if(e.responseBody!=null)try{return JSON.parse(e.responseBody)}catch{return e.responseBody}return{}}var QC="ai-gateway-auth-method";async function ba(e){let t=await gr({value:e[QC],schema:HL});return t.success?t.value:void 0}var HL=St(()=>vt(u.union([u.literal("api-key"),u.literal("oidc")]))),LC=class{constructor(e){this.config=e}async getAvailableModels(){try{let{value:e}=await Mx({url:`${this.config.baseURL}/config`,headers:await It(this.config.headers()),successfulResponseHandler:Sn(WL),failedResponseHandler:on({errorSchema:u.any(),errorToMessage:t=>t}),fetch:this.config.fetch});return e}catch(e){throw await Lo(e)}}async getCredits(){try{let e=new URL(this.config.baseURL),{value:t}=await Mx({url:`${e.origin}/v1/credits`,headers:await It(this.config.headers()),successfulResponseHandler:Sn(qL),failedResponseHandler:on({errorSchema:u.any(),errorToMessage:r=>r}),fetch:this.config.fetch});return t}catch(e){throw await Lo(e)}}},WL=St(()=>vt(u.object({models:u.array(u.object({id:u.string(),name:u.string(),description:u.string().nullish(),pricing:u.object({input:u.string(),output:u.string(),input_cache_read:u.string().nullish(),input_cache_write:u.string().nullish()}).transform(({input:e,output:t,input_cache_read:r,input_cache_write:o})=>({input:e,output:t,...r?{cachedInputTokens:r}:{},...o?{cacheCreationInputTokens:o}:{}})).nullish(),specification:u.object({specificationVersion:u.literal("v3"),provider:u.string(),modelId:u.string()}),modelType:u.enum(["embedding","image","language","video"]).nullish()}))}))),qL=St(()=>vt(u.object({balance:u.string(),total_used:u.string()}).transform(({balance:e,total_used:t})=>({balance:e,totalUsed:t})))),JL=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs(e){let{abortSignal:t,...r}=e;return{args:this.maybeEncodeFileParts(r),warnings:[]}}async doGenerate(e){let{args:t,warnings:r}=await this.getArgs(e),{abortSignal:o}=e,n=await It(this.config.headers());try{let{responseHeaders:i,value:a,rawValue:s}=await Uo({url:this.getUrl(),headers:Oo(n,e.headers,this.getModelConfigHeaders(this.modelId,!1),await It(this.config.o11yHeaders)),body:t,successfulResponseHandler:Sn(u.any()),failedResponseHandler:on({errorSchema:u.any(),errorToMessage:c=>c}),...o&&{abortSignal:o},fetch:this.config.fetch});return{...a,request:{body:t},response:{headers:i,body:s},warnings:r}}catch(i){throw await Lo(i,await ba(n))}}async doStream(e){let{args:t,warnings:r}=await this.getArgs(e),{abortSignal:o}=e,n=await It(this.config.headers());try{let{value:i,responseHeaders:a}=await Uo({url:this.getUrl(),headers:Oo(n,e.headers,this.getModelConfigHeaders(this.modelId,!0),await It(this.config.o11yHeaders)),body:t,successfulResponseHandler:CT(u.any()),failedResponseHandler:on({errorSchema:u.any(),errorToMessage:s=>s}),...o&&{abortSignal:o},fetch:this.config.fetch});return{stream:i.pipeThrough(new TransformStream({start(s){r.length>0&&s.enqueue({type:"stream-start",warnings:r})},transform(s,c){if(s.success){let l=s.value;if(l.type==="raw"&&!e.includeRawChunks)return;l.type==="response-metadata"&&l.timestamp&&typeof l.timestamp=="string"&&(l.timestamp=new Date(l.timestamp)),c.enqueue(l)}else c.error(s.error)}})),request:{body:t},response:{headers:a}}}catch(i){throw await Lo(i,await ba(n))}}isFilePart(e){return e&&typeof e=="object"&&"type"in e&&e.type==="file"}maybeEncodeFileParts(e){for(let t of e.prompt)for(let r of t.content)if(this.isFilePart(r)){let o=r;if(o.data instanceof Uint8Array){let n=Uint8Array.from(o.data),i=Buffer.from(n).toString("base64");o.data=new URL(`data:${o.mediaType||"application/octet-stream"};base64,${i}`)}}return e}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders(e,t){return{"ai-language-model-specification-version":"3","ai-language-model-id":e,"ai-language-model-streaming":String(t)}}},KL=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:r,providerOptions:o}){var n;let i=await It(this.config.headers());try{let{responseHeaders:a,value:s,rawValue:c}=await Uo({url:this.getUrl(),headers:Oo(i,t??{},this.getModelConfigHeaders(),await It(this.config.o11yHeaders)),body:{values:e,...o?{providerOptions:o}:{}},successfulResponseHandler:Sn(QL),failedResponseHandler:on({errorSchema:u.any(),errorToMessage:l=>l}),...r&&{abortSignal:r},fetch:this.config.fetch});return{embeddings:s.embeddings,usage:(n=s.usage)!=null?n:void 0,providerMetadata:s.providerMetadata,response:{headers:a,body:c},warnings:[]}}catch(a){throw await Lo(a,await ba(i))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},QL=St(()=>vt(u.object({embeddings:u.array(u.array(u.number())),usage:u.object({tokens:u.number()}).nullish(),providerMetadata:u.record(u.string(),u.record(u.string(),u.unknown())).optional()}))),YL=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,size:r,aspectRatio:o,seed:n,files:i,mask:a,providerOptions:s,headers:c,abortSignal:l}){var d,f,p,m;let v=await It(this.config.headers());try{let{responseHeaders:g,value:y,rawValue:E}=await Uo({url:this.getUrl(),headers:Oo(v,c??{},this.getModelConfigHeaders(),await It(this.config.o11yHeaders)),body:{prompt:e,n:t,...r&&{size:r},...o&&{aspectRatio:o},...n&&{seed:n},...s&&{providerOptions:s},...i&&{files:i.map(I=>FC(I))},...a&&{mask:FC(a)}},successfulResponseHandler:Sn(rF),failedResponseHandler:on({errorSchema:u.any(),errorToMessage:I=>I}),...l&&{abortSignal:l},fetch:this.config.fetch});return{images:y.images,warnings:(d=y.warnings)!=null?d:[],providerMetadata:y.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:g},...y.usage!=null&&{usage:{inputTokens:(f=y.usage.inputTokens)!=null?f:void 0,outputTokens:(p=y.usage.outputTokens)!=null?p:void 0,totalTokens:(m=y.usage.totalTokens)!=null?m:void 0}}}}catch(g){throw Lo(g,await ba(v))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function FC(e){return e.type==="file"&&e.data instanceof Uint8Array?{...e,data:Do(e.data)}:e}var XL=u.object({images:u.array(u.unknown()).optional()}).catchall(u.unknown()),eF=u.discriminatedUnion("type",[u.object({type:u.literal("unsupported"),feature:u.string(),details:u.string().optional()}),u.object({type:u.literal("compatibility"),feature:u.string(),details:u.string().optional()}),u.object({type:u.literal("other"),message:u.string()})]),tF=u.object({inputTokens:u.number().nullish(),outputTokens:u.number().nullish(),totalTokens:u.number().nullish()}),rF=u.object({images:u.array(u.string()),warnings:u.array(eF).optional(),providerMetadata:u.record(u.string(),XL).optional(),usage:tF.optional()}),nF=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,aspectRatio:r,resolution:o,duration:n,fps:i,seed:a,image:s,providerOptions:c,headers:l,abortSignal:d}){var f;let p=await It(this.config.headers());try{let{responseHeaders:m,value:v,rawValue:g}=await Uo({url:this.getUrl(),headers:Oo(p,l??{},this.getModelConfigHeaders(),await It(this.config.o11yHeaders)),body:{prompt:e,n:t,...r&&{aspectRatio:r},...o&&{resolution:o},...n&&{duration:n},...i&&{fps:i},...a&&{seed:a},...c&&{providerOptions:c},...s&&{image:oF(s)}},successfulResponseHandler:Sn(sF),failedResponseHandler:on({errorSchema:u.any(),errorToMessage:y=>y}),...d&&{abortSignal:d},fetch:this.config.fetch});return{videos:v.videos,warnings:(f=v.warnings)!=null?f:[],providerMetadata:v.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:m}}}catch(m){throw Lo(m,await ba(p))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function oF(e){return e.type==="file"&&e.data instanceof Uint8Array?{...e,data:Do(e.data)}:e}var iF=u.object({videos:u.array(u.unknown()).optional()}).catchall(u.unknown()),aF=u.union([u.object({type:u.literal("url"),url:u.string(),mediaType:u.string()}),u.object({type:u.literal("base64"),data:u.string(),mediaType:u.string()})]),sF=u.object({videos:u.array(aF),warnings:u.array(u.object({type:u.literal("other"),message:u.string()})).optional(),providerMetadata:u.record(u.string(),iF).optional()}),uF=St(()=>vt(u.object({objective:u.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:u.array(u.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:u.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:u.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:u.object({include_domains:u.array(u.string()).optional().describe("List of domains to include in search results."),exclude_domains:u.array(u.string()).optional().describe("List of domains to exclude from search results."),after_date:u.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:u.object({max_chars_per_result:u.number().optional().describe("Maximum characters per result."),max_chars_total:u.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:u.object({max_age_seconds:u.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),cF=St(()=>vt(u.union([u.object({searchId:u.string(),results:u.array(u.object({url:u.string(),title:u.string(),excerpt:u.string(),publishDate:u.string().nullable().optional(),relevanceScore:u.number().optional()}))}),u.object({error:u.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:u.number().optional(),message:u.string()})]))),lF=Of({id:"gateway.parallel_search",inputSchema:uF,outputSchema:cF}),dF=(e={})=>lF(e),pF=St(()=>vt(u.object({query:u.union([u.string(),u.array(u.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:u.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:u.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:u.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:u.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:u.array(u.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:u.array(u.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:u.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:u.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:u.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:u.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:u.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),fF=St(()=>vt(u.union([u.object({results:u.array(u.object({title:u.string(),url:u.string(),snippet:u.string(),date:u.string().optional(),lastUpdated:u.string().optional()})),id:u.string()}),u.object({error:u.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:u.number().optional(),message:u.string()})]))),mF=Of({id:"gateway.perplexity_search",inputSchema:pF,outputSchema:fF}),hF=(e={})=>mF(e),gF={parallelSearch:dF,perplexitySearch:hF};async function vF(){var e;return(e=(0,YC.getContext)().headers)==null?void 0:e["x-vercel-id"]}var yF="3.0.40",AF="0.0.1";function e2(e={}){var t,r;let o=null,n=null,i=(t=e.metadataCacheRefreshMillis)!=null?t:1e3*60*5,a=0,s=(r=$T(e.baseURL))!=null?r:"https://ai-gateway.vercel.sh/v3/ai",c=async()=>{try{let g=await bF(e);return Mo({Authorization:`Bearer ${g.token}`,"ai-gateway-protocol-version":AF,[QC]:g.authMethod,...e.headers},`ai-sdk/gateway/${yF}`)}catch(g){throw Lf.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:g})}},l=()=>{let g=Gc({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),y=Gc({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),E=Gc({settingValue:void 0,environmentVariableName:"VERCEL_REGION"});return async()=>{let I=await vF();return{...g&&{"ai-o11y-deployment-id":g},...y&&{"ai-o11y-environment":y},...E&&{"ai-o11y-region":E},...I&&{"ai-o11y-request-id":I}}}},d=g=>new JL(g,{provider:"gateway",baseURL:s,headers:c,fetch:e.fetch,o11yHeaders:l()}),f=async()=>{var g,y,E;let I=(E=(y=(g=e._internal)==null?void 0:g.currentDate)==null?void 0:y.call(g).getTime())!=null?E:Date.now();return(!o||I-a>i)&&(a=I,o=new LC({baseURL:s,headers:c,fetch:e.fetch}).getAvailableModels().then(h=>(n=h,h)).catch(async h=>{throw await Lo(h,await ba(await c()))})),n?Promise.resolve(n):o},p=async()=>new LC({baseURL:s,headers:c,fetch:e.fetch}).getCredits().catch(async g=>{throw await Lo(g,await ba(await c()))}),m=function(g){if(new.target)throw new Error("The Gateway Provider model function cannot be called with the new keyword.");return d(g)};m.specificationVersion="v3",m.getAvailableModels=f,m.getCredits=p,m.imageModel=g=>new YL(g,{provider:"gateway",baseURL:s,headers:c,fetch:e.fetch,o11yHeaders:l()}),m.languageModel=d;let v=g=>new KL(g,{provider:"gateway",baseURL:s,headers:c,fetch:e.fetch,o11yHeaders:l()});return m.embeddingModel=v,m.textEmbeddingModel=v,m.videoModel=g=>new nF(g,{provider:"gateway",baseURL:s,headers:c,fetch:e.fetch,o11yHeaders:l()}),m.chat=m.languageModel,m.embedding=m.embeddingModel,m.image=m.imageModel,m.video=m.videoModel,m.tools=gF,m}var Ni=e2();async function bF(e){let t=Gc({settingValue:e.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});return t?{token:t,authMethod:"api-key"}:{token:await(0,XC.getVercelOidcToken)(),authMethod:"oidc"}}var t2=typeof globalThis=="object"?globalThis:global;var Fo="1.9.0";var r2=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function xF(e){var t=new Set([e]),r=new Set,o=e.match(r2);if(!o)return function(){return!1};var n={major:+o[1],minor:+o[2],patch:+o[3],prerelease:o[4]};if(n.prerelease!=null)return function(c){return c===e};function i(s){return r.add(s),!1}function a(s){return t.add(s),!0}return function(c){if(t.has(c))return!0;if(r.has(c))return!1;var l=c.match(r2);if(!l)return i(c);var d={major:+l[1],minor:+l[2],patch:+l[3],prerelease:l[4]};return d.prerelease!=null||n.major!==d.major?i(c):n.major===0?n.minor===d.minor&&n.patch<=d.patch?a(c):i(c):n.minor<=d.minor?a(c):i(c)}}var n2=xF(Fo);var wF=Fo.split(".")[0],Kc=Symbol.for("opentelemetry.js.api."+wF),Qc=t2;function Js(e,t,r,o){var n;o===void 0&&(o=!1);var i=Qc[Kc]=(n=Qc[Kc])!==null&&n!==void 0?n:{version:Fo};if(!o&&i[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(a.stack||a.message),!1}if(i.version!==Fo){var a=new Error("@opentelemetry/api: Registration of version v"+i.version+" for "+e+" does not match previously registered API v"+Fo);return r.error(a.stack||a.message),!1}return i[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+Fo+"."),!0}function zo(e){var t,r,o=(t=Qc[Kc])===null||t===void 0?void 0:t.version;if(!(!o||!n2(o)))return(r=Qc[Kc])===null||r===void 0?void 0:r[e]}function Ks(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Fo+".");var r=Qc[Kc];r&&delete r[e]}var SF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],a;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i},_F=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))},o2=(function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Yc("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Yc("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Yc("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Yc("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Yc("verbose",this._namespace,t)},e})();function Yc(e,t,r){var o=zo("diag");if(o)return r.unshift(t),o[e].apply(o,_F([],SF(r),!1))}var yr;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(yr||(yr={}));function i2(e,t){e<yr.NONE?e=yr.NONE:e>yr.ALL&&(e=yr.ALL),t=t||{};function r(o,n){var i=t[o];return typeof i=="function"&&e>=n?i.bind(t):function(){}}return{error:r("error",yr.ERROR),warn:r("warn",yr.WARN),info:r("info",yr.INFO),debug:r("debug",yr.DEBUG),verbose:r("verbose",yr.VERBOSE)}}var IF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],a;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i},EF=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))},kF="diag",Qs=(function(){function e(){function t(n){return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=zo("diag");if(s)return s[n].apply(s,EF([],IF(i),!1))}}var r=this,o=function(n,i){var a,s,c;if(i===void 0&&(i={logLevel:yr.INFO}),n===r){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((a=l.stack)!==null&&a!==void 0?a:l.message),!1}typeof i=="number"&&(i={logLevel:i});var d=zo("diag"),f=i2((s=i.logLevel)!==null&&s!==void 0?s:yr.INFO,n);if(d&&!i.suppressOverrideMessage){var p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";d.warn("Current logger will be overwritten from "+p),f.warn("Current logger will overwrite one already registered from "+p)}return Js("diag",f,r,!0)};r.setLogger=o,r.disable=function(){Ks(kF,r)},r.createComponentLogger=function(n){return new o2(n)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e})();function a2(e){return Symbol.for(e)}var TF=(function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(o){return r._currentContext.get(o)},r.setValue=function(o,n){var i=new e(r._currentContext);return i._currentContext.set(o,n),i},r.deleteValue=function(o){var n=new e(r._currentContext);return n._currentContext.delete(o),n}}return e})(),s2=new TF;var CF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],a;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i},$F=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))},u2=(function(){function e(){}return e.prototype.active=function(){return s2},e.prototype.with=function(t,r,o){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];return r.call.apply(r,$F([o],CF(n),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e})();var NF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],a;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(s){a={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i},RF=function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))},tw="context",OF=new u2,Ys=(function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Js(tw,t,Qs.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,o){for(var n,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return(n=this._getContextManager()).with.apply(n,RF([t,r,o],NF(i),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return zo(tw)||OF},e.prototype.disable=function(){this._getContextManager().disable(),Ks(tw,Qs.instance())},e})();var Ff;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ff||(Ff={}));var rw="0000000000000000",nw="00000000000000000000000000000000",c2={traceId:nw,spanId:rw,traceFlags:Ff.NONE};var Ri=(function(){function e(t){t===void 0&&(t=c2),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e})();var ow=a2("OpenTelemetry Context Key SPAN");function zf(e){return e.getValue(ow)||void 0}function l2(){return zf(Ys.getInstance().active())}function Xc(e,t){return e.setValue(ow,t)}function d2(e){return e.deleteValue(ow)}function p2(e,t){return Xc(e,new Ri(t))}function Bf(e){var t;return(t=zf(e))===null||t===void 0?void 0:t.spanContext()}var DF=/^([0-9a-f]{32})$/i,PF=/^[0-9a-f]{16}$/i;function MF(e){return DF.test(e)&&e!==nw}function jF(e){return PF.test(e)&&e!==rw}function Zf(e){return MF(e.traceId)&&jF(e.spanId)}function f2(e){return new Ri(e)}var iw=Ys.getInstance(),Gf=(function(){function e(){}return e.prototype.startSpan=function(t,r,o){o===void 0&&(o=iw.active());var n=!!r?.root;if(n)return new Ri;var i=o&&Bf(o);return UF(i)&&Zf(i)?new Ri(i):new Ri},e.prototype.startActiveSpan=function(t,r,o,n){var i,a,s;if(!(arguments.length<2)){arguments.length===2?s=r:arguments.length===3?(i=r,s=o):(i=r,a=o,s=n);var c=a??iw.active(),l=this.startSpan(t,i,c),d=Xc(c,l);return iw.with(d,s,void 0,l)}},e})();function UF(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var LF=new Gf,m2=(function(){function e(t,r,o,n){this._provider=t,this.name=r,this.version=o,this.options=n}return e.prototype.startSpan=function(t,r,o){return this._getTracer().startSpan(t,r,o)},e.prototype.startActiveSpan=function(t,r,o,n){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):LF},e})();var h2=(function(){function e(){}return e.prototype.getTracer=function(t,r,o){return new Gf},e})();var FF=new h2,aw=(function(){function e(){}return e.prototype.getTracer=function(t,r,o){var n;return(n=this.getDelegateTracer(t,r,o))!==null&&n!==void 0?n:new m2(this,t,r,o)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:FF},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,o){var n;return(n=this._delegate)===null||n===void 0?void 0:n.getTracer(t,r,o)},e})();var Xs;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Xs||(Xs={}));var Vf=Ys.getInstance();var sw="trace",g2=(function(){function e(){this._proxyTracerProvider=new aw,this.wrapSpanContext=f2,this.isSpanContextValid=Zf,this.deleteSpan=d2,this.getSpan=zf,this.getActiveSpan=l2,this.getSpanContext=Bf,this.setSpan=Xc,this.setSpanContext=p2}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=Js(sw,this._proxyTracerProvider,Qs.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return zo(sw)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){Ks(sw,Qs.instance()),this._proxyTracerProvider=new aw},e})();var uw=g2.getInstance();var zF=Object.defineProperty,BF=(e,t)=>{for(var r in t)zF(e,r,{get:t[r],enumerable:!0})},C2="AI_InvalidArgumentError",$2=`vercel.ai.error.${C2}`,ZF=Symbol.for($2),N2,Xn=class extends W{constructor({parameter:e,value:t,message:r}){super({name:C2,message:`Invalid argument for parameter ${e}: ${r}`}),this[N2]=!0,this.parameter=e,this.value=t}static isInstance(e){return W.hasMarker(e,$2)}};N2=ZF;var GF="AI_InvalidStreamPartError",VF=`vercel.ai.error.${GF}`,HF=Symbol.for(VF),WF;WF=HF;var R2="AI_InvalidToolApprovalError",O2=`vercel.ai.error.${R2}`,qF=Symbol.for(O2),D2,JF=class extends W{constructor({approvalId:e}){super({name:R2,message:`Tool approval response references unknown approvalId: "${e}". No matching tool-approval-request found in message history.`}),this[D2]=!0,this.approvalId=e}static isInstance(e){return W.hasMarker(e,O2)}};D2=qF;var P2="AI_InvalidToolInputError",M2=`vercel.ai.error.${P2}`,KF=Symbol.for(M2),j2,mw=class extends W{constructor({toolInput:e,toolName:t,cause:r,message:o=`Invalid input for tool ${t}: ${gn(r)}`}){super({name:P2,message:o,cause:r}),this[j2]=!0,this.toolInput=e,this.toolName=t}static isInstance(e){return W.hasMarker(e,M2)}};j2=KF;var U2="AI_ToolCallNotFoundForApprovalError",L2=`vercel.ai.error.${U2}`,QF=Symbol.for(L2),F2,hw=class extends W{constructor({toolCallId:e,approvalId:t}){super({name:U2,message:`Tool call "${e}" not found for approval request "${t}".`}),this[F2]=!0,this.toolCallId=e,this.approvalId=t}static isInstance(e){return W.hasMarker(e,L2)}};F2=QF;var z2="AI_MissingToolResultsError",B2=`vercel.ai.error.${z2}`,YF=Symbol.for(B2),Z2,v2=class extends W{constructor({toolCallIds:e}){super({name:z2,message:`Tool result${e.length>1?"s are":" is"} missing for tool call${e.length>1?"s":""} ${e.join(", ")}.`}),this[Z2]=!0,this.toolCallIds=e}static isInstance(e){return W.hasMarker(e,B2)}};Z2=YF;var XF="AI_NoImageGeneratedError",ez=`vercel.ai.error.${XF}`,tz=Symbol.for(ez),rz;rz=tz;var G2="AI_NoObjectGeneratedError",V2=`vercel.ai.error.${G2}`,nz=Symbol.for(V2),H2,Oi=class extends W{constructor({message:e="No object generated.",cause:t,text:r,response:o,usage:n,finishReason:i}){super({name:G2,message:e,cause:t}),this[H2]=!0,this.text=r,this.response=o,this.usage=n,this.finishReason=i}static isInstance(e){return W.hasMarker(e,V2)}};H2=nz;var W2="AI_NoOutputGeneratedError",q2=`vercel.ai.error.${W2}`,oz=Symbol.for(q2),J2,K2=class extends W{constructor({message:e="No output generated.",cause:t}={}){super({name:W2,message:e,cause:t}),this[J2]=!0}static isInstance(e){return W.hasMarker(e,q2)}};J2=oz;var iz="AI_NoSpeechGeneratedError",az=`vercel.ai.error.${iz}`,sz=Symbol.for(az),uz;uz=sz;var cz="AI_NoTranscriptGeneratedError",lz=`vercel.ai.error.${cz}`,dz=Symbol.for(lz),pz;pz=dz;var fz="AI_NoVideoGeneratedError",mz=`vercel.ai.error.${fz}`,hz=Symbol.for(mz),gz;gz=hz;var Q2="AI_NoSuchToolError",Y2=`vercel.ai.error.${Q2}`,vz=Symbol.for(Y2),X2,lw=class extends W{constructor({toolName:e,availableTools:t=void 0,message:r=`Model tried to call unavailable tool '${e}'. ${t===void 0?"No tools are available.":`Available tools: ${t.join(", ")}.`}`}){super({name:Q2,message:r}),this[X2]=!0,this.toolName=e,this.availableTools=t}static isInstance(e){return W.hasMarker(e,Y2)}};X2=vz;var e$="AI_ToolCallRepairError",t$=`vercel.ai.error.${e$}`,yz=Symbol.for(t$),r$,Az=class extends W{constructor({cause:e,originalError:t,message:r=`Error repairing tool call: ${gn(e)}`}){super({name:e$,message:r,cause:e}),this[r$]=!0,this.originalError=t}static isInstance(e){return W.hasMarker(e,t$)}};r$=yz;var bz=class extends W{constructor(e){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${e.version} for provider "${e.provider}" and model "${e.modelId}". AI SDK 5 only supports models that implement specification version "v2".`}),this.version=e.version,this.provider=e.provider,this.modelId=e.modelId}},n$="AI_UIMessageStreamError",o$=`vercel.ai.error.${n$}`,xz=Symbol.for(o$),i$,eu=class extends W{constructor({chunkType:e,chunkId:t,message:r}){super({name:n$,message:r}),this[i$]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return W.hasMarker(e,o$)}};i$=xz;var wz="AI_InvalidDataContentError",Sz=`vercel.ai.error.${wz}`,_z=Symbol.for(Sz),Iz;Iz=_z;var a$="AI_InvalidMessageRoleError",s$=`vercel.ai.error.${a$}`,Ez=Symbol.for(s$),u$,kz=class extends W{constructor({role:e,message:t=`Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:a$,message:t}),this[u$]=!0,this.role=e}static isInstance(e){return W.hasMarker(e,s$)}};u$=Ez;var Tz="AI_MessageConversionError",Cz=`vercel.ai.error.${Tz}`,$z=Symbol.for(Cz),Nz;Nz=$z;var c$="AI_RetryError",l$=`vercel.ai.error.${c$}`,Rz=Symbol.for(l$),d$,y2=class extends W{constructor({message:e,reason:t,errors:r}){super({name:c$,message:e}),this[d$]=!0,this.reason=t,this.errors=r,this.lastError=r[r.length-1]}static isInstance(e){return W.hasMarker(e,l$)}};d$=Rz;function Oz({warning:e,provider:t,model:r}){let o=`AI SDK Warning (${t} / ${r}):`;switch(e.type){case"unsupported":{let n=`${o} The feature "${e.feature}" is not supported.`;return e.details&&(n+=` ${e.details}`),n}case"compatibility":{let n=`${o} The feature "${e.feature}" is used in a compatibility mode.`;return e.details&&(n+=` ${e.details}`),n}case"other":return`${o} ${e.message}`;default:return`${o} ${JSON.stringify(e,null,2)}`}}var Dz="AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.",A2=!1,gw=e=>{if(e.warnings.length===0)return;let t=globalThis.AI_SDK_LOG_WARNINGS;if(t!==!1){if(typeof t=="function"){t(e);return}A2||(A2=!0,console.info(Dz));for(let r of e.warnings)console.warn(Oz({warning:r,provider:e.provider,model:e.model}))}};function Pz({provider:e,modelId:t}){gw({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:e,model:t})}function Mz(e){return e.specificationVersion==="v3"?e:(Pz({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get(t,r){switch(r){case"specificationVersion":return"v3";case"doGenerate":return async(...o)=>{let n=await t.doGenerate(...o);return{...n,finishReason:p$(n.finishReason),usage:f$(n.usage)}};case"doStream":return async(...o)=>{let n=await t.doStream(...o);return{...n,stream:jz(n.stream)}};default:return t[r]}}}))}function jz(e){return e.pipeThrough(new TransformStream({transform(t,r){switch(t.type){case"finish":r.enqueue({...t,finishReason:p$(t.finishReason),usage:f$(t.usage)});break;default:r.enqueue(t);break}}}))}function p$(e){return{unified:e==="unknown"?"other":e,raw:void 0}}function f$(e){return{inputTokens:{total:e.inputTokens,noCache:void 0,cacheRead:e.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:e.outputTokens,text:void 0,reasoning:e.reasoningTokens}}}function Wf(e){if(typeof e!="string"){if(e.specificationVersion!=="v3"&&e.specificationVersion!=="v2"){let t=e;throw new bz({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return Mz(e)}return Uz().languageModel(e)}function Uz(){var e;return(e=globalThis.AI_SDK_DEFAULT_PROVIDER)!=null?e:Ni}function vw(e){if(e!=null)return typeof e=="number"?e:e.totalMs}function m$(e){if(!(e==null||typeof e=="number"))return e.stepMs}function Lz(e){if(!(e==null||typeof e=="number"))return e.chunkMs}var Fz=[{mediaType:"image/gif",bytesPrefix:[71,73,70]},{mediaType:"image/png",bytesPrefix:[137,80,78,71]},{mediaType:"image/jpeg",bytesPrefix:[255,216]},{mediaType:"image/webp",bytesPrefix:[82,73,70,70,null,null,null,null,87,69,66,80]},{mediaType:"image/bmp",bytesPrefix:[66,77]},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0]},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42]},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102]},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99]}];var zz=e=>{let t=typeof e=="string"?Vs(e):e,r=(t[6]&127)<<21|(t[7]&127)<<14|(t[8]&127)<<7|t[9]&127;return t.slice(r+10)};function Bz(e){return typeof e=="string"&&e.startsWith("SUQz")||typeof e!="string"&&e.length>10&&e[0]===73&&e[1]===68&&e[2]===51?zz(e):e}function Zz({data:e,signatures:t}){let r=Bz(e),o=typeof r=="string"?Vs(r.substring(0,Math.min(r.length,24))):r;for(let n of t)if(o.length>=n.bytesPrefix.length&&n.bytesPrefix.every((i,a)=>i===null||o[a]===i))return n.mediaType}var h$="6.0.79",Gz=async({url:e})=>{var t;let r=e.toString();try{let o=await fetch(r,{headers:Mo({},`ai-sdk/${h$}`,Nf())});if(!o.ok)throw new $f({url:r,statusCode:o.status,statusText:o.statusText});return{data:new Uint8Array(await o.arrayBuffer()),mediaType:(t=o.headers.get("content-type"))!=null?t:void 0}}catch(o){throw $f.isInstance(o)?o:new $f({url:r,cause:o})}},Vz=(e=Gz)=>t=>Promise.all(t.map(async r=>r.isUrlSupportedByModel?null:e(r)));function Hz(e){try{let[t,r]=e.split(",");return{mediaType:t.split(";")[0].split(":")[1],base64Content:r}}catch{return{mediaType:void 0,base64Content:void 0}}}var g$=u.union([u.string(),u.instanceof(Uint8Array),u.instanceof(ArrayBuffer),u.custom(e=>{var t,r;return(r=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?r:!1},{message:"Must be a Buffer"})]);function v$(e){if(e instanceof Uint8Array)return{data:e,mediaType:void 0};if(e instanceof ArrayBuffer)return{data:new Uint8Array(e),mediaType:void 0};if(typeof e=="string")try{e=new URL(e)}catch{}if(e instanceof URL&&e.protocol==="data:"){let{mediaType:t,base64Content:r}=Hz(e.toString());if(t==null||r==null)throw new W({name:"InvalidDataContentError",message:`Invalid data URL format in content ${e.toString()}`});return{data:r,mediaType:t}}return{data:e,mediaType:void 0}}function Wz(e){return typeof e=="string"?e:e instanceof ArrayBuffer?Do(new Uint8Array(e)):Do(e)}function rl(e){return e===void 0?[]:Array.isArray(e)?e:[e]}async function y$({prompt:e,supportedUrls:t,download:r=Vz()}){let o=await Jz(e.messages,r,t),n=new Map;for(let l of e.messages)if(l.role==="assistant"&&Array.isArray(l.content))for(let d of l.content)d.type==="tool-approval-request"&&"approvalId"in d&&"toolCallId"in d&&n.set(d.approvalId,d.toolCallId);let i=new Set;for(let l of e.messages)if(l.role==="tool"){for(let d of l.content)if(d.type==="tool-approval-response"){let f=n.get(d.approvalId);f&&i.add(f)}}let a=[...e.system!=null?typeof e.system=="string"?[{role:"system",content:e.system}]:rl(e.system).map(l=>({role:"system",content:l.content,providerOptions:l.providerOptions})):[],...e.messages.map(l=>qz({message:l,downloadedAssets:o}))],s=[];for(let l of a){if(l.role!=="tool"){s.push(l);continue}let d=s.at(-1);d?.role==="tool"?d.content.push(...l.content):s.push(l)}let c=new Set;for(let l of s)switch(l.role){case"assistant":{for(let d of l.content)d.type==="tool-call"&&!d.providerExecuted&&c.add(d.toolCallId);break}case"tool":{for(let d of l.content)d.type==="tool-result"&&c.delete(d.toolCallId);break}case"user":case"system":for(let d of i)c.delete(d);if(c.size>0)throw new v2({toolCallIds:Array.from(c)});break}for(let l of i)c.delete(l);if(c.size>0)throw new v2({toolCallIds:Array.from(c)});return s.filter(l=>l.role!=="tool"||l.content.length>0)}function qz({message:e,downloadedAssets:t}){let r=e.role;switch(r){case"system":return{role:"system",content:e.content,providerOptions:e.providerOptions};case"user":return typeof e.content=="string"?{role:"user",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"user",content:e.content.map(o=>Kz(o,t)).filter(o=>o.type!=="text"||o.text!==""),providerOptions:e.providerOptions};case"assistant":return typeof e.content=="string"?{role:"assistant",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"assistant",content:e.content.filter(o=>o.type!=="text"||o.text!==""||o.providerOptions!=null).filter(o=>o.type!=="tool-approval-request").map(o=>{let n=o.providerOptions;switch(o.type){case"file":{let{data:i,mediaType:a}=v$(o.data);return{type:"file",data:i,filename:o.filename,mediaType:a??o.mediaType,providerOptions:n}}case"reasoning":return{type:"reasoning",text:o.text,providerOptions:n};case"text":return{type:"text",text:o.text,providerOptions:n};case"tool-call":return{type:"tool-call",toolCallId:o.toolCallId,toolName:o.toolName,input:o.input,providerExecuted:o.providerExecuted,providerOptions:n};case"tool-result":return{type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,output:b2(o.output),providerOptions:n}}}),providerOptions:e.providerOptions};case"tool":return{role:"tool",content:e.content.filter(o=>o.type!=="tool-approval-response"||o.providerExecuted).map(o=>{switch(o.type){case"tool-result":return{type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,output:b2(o.output),providerOptions:o.providerOptions};case"tool-approval-response":return{type:"tool-approval-response",approvalId:o.approvalId,approved:o.approved,reason:o.reason}}}),providerOptions:e.providerOptions};default:{let o=r;throw new kz({role:o})}}}async function Jz(e,t,r){let o=e.filter(i=>i.role==="user").map(i=>i.content).filter(i=>Array.isArray(i)).flat().filter(i=>i.type==="image"||i.type==="file").map(i=>{var a;let s=(a=i.mediaType)!=null?a:i.type==="image"?"image/*":void 0,c=i.type==="image"?i.image:i.data;if(typeof c=="string")try{c=new URL(c)}catch{}return{mediaType:s,data:c}}).filter(i=>i.data instanceof URL).map(i=>({url:i.data,isUrlSupportedByModel:i.mediaType!=null&&ST({url:i.data.toString(),mediaType:i.mediaType,supportedUrls:r})})),n=await t(o);return Object.fromEntries(n.map((i,a)=>i==null?null:[o[a].url.toString(),{data:i.data,mediaType:i.mediaType}]).filter(i=>i!=null))}function Kz(e,t){var r;if(e.type==="text")return{type:"text",text:e.text,providerOptions:e.providerOptions};let o,n=e.type;switch(n){case"image":o=e.image;break;case"file":o=e.data;break;default:throw new Error(`Unsupported part type: ${n}`)}let{data:i,mediaType:a}=v$(o),s=a??e.mediaType,c=i;if(c instanceof URL){let l=t[c.toString()];l&&(c=l.data,s??(s=l.mediaType))}switch(n){case"image":return(c instanceof Uint8Array||typeof c=="string")&&(s=(r=Zz({data:c,signatures:Fz}))!=null?r:s),{type:"file",mediaType:s??"image/*",filename:void 0,data:c,providerOptions:e.providerOptions};case"file":{if(s==null)throw new Error("Media type is missing for file part");return{type:"file",mediaType:s,filename:e.filename,data:c,providerOptions:e.providerOptions}}}}function b2(e){return e.type!=="content"?e:{type:"content",value:e.value.map(t=>t.type!=="media"?t:t.mediaType.startsWith("image/")?{type:"image-data",data:t.data,mediaType:t.mediaType}:{type:"file-data",data:t.data,mediaType:t.mediaType})}}async function tl({toolCallId:e,input:t,output:r,tool:o,errorMode:n}){return n==="text"?{type:"error-text",value:gn(r)}:n==="json"?{type:"error-json",value:x2(r)}:o?.toModelOutput?await o.toModelOutput({toolCallId:e,input:t,output:r}):typeof r=="string"?{type:"text",value:r}:{type:"json",value:x2(r)}}function x2(e){return e===void 0?null:e}function dw({maxOutputTokens:e,temperature:t,topP:r,topK:o,presencePenalty:n,frequencyPenalty:i,seed:a,stopSequences:s}){if(e!=null){if(!Number.isInteger(e))throw new Xn({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be an integer"});if(e<1)throw new Xn({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be >= 1"})}if(t!=null&&typeof t!="number")throw new Xn({parameter:"temperature",value:t,message:"temperature must be a number"});if(r!=null&&typeof r!="number")throw new Xn({parameter:"topP",value:r,message:"topP must be a number"});if(o!=null&&typeof o!="number")throw new Xn({parameter:"topK",value:o,message:"topK must be a number"});if(n!=null&&typeof n!="number")throw new Xn({parameter:"presencePenalty",value:n,message:"presencePenalty must be a number"});if(i!=null&&typeof i!="number")throw new Xn({parameter:"frequencyPenalty",value:i,message:"frequencyPenalty must be a number"});if(a!=null&&!Number.isInteger(a))throw new Xn({parameter:"seed",value:a,message:"seed must be an integer"});return{maxOutputTokens:e,temperature:t,topP:r,topK:o,presencePenalty:n,frequencyPenalty:i,stopSequences:s,seed:a}}function Qz(e){return e!=null&&Object.keys(e).length>0}async function A$({tools:e,toolChoice:t,activeTools:r}){if(!Qz(e))return{tools:void 0,toolChoice:void 0};let o=r!=null?Object.entries(e).filter(([i])=>r.includes(i)):Object.entries(e),n=[];for(let[i,a]of o){let s=a.type;switch(s){case void 0:case"dynamic":case"function":n.push({type:"function",name:i,description:a.description,inputSchema:await jo(a.inputSchema).jsonSchema,...a.inputExamples!=null?{inputExamples:a.inputExamples}:{},providerOptions:a.providerOptions,...a.strict!=null?{strict:a.strict}:{}});break;case"provider":n.push({type:"provider",name:i,id:a.id,args:a.args});break;default:{let c=s;throw new Error(`Unsupported tool type: ${c}`)}}}return{tools:n,toolChoice:t==null?{type:"auto"}:typeof t=="string"?{type:t}:{type:"tool",toolName:t.toolName}}}var nl=u.lazy(()=>u.union([u.null(),u.string(),u.number(),u.boolean(),u.record(u.string(),nl.optional()),u.array(nl)])),he=u.record(u.string(),u.record(u.string(),nl.optional())),b$=u.object({type:u.literal("text"),text:u.string(),providerOptions:he.optional()}),Yz=u.object({type:u.literal("image"),image:u.union([g$,u.instanceof(URL)]),mediaType:u.string().optional(),providerOptions:he.optional()}),x$=u.object({type:u.literal("file"),data:u.union([g$,u.instanceof(URL)]),filename:u.string().optional(),mediaType:u.string(),providerOptions:he.optional()}),Xz=u.object({type:u.literal("reasoning"),text:u.string(),providerOptions:he.optional()}),e5=u.object({type:u.literal("tool-call"),toolCallId:u.string(),toolName:u.string(),input:u.unknown(),providerOptions:he.optional(),providerExecuted:u.boolean().optional()}),t5=u.discriminatedUnion("type",[u.object({type:u.literal("text"),value:u.string(),providerOptions:he.optional()}),u.object({type:u.literal("json"),value:nl,providerOptions:he.optional()}),u.object({type:u.literal("execution-denied"),reason:u.string().optional(),providerOptions:he.optional()}),u.object({type:u.literal("error-text"),value:u.string(),providerOptions:he.optional()}),u.object({type:u.literal("error-json"),value:nl,providerOptions:he.optional()}),u.object({type:u.literal("content"),value:u.array(u.union([u.object({type:u.literal("text"),text:u.string(),providerOptions:he.optional()}),u.object({type:u.literal("media"),data:u.string(),mediaType:u.string()}),u.object({type:u.literal("file-data"),data:u.string(),mediaType:u.string(),filename:u.string().optional(),providerOptions:he.optional()}),u.object({type:u.literal("file-url"),url:u.string(),providerOptions:he.optional()}),u.object({type:u.literal("file-id"),fileId:u.union([u.string(),u.record(u.string(),u.string())]),providerOptions:he.optional()}),u.object({type:u.literal("image-data"),data:u.string(),mediaType:u.string(),providerOptions:he.optional()}),u.object({type:u.literal("image-url"),url:u.string(),providerOptions:he.optional()}),u.object({type:u.literal("image-file-id"),fileId:u.union([u.string(),u.record(u.string(),u.string())]),providerOptions:he.optional()}),u.object({type:u.literal("custom"),providerOptions:he.optional()})]))})]),w$=u.object({type:u.literal("tool-result"),toolCallId:u.string(),toolName:u.string(),output:t5,providerOptions:he.optional()}),r5=u.object({type:u.literal("tool-approval-request"),approvalId:u.string(),toolCallId:u.string()}),n5=u.object({type:u.literal("tool-approval-response"),approvalId:u.string(),approved:u.boolean(),reason:u.string().optional()}),o5=u.object({role:u.literal("system"),content:u.string(),providerOptions:he.optional()}),i5=u.object({role:u.literal("user"),content:u.union([u.string(),u.array(u.union([b$,Yz,x$]))]),providerOptions:he.optional()}),a5=u.object({role:u.literal("assistant"),content:u.union([u.string(),u.array(u.union([b$,x$,Xz,e5,w$,r5]))]),providerOptions:he.optional()}),s5=u.object({role:u.literal("tool"),content:u.array(u.union([w$,n5])),providerOptions:he.optional()}),u5=u.union([o5,i5,a5,s5]);async function S$(e){if(e.prompt==null&&e.messages==null)throw new oa({prompt:e,message:"prompt or messages must be defined"});if(e.prompt!=null&&e.messages!=null)throw new oa({prompt:e,message:"prompt and messages cannot be defined at the same time"});if(e.system!=null&&typeof e.system!="string"&&!rl(e.system).every(o=>typeof o=="object"&&o!==null&&"role"in o&&o.role==="system"))throw new oa({prompt:e,message:"system must be a string, SystemModelMessage, or array of SystemModelMessage"});let t;if(e.prompt!=null&&typeof e.prompt=="string")t=[{role:"user",content:e.prompt}];else if(e.prompt!=null&&Array.isArray(e.prompt))t=e.prompt;else if(e.messages!=null)t=e.messages;else throw new oa({prompt:e,message:"prompt or messages must be defined"});if(t.length===0)throw new oa({prompt:e,message:"messages must not be empty"});let r=await gr({value:t,schema:u.array(u5)});if(!r.success)throw new oa({prompt:e,message:"The messages do not match the ModelMessage[] schema.",cause:r.error});return{messages:t,system:e.system}}function _$(e){if(!Lf.isInstance(e))return e;let t=(process==null?void 0:process.env.NODE_ENV)==="production",r="https://ai-sdk.dev/unauthenticated-ai-gateway";return t?new W({name:"GatewayError",message:`Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${r}`}):Object.assign(new Error(`\x1B[1m\x1B[31mUnauthenticated request to AI Gateway.\x1B[0m
85
-
86
- To authenticate, set the \x1B[33mAI_GATEWAY_API_KEY\x1B[0m environment variable with your API key.
87
-
88
- Alternatively, you can use a provider module instead of the AI Gateway.
89
-
90
- Learn more: \x1B[34m${r}\x1B[0m
91
-
92
- `),{name:"GatewayAuthenticationError"})}function ol({operationId:e,telemetry:t}){return{"operation.name":`${e}${t?.functionId!=null?` ${t.functionId}`:""}`,"resource.name":t?.functionId,"ai.operationId":e,"ai.telemetry.functionId":t?.functionId}}function I$({model:e,settings:t,telemetry:r,headers:o}){var n;return{"ai.model.provider":e.provider,"ai.model.id":e.modelId,...Object.entries(t).reduce((i,[a,s])=>{if(a==="timeout"){let c=vw(s);c!=null&&(i[`ai.settings.${a}`]=c)}else i[`ai.settings.${a}`]=s;return i},{}),...Object.entries((n=r?.metadata)!=null?n:{}).reduce((i,[a,s])=>(i[`ai.telemetry.metadata.${a}`]=s,i),{}),...Object.entries(o??{}).reduce((i,[a,s])=>(s!==void 0&&(i[`ai.request.headers.${a}`]=s),i),{})}}var c5={startSpan(){return Hf},startActiveSpan(e,t,r,o){if(typeof t=="function")return t(Hf);if(typeof r=="function")return r(Hf);if(typeof o=="function")return o(Hf)}},Hf={spanContext(){return l5},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this}},l5={traceId:"",spanId:"",traceFlags:0};function E$({isEnabled:e=!1,tracer:t}={}){return e?t||uw.getTracer("ai"):c5}async function il({name:e,tracer:t,attributes:r,fn:o,endWhenDone:n=!0}){return t.startActiveSpan(e,{attributes:await r},async i=>{let a=Vf.active();try{let s=await Vf.with(a,()=>o(i));return n&&i.end(),s}catch(s){try{k$(i,s)}finally{i.end()}throw s}})}function k$(e,t){t instanceof Error?(e.recordException({name:t.name,message:t.message,stack:t.stack}),e.setStatus({code:Xs.ERROR,message:t.message})):e.setStatus({code:Xs.ERROR})}async function eo({telemetry:e,attributes:t}){if(e?.isEnabled!==!0)return{};let r={};for(let[o,n]of Object.entries(t))if(n!=null){if(typeof n=="object"&&"input"in n&&typeof n.input=="function"){if(e?.recordInputs===!1)continue;let i=await n.input();i!=null&&(r[o]=i);continue}if(typeof n=="object"&&"output"in n&&typeof n.output=="function"){if(e?.recordOutputs===!1)continue;let i=await n.output();i!=null&&(r[o]=i);continue}r[o]=n}return r}function T$(e){return JSON.stringify(e.map(t=>({...t,content:typeof t.content=="string"?t.content:t.content.map(r=>r.type==="file"?{...r,data:r.data instanceof Uint8Array?Wz(r.data):r.data}:r)})))}function C$(e){return{inputTokens:e.inputTokens.total,inputTokenDetails:{noCacheTokens:e.inputTokens.noCache,cacheReadTokens:e.inputTokens.cacheRead,cacheWriteTokens:e.inputTokens.cacheWrite},outputTokens:e.outputTokens.total,outputTokenDetails:{textTokens:e.outputTokens.text,reasoningTokens:e.outputTokens.reasoning},totalTokens:_n(e.inputTokens.total,e.outputTokens.total),raw:e.raw,reasoningTokens:e.outputTokens.reasoning,cachedInputTokens:e.inputTokens.cacheRead}}function cw(){return{inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0}}function $$(e,t){var r,o,n,i,a,s,c,l,d,f;return{inputTokens:_n(e.inputTokens,t.inputTokens),inputTokenDetails:{noCacheTokens:_n((r=e.inputTokenDetails)==null?void 0:r.noCacheTokens,(o=t.inputTokenDetails)==null?void 0:o.noCacheTokens),cacheReadTokens:_n((n=e.inputTokenDetails)==null?void 0:n.cacheReadTokens,(i=t.inputTokenDetails)==null?void 0:i.cacheReadTokens),cacheWriteTokens:_n((a=e.inputTokenDetails)==null?void 0:a.cacheWriteTokens,(s=t.inputTokenDetails)==null?void 0:s.cacheWriteTokens)},outputTokens:_n(e.outputTokens,t.outputTokens),outputTokenDetails:{textTokens:_n((c=e.outputTokenDetails)==null?void 0:c.textTokens,(l=t.outputTokenDetails)==null?void 0:l.textTokens),reasoningTokens:_n((d=e.outputTokenDetails)==null?void 0:d.reasoningTokens,(f=t.outputTokenDetails)==null?void 0:f.reasoningTokens)},totalTokens:_n(e.totalTokens,t.totalTokens),reasoningTokens:_n(e.reasoningTokens,t.reasoningTokens),cachedInputTokens:_n(e.cachedInputTokens,t.cachedInputTokens)}}function _n(e,t){return e==null&&t==null?void 0:(e??0)+(t??0)}function Jf(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let r={...e};for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let n=t[o];if(n===void 0)continue;let i=o in e?e[o]:void 0,a=n!==null&&typeof n=="object"&&!Array.isArray(n)&&!(n instanceof Date)&&!(n instanceof RegExp),s=i!=null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp);a&&s?r[o]=Jf(i,n):r[o]=n}return r}function d5({error:e,exponentialBackoffDelay:t}){let r=e.responseHeaders;if(!r)return t;let o,n=r["retry-after-ms"];if(n){let a=parseFloat(n);Number.isNaN(a)||(o=a)}let i=r["retry-after"];if(i&&o===void 0){let a=parseFloat(i);Number.isNaN(a)?o=Date.parse(i)-Date.now():o=a*1e3}return o!=null&&!Number.isNaN(o)&&0<=o&&(o<60*1e3||o<t)?o:t}var p5=({maxRetries:e=2,initialDelayInMs:t=2e3,backoffFactor:r=2,abortSignal:o}={})=>async n=>N$(n,{maxRetries:e,delayInMs:t,backoffFactor:r,abortSignal:o});async function N$(e,{maxRetries:t,delayInMs:r,backoffFactor:o,abortSignal:n},i=[]){try{return await e()}catch(a){if(Ro(a)||t===0)throw a;let s=Hs(a),c=[...i,a],l=c.length;if(l>t)throw new y2({message:`Failed after ${l} attempts. Last error: ${s}`,reason:"maxRetriesExceeded",errors:c});if(a instanceof Error&&ht.isInstance(a)&&a.isRetryable===!0&&l<=t)return await yT(d5({error:a,exponentialBackoffDelay:r}),{abortSignal:n}),N$(e,{maxRetries:t,delayInMs:o*r,backoffFactor:o,abortSignal:n},c);throw l===1?a:new y2({message:`Failed after ${l} attempts with non-retryable error: '${s}'`,reason:"errorNotRetryable",errors:c})}}function R$({maxRetries:e,abortSignal:t}){if(e!=null){if(!Number.isInteger(e))throw new Xn({parameter:"maxRetries",value:e,message:"maxRetries must be an integer"});if(e<0)throw new Xn({parameter:"maxRetries",value:e,message:"maxRetries must be >= 0"})}let r=e??2;return{maxRetries:r,retry:p5({maxRetries:r,abortSignal:t})}}function O$({messages:e}){let t=e.at(-1);if(t?.role!="tool")return{approvedToolApprovals:[],deniedToolApprovals:[]};let r={};for(let c of e)if(c.role==="assistant"&&typeof c.content!="string"){let l=c.content;for(let d of l)d.type==="tool-call"&&(r[d.toolCallId]=d)}let o={};for(let c of e)if(c.role==="assistant"&&typeof c.content!="string"){let l=c.content;for(let d of l)d.type==="tool-approval-request"&&(o[d.approvalId]=d)}let n={};for(let c of t.content)c.type==="tool-result"&&(n[c.toolCallId]=c);let i=[],a=[],s=t.content.filter(c=>c.type==="tool-approval-response");for(let c of s){let l=o[c.approvalId];if(l==null)throw new JF({approvalId:c.approvalId});if(n[l.toolCallId]!=null)continue;let d=r[l.toolCallId];if(d==null)throw new hw({toolCallId:l.toolCallId,approvalId:l.approvalId});let f={approvalRequest:l,approvalResponse:c,toolCall:d};c.approved?i.push(f):a.push(f)}return{approvedToolApprovals:i,deniedToolApprovals:a}}async function yw({toolCall:e,tools:t,tracer:r,telemetry:o,messages:n,abortSignal:i,experimental_context:a,onPreliminaryToolResult:s}){let{toolName:c,toolCallId:l,input:d}=e,f=t?.[c];if(f?.execute!=null)return il({name:"ai.toolCall",attributes:eo({telemetry:o,attributes:{...ol({operationId:"ai.toolCall",telemetry:o}),"ai.toolCall.name":c,"ai.toolCall.id":l,"ai.toolCall.args":{output:()=>JSON.stringify(d)}}}),tracer:r,fn:async p=>{let m;try{let v=NT({execute:f.execute.bind(f),input:d,options:{toolCallId:l,messages:n,abortSignal:i,experimental_context:a}});for await(let g of v)g.type==="preliminary"?s?.({...e,type:"tool-result",output:g.output,preliminary:!0}):m=g.output}catch(v){return k$(p,v),{type:"tool-error",toolCallId:l,toolName:c,input:d,error:v,dynamic:f.type==="dynamic",...e.providerMetadata!=null?{providerMetadata:e.providerMetadata}:{}}}try{p.setAttributes(await eo({telemetry:o,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(m)}}}))}catch{}return{type:"tool-result",toolCallId:l,toolName:c,input:d,output:m,dynamic:f.type==="dynamic",...e.providerMetadata!=null?{providerMetadata:e.providerMetadata}:{}}}})}function w2(e){let t=e.filter(r=>r.type==="reasoning");return t.length===0?void 0:t.map(r=>r.text).join(`
93
- `)}function S2(e){let t=e.filter(r=>r.type==="text");if(t.length!==0)return t.map(r=>r.text).join("")}var D$=class{constructor({data:e,mediaType:t}){let r=e instanceof Uint8Array;this.base64Data=r?void 0:e,this.uint8ArrayData=r?e:void 0,this.mediaType=t}get base64(){return this.base64Data==null&&(this.base64Data=Do(this.uint8ArrayData)),this.base64Data}get uint8Array(){return this.uint8ArrayData==null&&(this.uint8ArrayData=Vs(this.base64Data)),this.uint8ArrayData}},f5=class extends D${constructor(e){super(e),this.type="file"}};async function P$({tool:e,toolCall:t,messages:r,experimental_context:o}){return e.needsApproval==null?!1:typeof e.needsApproval=="boolean"?e.needsApproval:await e.needsApproval(t.input,{toolCallId:t.toolCallId,messages:r,experimental_context:o})}var m5={};BF(m5,{array:()=>v5,choice:()=>y5,json:()=>A5,object:()=>g5,text:()=>qf});function h5(e){let t=["ROOT"],r=-1,o=null;function n(c,l,d){switch(c){case'"':{r=l,t.pop(),t.push(d),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{r=l,o=l,t.pop(),t.push(d),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(d),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=l,t.pop(),t.push(d),t.push("INSIDE_NUMBER");break}case"{":{r=l,t.pop(),t.push(d),t.push("INSIDE_OBJECT_START");break}case"[":{r=l,t.pop(),t.push(d),t.push("INSIDE_ARRAY_START");break}}}function i(c,l){switch(c){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{r=l,t.pop();break}}}function a(c,l){switch(c){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=l,t.pop();break}}}for(let c=0;c<e.length;c++){let l=e[c];switch(t[t.length-1]){case"ROOT":n(l,c,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{r=c,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(l){case":":{t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{n(l,c,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{i(l,c);break}case"INSIDE_STRING":{switch(l){case'"':{t.pop(),r=c;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:r=c}break}case"INSIDE_ARRAY_START":{switch(l){case"]":{r=c,t.pop();break}default:{r=c,n(l,c,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=c,t.pop();break}default:{r=c;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{n(l,c,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),r=c;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=c;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(l,c),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&i(l,c);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&i(l,c);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(l,c);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{let f=e.substring(o,c+1);!"false".startsWith(f)&&!"true".startsWith(f)&&!"null".startsWith(f)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?i(l,c):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(l,c)):r=c;break}}}let s=e.slice(0,r+1);for(let c=t.length-1;c>=0;c--)switch(t[c]){case"INSIDE_STRING":{s+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{s+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{s+="]";break}case"INSIDE_LITERAL":{let d=e.substring(o,e.length);"true".startsWith(d)?s+="true".slice(d.length):"false".startsWith(d)?s+="false".slice(d.length):"null".startsWith(d)&&(s+="null".slice(d.length))}}return s}async function al(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Cr({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Cr({text:h5(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var qf=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),g5=({schema:e,name:t,description:r})=>{let o=jo(e);return{name:"object",responseFormat:It(o.jsonSchema).then(n=>({type:"json",schema:n,...t!=null&&{name:t},...r!=null&&{description:r}})),async parseCompleteOutput({text:n},i){let a=await Cr({text:n});if(!a.success)throw new Oi({message:"No object generated: could not parse the response.",cause:a.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});let s=await gr({value:a.value,schema:o});if(!s.success)throw new Oi({message:"No object generated: response did not match schema.",cause:s.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});return s.value},async parsePartialOutput({text:n}){let i=await al(n);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:i.value}}},createElementStreamTransform(){}}},v5=({element:e,name:t,description:r})=>{let o=jo(e);return{name:"array",responseFormat:It(o.jsonSchema).then(n=>{let{$schema:i,...a}=n;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:a}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}}),async parseCompleteOutput({text:n},i){let a=await Cr({text:n});if(!a.success)throw new Oi({message:"No object generated: could not parse the response.",cause:a.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});let s=a.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))throw new Oi({message:"No object generated: response did not match schema.",cause:new qt({value:s,cause:"response must be an object with an elements array"}),text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});for(let c of s.elements){let l=await gr({value:c,schema:o});if(!l.success)throw new Oi({message:"No object generated: response did not match schema.",cause:l.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason})}return s.elements},async parsePartialOutput({text:n}){let i=await al(n);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let a=i.value;if(a==null||typeof a!="object"||!("elements"in a)||!Array.isArray(a.elements))return;let s=i.state==="repaired-parse"&&a.elements.length>0?a.elements.slice(0,-1):a.elements,c=[];for(let l of s){let d=await gr({value:l,schema:o});d.success&&c.push(d.value)}return{partial:c}}}},createElementStreamTransform(){let n=0;return new TransformStream({transform({partialOutput:i},a){if(i!=null)for(;n<i.length;n++)a.enqueue(i[n])}})}}},y5=({options:e,name:t,description:r})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}),async parseCompleteOutput({text:o},n){let i=await Cr({text:o});if(!i.success)throw new Oi({message:"No object generated: could not parse the response.",cause:i.error,text:o,response:n.response,usage:n.usage,finishReason:n.finishReason});let a=i.value;if(a==null||typeof a!="object"||!("result"in a)||typeof a.result!="string"||!e.includes(a.result))throw new Oi({message:"No object generated: response did not match schema.",cause:new qt({value:a,cause:"response must be an object that contains a choice value."}),text:o,response:n.response,usage:n.usage,finishReason:n.finishReason});return a.result},async parsePartialOutput({text:o}){let n=await al(o);switch(n.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{let i=n.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string")return;let a=e.filter(s=>s.startsWith(i.result));return n.state==="successful-parse"?a.includes(i.result)?{partial:i.result}:void 0:a.length===1?{partial:a[0]}:void 0}}},createElementStreamTransform(){}}),A5=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:r},o){let n=await Cr({text:r});if(!n.success)throw new Oi({message:"No object generated: could not parse the response.",cause:n.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return n.value},async parsePartialOutput({text:r}){let o=await al(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return o.value===void 0?void 0:{partial:o.value}}},createElementStreamTransform(){}});async function M$({toolCall:e,tools:t,repairToolCall:r,system:o,messages:n}){var i;try{if(t==null){if(e.providerExecuted&&e.dynamic)return await j$(e);throw new lw({toolName:e.toolName})}try{return await _2({toolCall:e,tools:t})}catch(a){if(r==null||!(lw.isInstance(a)||mw.isInstance(a)))throw a;let s=null;try{s=await r({toolCall:e,tools:t,inputSchema:async({toolName:c})=>{let{inputSchema:l}=t[c];return await jo(l).jsonSchema},system:o,messages:n,error:a})}catch(c){throw new Az({cause:c,originalError:a})}if(s==null)throw a;return await _2({toolCall:s,tools:t})}}catch(a){let s=await Cr({text:e.input}),c=s.success?s.value:e.input;return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:c,dynamic:!0,invalid:!0,error:a,title:(i=t?.[e.toolName])==null?void 0:i.title,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}}}async function j$(e){let t=e.input.trim()===""?{success:!0,value:{}}:await Cr({text:e.input});if(t.success===!1)throw new mw({toolName:e.toolName,toolInput:e.input,cause:t.error});return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:t.value,providerExecuted:!0,dynamic:!0,providerMetadata:e.providerMetadata}}async function _2({toolCall:e,tools:t}){let r=e.toolName,o=t[r];if(o==null){if(e.providerExecuted&&e.dynamic)return await j$(e);throw new lw({toolName:e.toolName,availableTools:Object.keys(t)})}let n=jo(o.inputSchema),i=e.input.trim()===""?await gr({value:{},schema:n}):await Cr({text:e.input,schema:n});if(i.success===!1)throw new mw({toolName:r,toolInput:e.input,cause:i.error});return o.type==="dynamic"?{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:i.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,dynamic:!0,title:o.title}:{type:"tool-call",toolCallId:e.toolCallId,toolName:r,input:i.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:o.title}}var U$=class{constructor({content:e,finishReason:t,rawFinishReason:r,usage:o,warnings:n,request:i,response:a,providerMetadata:s}){this.content=e,this.finishReason=t,this.rawFinishReason=r,this.usage=o,this.warnings=n,this.request=i,this.response=a,this.providerMetadata=s}get text(){return this.content.filter(e=>e.type==="text").map(e=>e.text).join("")}get reasoning(){return this.content.filter(e=>e.type==="reasoning")}get reasoningText(){return this.reasoning.length===0?void 0:this.reasoning.map(e=>e.text).join("")}get files(){return this.content.filter(e=>e.type==="file").map(e=>e.file)}get sources(){return this.content.filter(e=>e.type==="source")}get toolCalls(){return this.content.filter(e=>e.type==="tool-call")}get staticToolCalls(){return this.toolCalls.filter(e=>e.dynamic!==!0)}get dynamicToolCalls(){return this.toolCalls.filter(e=>e.dynamic===!0)}get toolResults(){return this.content.filter(e=>e.type==="tool-result")}get staticToolResults(){return this.toolResults.filter(e=>e.dynamic!==!0)}get dynamicToolResults(){return this.toolResults.filter(e=>e.dynamic===!0)}};function tu(e){return({steps:t})=>t.length===e}async function L$({stopConditions:e,steps:t}){return(await Promise.all(e.map(r=>r({steps:t})))).some(r=>r)}async function pw({content:e,tools:t}){let r=[],o=[];for(let i of e)if(i.type!=="source"&&!((i.type==="tool-result"||i.type==="tool-error")&&!i.providerExecuted)&&!(i.type==="text"&&i.text.length===0))switch(i.type){case"text":o.push({type:"text",text:i.text,providerOptions:i.providerMetadata});break;case"reasoning":o.push({type:"reasoning",text:i.text,providerOptions:i.providerMetadata});break;case"file":o.push({type:"file",data:i.file.base64,mediaType:i.file.mediaType,providerOptions:i.providerMetadata});break;case"tool-call":o.push({type:"tool-call",toolCallId:i.toolCallId,toolName:i.toolName,input:i.input,providerExecuted:i.providerExecuted,providerOptions:i.providerMetadata});break;case"tool-result":{let a=await tl({toolCallId:i.toolCallId,input:i.input,tool:t?.[i.toolName],output:i.output,errorMode:"none"});o.push({type:"tool-result",toolCallId:i.toolCallId,toolName:i.toolName,output:a,providerOptions:i.providerMetadata});break}case"tool-error":{let a=await tl({toolCallId:i.toolCallId,input:i.input,tool:t?.[i.toolName],output:i.error,errorMode:"json"});o.push({type:"tool-result",toolCallId:i.toolCallId,toolName:i.toolName,output:a,providerOptions:i.providerMetadata});break}case"tool-approval-request":o.push({type:"tool-approval-request",approvalId:i.approvalId,toolCallId:i.toolCall.toolCallId});break}o.length>0&&r.push({role:"assistant",content:o});let n=[];for(let i of e){if(!(i.type==="tool-result"||i.type==="tool-error")||i.providerExecuted)continue;let a=await tl({toolCallId:i.toolCallId,input:i.input,tool:t?.[i.toolName],output:i.type==="tool-result"?i.output:i.error,errorMode:i.type==="tool-error"?"text":"none"});n.push({type:"tool-result",toolCallId:i.toolCallId,toolName:i.toolName,output:a,...i.providerMetadata!=null?{providerOptions:i.providerMetadata}:{}})}return n.length>0&&r.push({role:"tool",content:n}),r}function F$(...e){let t=e.filter(o=>o!=null);if(t.length===0)return;if(t.length===1)return t[0];let r=new AbortController;for(let o of t){if(o.aborted)return r.abort(o.reason),r.signal;o.addEventListener("abort",()=>{r.abort(o.reason)},{once:!0})}return r.signal}var b5=Po({prefix:"aitxt",size:24});async function z$({model:e,tools:t,toolChoice:r,system:o,prompt:n,messages:i,maxRetries:a,abortSignal:s,timeout:c,headers:l,stopWhen:d=tu(1),experimental_output:f,output:p=f,experimental_telemetry:m,providerOptions:v,experimental_activeTools:g,activeTools:y=g,experimental_prepareStep:E,prepareStep:I=E,experimental_repairToolCall:h,experimental_download:N,experimental_context:L,experimental_include:b,_internal:{generateId:M=b5}={},onStepFinish:P,onFinish:Q,...O}){let ne=Wf(e),we=rl(d),De=vw(c),ge=m$(c),xe=ge!=null?new AbortController:void 0,Ie=F$(s,De!=null?AbortSignal.timeout(De):void 0,xe?.signal),{maxRetries:K,retry:ae}=R$({maxRetries:a,abortSignal:Ie}),ye=dw(O),C=Mo(l??{},`ai/${h$}`),V=I$({model:ne,telemetry:m,headers:C,settings:{...ye,maxRetries:K}}),Y=await S$({system:o,prompt:n,messages:i}),J=E$(m);try{return await il({name:"ai.generateText",attributes:eo({telemetry:m,attributes:{...ol({operationId:"ai.generateText",telemetry:m}),...V,"ai.model.provider":ne.provider,"ai.model.id":ne.modelId,"ai.prompt":{input:()=>JSON.stringify({system:o,prompt:n,messages:i})}}}),tracer:J,fn:async k=>{var re,se,it,X,Ct,cr,Mt,Kr,Ur,Qr,$t;let at=Y.messages,xt=[],{approvedToolApprovals:Yr,deniedToolApprovals:Ze}=O$({messages:at}),ze=Yr.filter(pe=>!pe.toolCall.providerExecuted);if(Ze.length>0||ze.length>0){let pe=await I2({toolCalls:ze.map($=>$.toolCall),tools:t,tracer:J,telemetry:m,messages:at,abortSignal:Ie,experimental_context:L}),Ve=[];for(let $ of pe){let fe=await tl({toolCallId:$.toolCallId,input:$.input,tool:t?.[$.toolName],output:$.type==="tool-result"?$.output:$.error,errorMode:$.type==="tool-error"?"json":"none"});Ve.push({type:"tool-result",toolCallId:$.toolCallId,toolName:$.toolName,output:fe})}for(let $ of Ze)Ve.push({type:"tool-result",toolCallId:$.toolCall.toolCallId,toolName:$.toolCall.toolName,output:{type:"execution-denied",reason:$.approvalResponse.reason,...$.toolCall.providerExecuted&&{providerOptions:{openai:{approvalId:$.approvalResponse.approvalId}}}}});xt.push({role:"tool",content:Ve})}let ke=[...Yr,...Ze].filter(pe=>pe.toolCall.providerExecuted);ke.length>0&&xt.push({role:"tool",content:ke.map(pe=>({type:"tool-approval-response",approvalId:pe.approvalResponse.approvalId,approved:pe.approvalResponse.approved,reason:pe.approvalResponse.reason,providerExecuted:!0}))});let ct=dw(O),de,pt=[],Yt=[],Z=[],R=new Map;do{let pe=ge!=null?setTimeout(()=>xe.abort(),ge):void 0;try{let Ve=[...at,...xt],$=await I?.({model:ne,steps:Z,stepNumber:Z.length,messages:Ve,experimental_context:L}),fe=Wf((re=$?.model)!=null?re:ne),Ae=await y$({prompt:{system:(se=$?.system)!=null?se:Y.system,messages:(it=$?.messages)!=null?it:Ve},supportedUrls:await fe.supportedUrls,download:N});L=(X=$?.experimental_context)!=null?X:L;let{toolChoice:nt,tools:Xt}=await A$({tools:t,toolChoice:(Ct=$?.toolChoice)!=null?Ct:r,activeTools:(cr=$?.activeTools)!=null?cr:y});de=await ae(()=>{var Te;return il({name:"ai.generateText.doGenerate",attributes:eo({telemetry:m,attributes:{...ol({operationId:"ai.generateText.doGenerate",telemetry:m}),...V,"ai.model.provider":fe.provider,"ai.model.id":fe.modelId,"ai.prompt.messages":{input:()=>T$(Ae)},"ai.prompt.tools":{input:()=>Xt?.map(er=>JSON.stringify(er))},"ai.prompt.toolChoice":{input:()=>nt!=null?JSON.stringify(nt):void 0},"gen_ai.system":fe.provider,"gen_ai.request.model":fe.modelId,"gen_ai.request.frequency_penalty":O.frequencyPenalty,"gen_ai.request.max_tokens":O.maxOutputTokens,"gen_ai.request.presence_penalty":O.presencePenalty,"gen_ai.request.stop_sequences":O.stopSequences,"gen_ai.request.temperature":(Te=O.temperature)!=null?Te:void 0,"gen_ai.request.top_k":O.topK,"gen_ai.request.top_p":O.topP}}),tracer:J,fn:async er=>{var na,wo,Pd,Md,qu,Xa,So,Ju;let v0=Jf(v,$?.providerOptions),jt=await fe.doGenerate({...ct,tools:Xt,toolChoice:nt,responseFormat:await p?.responseFormat,prompt:Ae,providerOptions:v0,abortSignal:Ie,headers:C}),Xr={id:(wo=(na=jt.response)==null?void 0:na.id)!=null?wo:M(),timestamp:(Md=(Pd=jt.response)==null?void 0:Pd.timestamp)!=null?Md:new Date,modelId:(Xa=(qu=jt.response)==null?void 0:qu.modelId)!=null?Xa:fe.modelId,headers:(So=jt.response)==null?void 0:So.headers,body:(Ju=jt.response)==null?void 0:Ju.body};return er.setAttributes(await eo({telemetry:m,attributes:{"ai.response.finishReason":jt.finishReason.unified,"ai.response.text":{output:()=>S2(jt.content)},"ai.response.reasoning":{output:()=>w2(jt.content)},"ai.response.toolCalls":{output:()=>{let hi=E2(jt.content);return hi==null?void 0:JSON.stringify(hi)}},"ai.response.id":Xr.id,"ai.response.model":Xr.modelId,"ai.response.timestamp":Xr.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(jt.providerMetadata),"ai.usage.promptTokens":jt.usage.inputTokens.total,"ai.usage.completionTokens":jt.usage.outputTokens.total,"gen_ai.response.finish_reasons":[jt.finishReason.unified],"gen_ai.response.id":Xr.id,"gen_ai.response.model":Xr.modelId,"gen_ai.usage.input_tokens":jt.usage.inputTokens.total,"gen_ai.usage.output_tokens":jt.usage.outputTokens.total}})),{...jt,response:Xr}}})});let Vt=await Promise.all(de.content.filter(Te=>Te.type==="tool-call").map(Te=>M$({toolCall:Te,tools:t,repairToolCall:h,system:o,messages:Ve}))),ft={};for(let Te of Vt){if(Te.invalid)continue;let er=t?.[Te.toolName];er!=null&&(er?.onInputAvailable!=null&&await er.onInputAvailable({input:Te.input,toolCallId:Te.toolCallId,messages:Ve,abortSignal:Ie,experimental_context:L}),await P$({tool:er,toolCall:Te,messages:Ve,experimental_context:L})&&(ft[Te.toolCallId]={type:"tool-approval-request",approvalId:M(),toolCall:Te}))}let Je=Vt.filter(Te=>Te.invalid&&Te.dynamic);Yt=[];for(let Te of Je)Yt.push({type:"tool-error",toolCallId:Te.toolCallId,toolName:Te.toolName,input:Te.input,error:Hs(Te.error),dynamic:!0});pt=Vt.filter(Te=>!Te.providerExecuted),t!=null&&Yt.push(...await I2({toolCalls:pt.filter(Te=>!Te.invalid&&ft[Te.toolCallId]==null),tools:t,tracer:J,telemetry:m,messages:Ve,abortSignal:Ie,experimental_context:L}));for(let Te of Vt){if(!Te.providerExecuted)continue;let er=t?.[Te.toolName];er?.type==="provider"&&er.supportsDeferredResults&&(de.content.some(wo=>wo.type==="tool-result"&&wo.toolCallId===Te.toolCallId)||R.set(Te.toolCallId,{toolName:Te.toolName}))}for(let Te of de.content)Te.type==="tool-result"&&R.delete(Te.toolCallId);let Gn=w5({content:de.content,toolCalls:Vt,toolOutputs:Yt,toolApprovalRequests:Object.values(ft),tools:t});xt.push(...await pw({content:Gn,tools:t}));let mi=(Mt=b?.requestBody)==null||Mt?(Kr=de.request)!=null?Kr:{}:{...de.request,body:void 0},xo={...de.response,messages:structuredClone(xt),body:(Ur=b?.responseBody)==null||Ur?(Qr=de.response)==null?void 0:Qr.body:void 0},Ht=new U$({content:Gn,finishReason:de.finishReason.unified,rawFinishReason:de.finishReason.raw,usage:C$(de.usage),warnings:de.warnings,providerMetadata:de.providerMetadata,request:mi,response:xo});gw({warnings:($t=de.warnings)!=null?$t:[],provider:fe.provider,model:fe.modelId}),Z.push(Ht),await P?.(Ht)}finally{pe!=null&&clearTimeout(pe)}}while((pt.length>0&&Yt.length===pt.length||R.size>0)&&!await L$({stopConditions:we,steps:Z}));k.setAttributes(await eo({telemetry:m,attributes:{"ai.response.finishReason":de.finishReason.unified,"ai.response.text":{output:()=>S2(de.content)},"ai.response.reasoning":{output:()=>w2(de.content)},"ai.response.toolCalls":{output:()=>{let pe=E2(de.content);return pe==null?void 0:JSON.stringify(pe)}},"ai.response.providerMetadata":JSON.stringify(de.providerMetadata),"ai.usage.promptTokens":de.usage.inputTokens.total,"ai.usage.completionTokens":de.usage.outputTokens.total}}));let T=Z[Z.length-1],me=Z.reduce((pe,Ve)=>$$(pe,Ve.usage),{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0});await Q?.({finishReason:T.finishReason,rawFinishReason:T.rawFinishReason,usage:T.usage,content:T.content,text:T.text,reasoningText:T.reasoningText,reasoning:T.reasoning,files:T.files,sources:T.sources,toolCalls:T.toolCalls,staticToolCalls:T.staticToolCalls,dynamicToolCalls:T.dynamicToolCalls,toolResults:T.toolResults,staticToolResults:T.staticToolResults,dynamicToolResults:T.dynamicToolResults,request:T.request,response:T.response,warnings:T.warnings,providerMetadata:T.providerMetadata,steps:Z,totalUsage:me,experimental_context:L});let ue;return T.finishReason==="stop"&&(ue=await(p??qf()).parseCompleteOutput({text:T.text},{response:T.response,usage:T.usage,finishReason:T.finishReason})),new x5({steps:Z,totalUsage:me,output:ue})}})}catch(k){throw _$(k)}}async function I2({toolCalls:e,tools:t,tracer:r,telemetry:o,messages:n,abortSignal:i,experimental_context:a}){return(await Promise.all(e.map(async c=>yw({toolCall:c,tools:t,tracer:r,telemetry:o,messages:n,abortSignal:i,experimental_context:a})))).filter(c=>c!=null)}var x5=class{constructor(e){this.steps=e.steps,this._output=e.output,this.totalUsage=e.totalUsage}get finalStep(){return this.steps[this.steps.length-1]}get content(){return this.finalStep.content}get text(){return this.finalStep.text}get files(){return this.finalStep.files}get reasoningText(){return this.finalStep.reasoningText}get reasoning(){return this.finalStep.reasoning}get toolCalls(){return this.finalStep.toolCalls}get staticToolCalls(){return this.finalStep.staticToolCalls}get dynamicToolCalls(){return this.finalStep.dynamicToolCalls}get toolResults(){return this.finalStep.toolResults}get staticToolResults(){return this.finalStep.staticToolResults}get dynamicToolResults(){return this.finalStep.dynamicToolResults}get sources(){return this.finalStep.sources}get finishReason(){return this.finalStep.finishReason}get rawFinishReason(){return this.finalStep.rawFinishReason}get warnings(){return this.finalStep.warnings}get providerMetadata(){return this.finalStep.providerMetadata}get response(){return this.finalStep.response}get request(){return this.finalStep.request}get usage(){return this.finalStep.usage}get experimental_output(){return this.output}get output(){if(this._output==null)throw new K2;return this._output}};function E2(e){let t=e.filter(r=>r.type==="tool-call");if(t.length!==0)return t.map(r=>({toolCallId:r.toolCallId,toolName:r.toolName,input:r.input}))}function w5({content:e,toolCalls:t,toolOutputs:r,toolApprovalRequests:o,tools:n}){let i=[];for(let a of e)switch(a.type){case"text":case"reasoning":case"source":i.push(a);break;case"file":{i.push({type:"file",file:new D$(a),...a.providerMetadata!=null?{providerMetadata:a.providerMetadata}:{}});break}case"tool-call":{i.push(t.find(s=>s.toolCallId===a.toolCallId));break}case"tool-result":{let s=t.find(c=>c.toolCallId===a.toolCallId);if(s==null){let c=n?.[a.toolName];if(!(c?.type==="provider"&&c.supportsDeferredResults))throw new Error(`Tool call ${a.toolCallId} not found.`);a.isError?i.push({type:"tool-error",toolCallId:a.toolCallId,toolName:a.toolName,input:void 0,error:a.result,providerExecuted:!0,dynamic:a.dynamic}):i.push({type:"tool-result",toolCallId:a.toolCallId,toolName:a.toolName,input:void 0,output:a.result,providerExecuted:!0,dynamic:a.dynamic});break}a.isError?i.push({type:"tool-error",toolCallId:a.toolCallId,toolName:a.toolName,input:s.input,error:a.result,providerExecuted:!0,dynamic:s.dynamic}):i.push({type:"tool-result",toolCallId:a.toolCallId,toolName:a.toolName,input:s.input,output:a.result,providerExecuted:!0,dynamic:s.dynamic});break}case"tool-approval-request":{let s=t.find(c=>c.toolCallId===a.toolCallId);if(s==null)throw new hw({toolCallId:a.toolCallId,approvalId:a.approvalId});i.push({type:"tool-approval-request",approvalId:a.approvalId,toolCall:s});break}}return[...i,...r,...o]}function Kf(e,t){let r=new Headers(e??{});for(let[o,n]of Object.entries(t))r.has(o)||r.set(o,n);return r}function S5({status:e,statusText:t,headers:r,textStream:o}){return new Response(o.pipeThrough(new TextEncoderStream),{status:e??200,statusText:t,headers:Kf(r,{"content-type":"text/plain; charset=utf-8"})})}function B$({response:e,status:t,statusText:r,headers:o,stream:n}){let i=t??200;r!==void 0?e.writeHead(i,r,o):e.writeHead(i,o);let a=n.getReader();(async()=>{try{for(;;){let{done:c,value:l}=await a.read();if(c)break;e.write(l)||await new Promise(f=>{e.once("drain",f)})}}catch(c){throw c}finally{e.end()}})()}function _5({response:e,status:t,statusText:r,headers:o,textStream:n}){B$({response:e,status:t,statusText:r,headers:Object.fromEntries(Kf(o,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:n.pipeThrough(new TextEncoderStream)})}var Z$=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
94
-
95
- `)},flush(e){e.enqueue(`data: [DONE]
96
-
97
- `)}})}},G$={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"};function I5({status:e,statusText:t,headers:r,stream:o,consumeSseStream:n}){let i=o.pipeThrough(new Z$);if(n){let[a,s]=i.tee();i=a,n({stream:s})}return new Response(i.pipeThrough(new TextEncoderStream),{status:e,statusText:t,headers:Kf(r,G$)})}function E5({originalMessages:e,responseMessageId:t}){if(e==null)return;let r=e[e.length-1];return r?.role==="assistant"?r.id:typeof t=="function"?t():t}var Vee=St(()=>vt(u.union([u.strictObject({type:u.literal("text-start"),id:u.string(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("text-delta"),id:u.string(),delta:u.string(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("text-end"),id:u.string(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("error"),errorText:u.string()}),u.strictObject({type:u.literal("tool-input-start"),toolCallId:u.string(),toolName:u.string(),providerExecuted:u.boolean().optional(),providerMetadata:he.optional(),dynamic:u.boolean().optional(),title:u.string().optional()}),u.strictObject({type:u.literal("tool-input-delta"),toolCallId:u.string(),inputTextDelta:u.string()}),u.strictObject({type:u.literal("tool-input-available"),toolCallId:u.string(),toolName:u.string(),input:u.unknown(),providerExecuted:u.boolean().optional(),providerMetadata:he.optional(),dynamic:u.boolean().optional(),title:u.string().optional()}),u.strictObject({type:u.literal("tool-input-error"),toolCallId:u.string(),toolName:u.string(),input:u.unknown(),providerExecuted:u.boolean().optional(),providerMetadata:he.optional(),dynamic:u.boolean().optional(),errorText:u.string(),title:u.string().optional()}),u.strictObject({type:u.literal("tool-approval-request"),approvalId:u.string(),toolCallId:u.string()}),u.strictObject({type:u.literal("tool-output-available"),toolCallId:u.string(),output:u.unknown(),providerExecuted:u.boolean().optional(),dynamic:u.boolean().optional(),preliminary:u.boolean().optional()}),u.strictObject({type:u.literal("tool-output-error"),toolCallId:u.string(),errorText:u.string(),providerExecuted:u.boolean().optional(),dynamic:u.boolean().optional()}),u.strictObject({type:u.literal("tool-output-denied"),toolCallId:u.string()}),u.strictObject({type:u.literal("reasoning-start"),id:u.string(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("reasoning-delta"),id:u.string(),delta:u.string(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("reasoning-end"),id:u.string(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("source-url"),sourceId:u.string(),url:u.string(),title:u.string().optional(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("source-document"),sourceId:u.string(),mediaType:u.string(),title:u.string(),filename:u.string().optional(),providerMetadata:he.optional()}),u.strictObject({type:u.literal("file"),url:u.string(),mediaType:u.string(),providerMetadata:he.optional()}),u.strictObject({type:u.custom(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:u.string().optional(),data:u.unknown(),transient:u.boolean().optional()}),u.strictObject({type:u.literal("start-step")}),u.strictObject({type:u.literal("finish-step")}),u.strictObject({type:u.literal("start"),messageId:u.string().optional(),messageMetadata:u.unknown().optional()}),u.strictObject({type:u.literal("finish"),finishReason:u.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:u.unknown().optional()}),u.strictObject({type:u.literal("abort"),reason:u.string().optional()}),u.strictObject({type:u.literal("message-metadata"),messageMetadata:u.unknown()})])));function k5(e){return e.type.startsWith("data-")}function fw(e){return e.type.startsWith("tool-")}function T5(e){return e.type==="dynamic-tool"}function C5(e){return fw(e)||T5(e)}function k2(e){return e.type.split("-").slice(1).join("-")}function $5({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function N5({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:o,onError:n,onToolCall:i,onData:a}){return e.pipeThrough(new TransformStream({async transform(s,c){await o(async({state:l,write:d})=>{var f,p,m,v;function g(h){let L=l.message.parts.filter(C5).find(b=>b.toolCallId===h);if(L==null)throw new eu({chunkType:"tool-invocation",chunkId:h,message:`No tool invocation found for tool call ID "${h}".`});return L}function y(h){var N;let L=l.message.parts.find(P=>fw(P)&&P.toolCallId===h.toolCallId),b=h,M=L;L!=null?(L.state=h.state,M.input=b.input,M.output=b.output,M.errorText=b.errorText,M.rawInput=b.rawInput,M.preliminary=b.preliminary,h.title!==void 0&&(M.title=h.title),M.providerExecuted=(N=b.providerExecuted)!=null?N:L.providerExecuted,b.providerMetadata!=null&&(L.callProviderMetadata=b.providerMetadata)):l.message.parts.push({type:`tool-${h.toolName}`,toolCallId:h.toolCallId,state:h.state,title:h.title,input:b.input,output:b.output,rawInput:b.rawInput,errorText:b.errorText,providerExecuted:b.providerExecuted,preliminary:b.preliminary,...b.providerMetadata!=null?{callProviderMetadata:b.providerMetadata}:{}})}function E(h){var N,L;let b=l.message.parts.find(Q=>Q.type==="dynamic-tool"&&Q.toolCallId===h.toolCallId),M=h,P=b;b!=null?(b.state=h.state,P.toolName=h.toolName,P.input=M.input,P.output=M.output,P.errorText=M.errorText,P.rawInput=(N=M.rawInput)!=null?N:P.rawInput,P.preliminary=M.preliminary,h.title!==void 0&&(P.title=h.title),P.providerExecuted=(L=M.providerExecuted)!=null?L:b.providerExecuted,M.providerMetadata!=null&&(b.callProviderMetadata=M.providerMetadata)):l.message.parts.push({type:"dynamic-tool",toolName:h.toolName,toolCallId:h.toolCallId,state:h.state,input:M.input,output:M.output,errorText:M.errorText,preliminary:M.preliminary,providerExecuted:M.providerExecuted,title:h.title,...M.providerMetadata!=null?{callProviderMetadata:M.providerMetadata}:{}})}async function I(h){if(h!=null){let N=l.message.metadata!=null?Jf(l.message.metadata,h):h;t!=null&&await Vc({value:N,schema:t,context:{field:"message.metadata",entityId:l.message.id}}),l.message.metadata=N}}switch(s.type){case"text-start":{let h={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeTextParts[s.id]=h,l.message.parts.push(h),d();break}case"text-delta":{let h=l.activeTextParts[s.id];if(h==null)throw new eu({chunkType:"text-delta",chunkId:s.id,message:`Received text-delta for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});h.text+=s.delta,h.providerMetadata=(f=s.providerMetadata)!=null?f:h.providerMetadata,d();break}case"text-end":{let h=l.activeTextParts[s.id];if(h==null)throw new eu({chunkType:"text-end",chunkId:s.id,message:`Received text-end for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});h.state="done",h.providerMetadata=(p=s.providerMetadata)!=null?p:h.providerMetadata,delete l.activeTextParts[s.id],d();break}case"reasoning-start":{let h={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeReasoningParts[s.id]=h,l.message.parts.push(h),d();break}case"reasoning-delta":{let h=l.activeReasoningParts[s.id];if(h==null)throw new eu({chunkType:"reasoning-delta",chunkId:s.id,message:`Received reasoning-delta for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});h.text+=s.delta,h.providerMetadata=(m=s.providerMetadata)!=null?m:h.providerMetadata,d();break}case"reasoning-end":{let h=l.activeReasoningParts[s.id];if(h==null)throw new eu({chunkType:"reasoning-end",chunkId:s.id,message:`Received reasoning-end for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});h.providerMetadata=(v=s.providerMetadata)!=null?v:h.providerMetadata,h.state="done",delete l.activeReasoningParts[s.id],d();break}case"file":{l.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url}),d();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),d();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),d();break}case"tool-input-start":{let h=l.message.parts.filter(fw);l.partialToolCalls[s.toolCallId]={text:"",toolName:s.toolName,index:h.length,dynamic:s.dynamic,title:s.title},s.dynamic?E({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,providerMetadata:s.providerMetadata}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,providerMetadata:s.providerMetadata}),d();break}case"tool-input-delta":{let h=l.partialToolCalls[s.toolCallId];if(h==null)throw new eu({chunkType:"tool-input-delta",chunkId:s.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${s.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});h.text+=s.inputTextDelta;let{value:N}=await al(h.text);h.dynamic?E({toolCallId:s.toolCallId,toolName:h.toolName,state:"input-streaming",input:N,title:h.title}):y({toolCallId:s.toolCallId,toolName:h.toolName,state:"input-streaming",input:N,title:h.title}),d();break}case"tool-input-available":{s.dynamic?E({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title}),d(),i&&!s.providerExecuted&&await i({toolCall:s});break}case"tool-input-error":{s.dynamic?E({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:void 0,rawInput:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),d();break}case"tool-approval-request":{let h=g(s.toolCallId);h.state="approval-requested",h.approval={id:s.approvalId},d();break}case"tool-output-denied":{let h=g(s.toolCallId);h.state="output-denied",d();break}case"tool-output-available":{let h=g(s.toolCallId);h.type==="dynamic-tool"?E({toolCallId:s.toolCallId,toolName:h.toolName,state:"output-available",input:h.input,output:s.output,preliminary:s.preliminary,providerExecuted:s.providerExecuted,title:h.title}):y({toolCallId:s.toolCallId,toolName:k2(h),state:"output-available",input:h.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary,title:h.title}),d();break}case"tool-output-error":{let h=g(s.toolCallId);h.type==="dynamic-tool"?E({toolCallId:s.toolCallId,toolName:h.toolName,state:"output-error",input:h.input,errorText:s.errorText,providerExecuted:s.providerExecuted,title:h.title}):y({toolCallId:s.toolCallId,toolName:k2(h),state:"output-error",input:h.input,rawInput:h.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted,title:h.title}),d();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{s.messageId!=null&&(l.message.id=s.messageId),await I(s.messageMetadata),(s.messageId!=null||s.messageMetadata!=null)&&d();break}case"finish":{s.finishReason!=null&&(l.finishReason=s.finishReason),await I(s.messageMetadata),s.messageMetadata!=null&&d();break}case"message-metadata":{await I(s.messageMetadata),s.messageMetadata!=null&&d();break}case"error":{n?.(new Error(s.errorText));break}default:if(k5(s)){if(r?.[s.type]!=null){let L=l.message.parts.findIndex(M=>"id"in M&&"data"in M&&M.id===s.id&&M.type===s.type),b=L>=0?L:l.message.parts.length;await Vc({value:s.data,schema:r[s.type],context:{field:`message.parts[${b}].data`,entityName:s.type,entityId:s.id}})}let h=s;if(h.transient){a?.(h);break}let N=h.id!=null?l.message.parts.find(L=>h.type===L.type&&h.id===L.id):void 0;N!=null?N.data=h.data:l.message.parts.push(h),a?.(h),d()}}c.enqueue(s)})}}))}function R5({messageId:e,originalMessages:t=[],onFinish:r,onError:o,stream:n}){let i=t?.[t.length-1];i?.role!=="assistant"?i=void 0:e=i.id;let a=!1,s=n.pipeThrough(new TransformStream({transform(p,m){if(p.type==="start"){let v=p;v.messageId==null&&e!=null&&(v.messageId=e)}p.type==="abort"&&(a=!0),m.enqueue(p)}}));if(r==null)return s;let c=$5({lastMessage:i?structuredClone(i):void 0,messageId:e??""}),l=async p=>{await p({state:c,write:()=>{}})},d=!1,f=async()=>{if(d||!r)return;d=!0;let p=c.message.id===i?.id;await r({isAborted:a,isContinuation:p,responseMessage:c.message,messages:[...p?t.slice(0,-1):t,c.message],finishReason:c.finishReason})};return N5({stream:s,runUpdateMessageJob:l,onError:o}).pipeThrough(new TransformStream({transform(p,m){m.enqueue(p)},async cancel(){await f()},async flush(){await f()}}))}function O5({response:e,status:t,statusText:r,headers:o,stream:n,consumeSseStream:i}){let a=n.pipeThrough(new Z$);if(i){let[s,c]=a.tee();a=s,i({stream:c})}B$({response:e,status:t,statusText:r,headers:Object.fromEntries(Kf(o,G$).entries()),stream:a.pipeThrough(new TextEncoderStream)})}function el(e){let t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){let r=this.getReader(),o=!1;async function n(i){var a;if(!o){o=!0;try{i&&await((a=r.cancel)==null?void 0:a.call(r))}finally{try{r.releaseLock()}catch{}}}}return{async next(){if(o)return{done:!0,value:void 0};let{done:i,value:a}=await r.read();return i?(await n(!0),{done:!0,value:void 0}):{done:!1,value:a}},async return(){return await n(!0),{done:!0,value:void 0}},async throw(i){throw await n(!0),i}}},t}async function D5({stream:e,onError:t}){let r=e.getReader();try{for(;;){let{done:o}=await r.read();if(o)break}}catch(o){t?.(o)}finally{r.releaseLock()}}function T2(){let e,t;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function P5(){let e=[],t=null,r=!1,o=T2(),n=()=>{r=!0,o.resolve(),e.forEach(a=>a.cancel()),e=[],t?.close()},i=async()=>{if(r&&e.length===0){t?.close();return}if(e.length===0)return o=T2(),await o.promise,i();try{let{value:a,done:s}=await e[0].read();s?(e.shift(),e.length===0&&r?t?.close():await i()):t?.enqueue(a)}catch(a){t?.error(a),e.shift(),n()}};return{stream:new ReadableStream({start(a){t=a},pull:i,async cancel(){for(let a of e)await a.cancel();e=[],r=!0}}),addStream:a=>{if(r)throw new Error("Cannot add inner stream: outer stream is closed");e.push(a.getReader()),o.resolve()},close:()=>{r=!0,o.resolve(),e.length===0&&t?.close()},terminate:n}}function M5(){var e,t;return(t=(e=globalThis?.performance)==null?void 0:e.now())!=null?t:Date.now()}function j5({tools:e,generatorStream:t,tracer:r,telemetry:o,system:n,messages:i,abortSignal:a,repairToolCall:s,experimental_context:c,generateId:l}){let d=null,f=new ReadableStream({start(h){d=h}}),p=new Set,m=new Map,v=new Map,g=!1,y;function E(){g&&p.size===0&&(y!=null&&d.enqueue(y),d.close())}let I=new TransformStream({async transform(h,N){let L=h.type;switch(L){case"stream-start":case"text-start":case"text-delta":case"text-end":case"reasoning-start":case"reasoning-delta":case"reasoning-end":case"tool-input-start":case"tool-input-delta":case"tool-input-end":case"source":case"response-metadata":case"error":case"raw":{N.enqueue(h);break}case"file":{N.enqueue({type:"file",file:new f5({data:h.data,mediaType:h.mediaType})});break}case"finish":{y={type:"finish",finishReason:h.finishReason.unified,rawFinishReason:h.finishReason.raw,usage:C$(h.usage),providerMetadata:h.providerMetadata};break}case"tool-approval-request":{let b=v.get(h.toolCallId);if(b==null){d.enqueue({type:"error",error:new hw({toolCallId:h.toolCallId,approvalId:h.approvalId})});break}N.enqueue({type:"tool-approval-request",approvalId:h.approvalId,toolCall:b});break}case"tool-call":{try{let b=await M$({toolCall:h,tools:e,repairToolCall:s,system:n,messages:i});if(v.set(b.toolCallId,b),N.enqueue(b),b.invalid){d.enqueue({type:"tool-error",toolCallId:b.toolCallId,toolName:b.toolName,input:b.input,error:Hs(b.error),dynamic:!0,title:b.title});break}let M=e?.[b.toolName];if(M==null)break;if(M.onInputAvailable!=null&&await M.onInputAvailable({input:b.input,toolCallId:b.toolCallId,messages:i,abortSignal:a,experimental_context:c}),await P$({tool:M,toolCall:b,messages:i,experimental_context:c})){d.enqueue({type:"tool-approval-request",approvalId:l(),toolCall:b});break}if(m.set(b.toolCallId,b.input),M.execute!=null&&b.providerExecuted!==!0){let P=l();p.add(P),yw({toolCall:b,tools:e,tracer:r,telemetry:o,messages:i,abortSignal:a,experimental_context:c,onPreliminaryToolResult:Q=>{d.enqueue(Q)}}).then(Q=>{d.enqueue(Q)}).catch(Q=>{d.enqueue({type:"error",error:Q})}).finally(()=>{p.delete(P),E()})}}catch(b){d.enqueue({type:"error",error:b})}break}case"tool-result":{let b=h.toolName;h.isError?d.enqueue({type:"tool-error",toolCallId:h.toolCallId,toolName:b,input:m.get(h.toolCallId),providerExecuted:!0,error:h.result,dynamic:h.dynamic}):N.enqueue({type:"tool-result",toolCallId:h.toolCallId,toolName:b,input:m.get(h.toolCallId),output:h.result,providerExecuted:!0,dynamic:h.dynamic});break}default:{let b=L;throw new Error(`Unhandled chunk type: ${b}`)}}},flush(){g=!0,E()}});return new ReadableStream({async start(h){return Promise.all([t.pipeThrough(I).pipeTo(new WritableStream({write(N){h.enqueue(N)},close(){}})),f.pipeTo(new WritableStream({write(N){h.enqueue(N)},close(){h.close()}}))])}})}var U5=Po({prefix:"aitxt",size:24});function xa({model:e,tools:t,toolChoice:r,system:o,prompt:n,messages:i,maxRetries:a,abortSignal:s,timeout:c,headers:l,stopWhen:d=tu(1),experimental_output:f,output:p=f,experimental_telemetry:m,prepareStep:v,providerOptions:g,experimental_activeTools:y,activeTools:E=y,experimental_repairToolCall:I,experimental_transform:h,experimental_download:N,includeRawChunks:L=!1,onChunk:b,onError:M=({error:Ie})=>{console.error(Ie)},onFinish:P,onAbort:Q,onStepFinish:O,experimental_context:ne,experimental_include:we,_internal:{now:De=M5,generateId:ge=U5}={},...xe}){let Ie=vw(c),K=m$(c),ae=Lz(c),ye=K!=null?new AbortController:void 0,C=ae!=null?new AbortController:void 0;return new F5({model:Wf(e),telemetry:m,headers:l,settings:xe,maxRetries:a,abortSignal:F$(s,Ie!=null?AbortSignal.timeout(Ie):void 0,ye?.signal,C?.signal),stepTimeoutMs:K,stepAbortController:ye,chunkTimeoutMs:ae,chunkAbortController:C,system:o,prompt:n,messages:i,tools:t,toolChoice:r,transforms:rl(h),activeTools:E,repairToolCall:I,stopConditions:rl(d),output:p,providerOptions:g,prepareStep:v,includeRawChunks:L,onChunk:b,onError:M,onFinish:P,onAbort:Q,onStepFinish:O,now:De,generateId:ge,experimental_context:ne,download:N,include:we})}function L5(e){let t,r="",o="",n,i="";function a({controller:s,partialOutput:c=void 0}){s.enqueue({part:{type:"text-delta",id:t,text:o,providerMetadata:n},partialOutput:c}),o=""}return new TransformStream({async transform(s,c){var l;if(s.type==="finish-step"&&o.length>0&&a({controller:c}),s.type!=="text-delta"&&s.type!=="text-start"&&s.type!=="text-end"){c.enqueue({part:s,partialOutput:void 0});return}if(t==null)t=s.id;else if(s.id!==t){c.enqueue({part:s,partialOutput:void 0});return}if(s.type==="text-start"){c.enqueue({part:s,partialOutput:void 0});return}if(s.type==="text-end"){o.length>0&&a({controller:c}),c.enqueue({part:s,partialOutput:void 0});return}r+=s.text,o+=s.text,n=(l=s.providerMetadata)!=null?l:n;let d=await e.parsePartialOutput({text:r});if(d!==void 0){let f=JSON.stringify(d.partial);f!==i&&(a({controller:c,partialOutput:d.partial}),i=f)}}})}var F5=class{constructor({model:e,telemetry:t,headers:r,settings:o,maxRetries:n,abortSignal:i,stepTimeoutMs:a,stepAbortController:s,chunkTimeoutMs:c,chunkAbortController:l,system:d,prompt:f,messages:p,tools:m,toolChoice:v,transforms:g,activeTools:y,repairToolCall:E,stopConditions:I,output:h,providerOptions:N,prepareStep:L,includeRawChunks:b,now:M,generateId:P,onChunk:Q,onError:O,onFinish:ne,onAbort:we,onStepFinish:De,experimental_context:ge,download:xe,include:Ie}){this._totalUsage=new va,this._finishReason=new va,this._rawFinishReason=new va,this._steps=new va,this.outputSpecification=h,this.includeRawChunks=b,this.tools=m;let K,ae=[],ye=[],C,V,Y,J={},k=[],re=[],se=new Map,it,X={},Ct={},cr=new TransformStream({async transform(ze,ke){var ct,de,pt,Yt;ke.enqueue(ze);let{part:Z}=ze;if((Z.type==="text-delta"||Z.type==="reasoning-delta"||Z.type==="source"||Z.type==="tool-call"||Z.type==="tool-result"||Z.type==="tool-input-start"||Z.type==="tool-input-delta"||Z.type==="raw")&&await Q?.({chunk:Z}),Z.type==="error"&&await O({error:_$(Z.error)}),Z.type==="text-start"&&(X[Z.id]={type:"text",text:"",providerMetadata:Z.providerMetadata},ae.push(X[Z.id])),Z.type==="text-delta"){let R=X[Z.id];if(R==null){ke.enqueue({part:{type:"error",error:`text part ${Z.id} not found`},partialOutput:void 0});return}R.text+=Z.text,R.providerMetadata=(ct=Z.providerMetadata)!=null?ct:R.providerMetadata}if(Z.type==="text-end"){let R=X[Z.id];if(R==null){ke.enqueue({part:{type:"error",error:`text part ${Z.id} not found`},partialOutput:void 0});return}R.providerMetadata=(de=Z.providerMetadata)!=null?de:R.providerMetadata,delete X[Z.id]}if(Z.type==="reasoning-start"&&(Ct[Z.id]={type:"reasoning",text:"",providerMetadata:Z.providerMetadata},ae.push(Ct[Z.id])),Z.type==="reasoning-delta"){let R=Ct[Z.id];if(R==null){ke.enqueue({part:{type:"error",error:`reasoning part ${Z.id} not found`},partialOutput:void 0});return}R.text+=Z.text,R.providerMetadata=(pt=Z.providerMetadata)!=null?pt:R.providerMetadata}if(Z.type==="reasoning-end"){let R=Ct[Z.id];if(R==null){ke.enqueue({part:{type:"error",error:`reasoning part ${Z.id} not found`},partialOutput:void 0});return}R.providerMetadata=(Yt=Z.providerMetadata)!=null?Yt:R.providerMetadata,delete Ct[Z.id]}if(Z.type==="file"&&ae.push({type:"file",file:Z.file}),Z.type==="source"&&ae.push(Z),Z.type==="tool-call"&&ae.push(Z),Z.type==="tool-result"&&!Z.preliminary&&ae.push(Z),Z.type==="tool-approval-request"&&ae.push(Z),Z.type==="tool-error"&&ae.push(Z),Z.type==="start-step"&&(ae=[],Ct={},X={},J=Z.request,k=Z.warnings),Z.type==="finish-step"){let R=await pw({content:ae,tools:m}),T=new U$({content:ae,finishReason:Z.finishReason,rawFinishReason:Z.rawFinishReason,usage:Z.usage,warnings:k,request:J,response:{...Z.response,messages:[...ye,...R]},providerMetadata:Z.providerMetadata});await De?.(T),gw({warnings:k,provider:e.provider,model:e.modelId}),re.push(T),ye.push(...R),K.resolve()}Z.type==="finish"&&(Y=Z.totalUsage,C=Z.finishReason,V=Z.rawFinishReason)},async flush(ze){try{if(re.length===0){let pt=i?.aborted?i.reason:new K2({message:"No output generated. Check the stream for errors."});Ze._finishReason.reject(pt),Ze._rawFinishReason.reject(pt),Ze._totalUsage.reject(pt),Ze._steps.reject(pt);return}let ke=C??"other",ct=Y??cw();Ze._finishReason.resolve(ke),Ze._rawFinishReason.resolve(V),Ze._totalUsage.resolve(ct),Ze._steps.resolve(re);let de=re[re.length-1];await ne?.({finishReason:de.finishReason,rawFinishReason:de.rawFinishReason,totalUsage:ct,usage:de.usage,content:de.content,text:de.text,reasoningText:de.reasoningText,reasoning:de.reasoning,files:de.files,sources:de.sources,toolCalls:de.toolCalls,staticToolCalls:de.staticToolCalls,dynamicToolCalls:de.dynamicToolCalls,toolResults:de.toolResults,staticToolResults:de.staticToolResults,dynamicToolResults:de.dynamicToolResults,request:de.request,response:de.response,warnings:de.warnings,providerMetadata:de.providerMetadata,steps:re,experimental_context:ge}),it.setAttributes(await eo({telemetry:t,attributes:{"ai.response.finishReason":ke,"ai.response.text":{output:()=>de.text},"ai.response.reasoning":{output:()=>de.reasoningText},"ai.response.toolCalls":{output:()=>{var pt;return(pt=de.toolCalls)!=null&&pt.length?JSON.stringify(de.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(de.providerMetadata),"ai.usage.inputTokens":ct.inputTokens,"ai.usage.outputTokens":ct.outputTokens,"ai.usage.totalTokens":ct.totalTokens,"ai.usage.reasoningTokens":ct.reasoningTokens,"ai.usage.cachedInputTokens":ct.cachedInputTokens}}))}catch(ke){ze.error(ke)}finally{it.end()}}}),Mt=P5();this.addStream=Mt.addStream,this.closeStream=Mt.close;let Kr=Mt.stream.getReader(),Ur=new ReadableStream({async start(ze){ze.enqueue({type:"start"})},async pull(ze){function ke(){we?.({steps:re}),ze.enqueue({type:"abort",...i?.reason!==void 0?{reason:gn(i.reason)}:{}}),ze.close()}try{let{done:ct,value:de}=await Kr.read();if(ct){ze.close();return}if(i?.aborted){ke();return}ze.enqueue(de)}catch(ct){Ro(ct)&&i?.aborted?ke():ze.error(ct)}},cancel(ze){return Mt.stream.cancel(ze)}});for(let ze of g)Ur=Ur.pipeThrough(ze({tools:m,stopStream(){Mt.terminate()}}));this.baseStream=Ur.pipeThrough(L5(h??qf())).pipeThrough(cr);let{maxRetries:Qr,retry:$t}=R$({maxRetries:n,abortSignal:i}),at=E$(t),xt=dw(o),Yr=I$({model:e,telemetry:t,headers:r,settings:{...xt,maxRetries:Qr}}),Ze=this;il({name:"ai.streamText",attributes:eo({telemetry:t,attributes:{...ol({operationId:"ai.streamText",telemetry:t}),...Yr,"ai.prompt":{input:()=>JSON.stringify({system:d,prompt:f,messages:p})}}}),tracer:at,endWhenDone:!1,fn:async ze=>{it=ze;let ke=await S$({system:d,prompt:f,messages:p}),ct=ke.messages,de=[],{approvedToolApprovals:pt,deniedToolApprovals:Yt}=O$({messages:ct});if(Yt.length>0||pt.length>0){let R=[...pt,...Yt].filter($=>$.toolCall.providerExecuted),T=pt.filter($=>!$.toolCall.providerExecuted),me=Yt.filter($=>!$.toolCall.providerExecuted),ue=Yt.filter($=>$.toolCall.providerExecuted),pe,Ve=new ReadableStream({start($){pe=$}});Ze.addStream(Ve);try{for(let fe of[...me,...ue])pe?.enqueue({type:"tool-output-denied",toolCallId:fe.toolCall.toolCallId,toolName:fe.toolCall.toolName});let $=[];if(await Promise.all(T.map(async fe=>{let Ae=await yw({toolCall:fe.toolCall,tools:m,tracer:at,telemetry:t,messages:ct,abortSignal:i,experimental_context:ge,onPreliminaryToolResult:nt=>{pe?.enqueue(nt)}});Ae!=null&&(pe?.enqueue(Ae),$.push(Ae))})),R.length>0&&de.push({role:"tool",content:R.map(fe=>({type:"tool-approval-response",approvalId:fe.approvalResponse.approvalId,approved:fe.approvalResponse.approved,reason:fe.approvalResponse.reason,providerExecuted:!0}))}),$.length>0||me.length>0){let fe=[];for(let Ae of $)fe.push({type:"tool-result",toolCallId:Ae.toolCallId,toolName:Ae.toolName,output:await tl({toolCallId:Ae.toolCallId,input:Ae.input,tool:m?.[Ae.toolName],output:Ae.type==="tool-result"?Ae.output:Ae.error,errorMode:Ae.type==="tool-error"?"json":"none"})});for(let Ae of me)fe.push({type:"tool-result",toolCallId:Ae.toolCall.toolCallId,toolName:Ae.toolCall.toolName,output:{type:"execution-denied",reason:Ae.approvalResponse.reason}});de.push({role:"tool",content:fe})}}finally{pe?.close()}}ye.push(...de);async function Z({currentStep:R,responseMessages:T,usage:me}){var ue,pe,Ve,$,fe,Ae,nt;let Xt=Ze.includeRawChunks,Vt=a!=null?setTimeout(()=>s.abort(),a):void 0,ft;function Je(){c!=null&&(ft!=null&&clearTimeout(ft),ft=setTimeout(()=>l.abort(),c))}function Gn(){ft!=null&&(clearTimeout(ft),ft=void 0)}function mi(){Vt!=null&&clearTimeout(Vt)}try{K=new va;let xo=[...ct,...T],Ht=await L?.({model:e,steps:re,stepNumber:re.length,messages:xo,experimental_context:ge}),Te=Wf((ue=Ht?.model)!=null?ue:e),er=await y$({prompt:{system:(pe=Ht?.system)!=null?pe:ke.system,messages:(Ve=Ht?.messages)!=null?Ve:xo},supportedUrls:await Te.supportedUrls,download:xe}),{toolChoice:na,tools:wo}=await A$({tools:m,toolChoice:($=Ht?.toolChoice)!=null?$:v,activeTools:(fe=Ht?.activeTools)!=null?fe:y});ge=(Ae=Ht?.experimental_context)!=null?Ae:ge;let Pd=Jf(N,Ht?.providerOptions),{result:{stream:Md,response:qu,request:Xa},doStreamSpan:So,startTimestampMs:Ju}=await $t(()=>il({name:"ai.streamText.doStream",attributes:eo({telemetry:t,attributes:{...ol({operationId:"ai.streamText.doStream",telemetry:t}),...Yr,"ai.model.provider":Te.provider,"ai.model.id":Te.modelId,"ai.prompt.messages":{input:()=>T$(er)},"ai.prompt.tools":{input:()=>wo?.map(be=>JSON.stringify(be))},"ai.prompt.toolChoice":{input:()=>na!=null?JSON.stringify(na):void 0},"gen_ai.system":Te.provider,"gen_ai.request.model":Te.modelId,"gen_ai.request.frequency_penalty":xt.frequencyPenalty,"gen_ai.request.max_tokens":xt.maxOutputTokens,"gen_ai.request.presence_penalty":xt.presencePenalty,"gen_ai.request.stop_sequences":xt.stopSequences,"gen_ai.request.temperature":xt.temperature,"gen_ai.request.top_k":xt.topK,"gen_ai.request.top_p":xt.topP}}),tracer:at,endWhenDone:!1,fn:async be=>({startTimestampMs:M(),doStreamSpan:be,result:await Te.doStream({...xt,tools:wo,toolChoice:na,responseFormat:await h?.responseFormat,prompt:er,providerOptions:Pd,abortSignal:i,headers:r,includeRawChunks:Xt})})})),v0=j5({tools:m,generatorStream:Md,tracer:at,telemetry:t,system:d,messages:xo,repairToolCall:E,abortSignal:i,experimental_context:ge,generateId:P}),jt=(nt=Ie?.requestBody)==null||nt?Xa??{}:{...Xa,body:void 0},Xr=[],hi=[],y0,A0={},es="other",b0,hn=cw(),x0,u1=!0,Vn={id:P(),timestamp:new Date,modelId:e.modelId},c1="";Ze.addStream(v0.pipeThrough(new TransformStream({async transform(be,Wt){var Ku,Qu,jd,mt,Hn;if(Je(),be.type==="stream-start"){y0=be.warnings;return}if(u1){let wt=M()-Ju;u1=!1,So.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":wt}),So.setAttributes({"ai.response.msToFirstChunk":wt}),Wt.enqueue({type:"start-step",request:jt,warnings:y0??[]})}let w0=be.type;switch(w0){case"tool-approval-request":case"text-start":case"text-end":{Wt.enqueue(be);break}case"text-delta":{be.delta.length>0&&(Wt.enqueue({type:"text-delta",id:be.id,text:be.delta,providerMetadata:be.providerMetadata}),c1+=be.delta);break}case"reasoning-start":case"reasoning-end":{Wt.enqueue(be);break}case"reasoning-delta":{Wt.enqueue({type:"reasoning-delta",id:be.id,text:be.delta,providerMetadata:be.providerMetadata});break}case"tool-call":{Wt.enqueue(be),Xr.push(be);break}case"tool-result":{Wt.enqueue(be),be.preliminary||hi.push(be);break}case"tool-error":{Wt.enqueue(be),hi.push(be);break}case"response-metadata":{Vn={id:(Ku=be.id)!=null?Ku:Vn.id,timestamp:(Qu=be.timestamp)!=null?Qu:Vn.timestamp,modelId:(jd=be.modelId)!=null?jd:Vn.modelId};break}case"finish":{hn=be.usage,es=be.finishReason,b0=be.rawFinishReason,x0=be.providerMetadata;let wt=M()-Ju;So.addEvent("ai.stream.finish"),So.setAttributes({"ai.response.msToFinish":wt,"ai.response.avgOutputTokensPerSecond":1e3*((mt=hn.outputTokens)!=null?mt:0)/wt});break}case"file":{Wt.enqueue(be);break}case"source":{Wt.enqueue(be);break}case"tool-input-start":{A0[be.id]=be.toolName;let wt=m?.[be.toolName];wt?.onInputStart!=null&&await wt.onInputStart({toolCallId:be.id,messages:xo,abortSignal:i,experimental_context:ge}),Wt.enqueue({...be,dynamic:(Hn=be.dynamic)!=null?Hn:wt?.type==="dynamic",title:wt?.title});break}case"tool-input-end":{delete A0[be.id],Wt.enqueue(be);break}case"tool-input-delta":{let wt=A0[be.id],S0=m?.[wt];S0?.onInputDelta!=null&&await S0.onInputDelta({inputTextDelta:be.delta,toolCallId:be.id,messages:xo,abortSignal:i,experimental_context:ge}),Wt.enqueue(be);break}case"error":{Wt.enqueue(be),es="error";break}case"raw":{Xt&&Wt.enqueue(be);break}default:{let wt=w0;throw new Error(`Unknown chunk type: ${wt}`)}}},async flush(be){let Wt=Xr.length>0?JSON.stringify(Xr):void 0;try{So.setAttributes(await eo({telemetry:t,attributes:{"ai.response.finishReason":es,"ai.response.text":{output:()=>c1},"ai.response.reasoning":{output:()=>{let mt=ae.filter(Hn=>Hn.type==="reasoning");return mt.length>0?mt.map(Hn=>Hn.text).join(`
98
- `):void 0}},"ai.response.toolCalls":{output:()=>Wt},"ai.response.id":Vn.id,"ai.response.model":Vn.modelId,"ai.response.timestamp":Vn.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(x0),"ai.usage.inputTokens":hn.inputTokens,"ai.usage.outputTokens":hn.outputTokens,"ai.usage.totalTokens":hn.totalTokens,"ai.usage.reasoningTokens":hn.reasoningTokens,"ai.usage.cachedInputTokens":hn.cachedInputTokens,"gen_ai.response.finish_reasons":[es],"gen_ai.response.id":Vn.id,"gen_ai.response.model":Vn.modelId,"gen_ai.usage.input_tokens":hn.inputTokens,"gen_ai.usage.output_tokens":hn.outputTokens}}))}catch{}finally{So.end()}be.enqueue({type:"finish-step",finishReason:es,rawFinishReason:b0,usage:hn,providerMetadata:x0,response:{...Vn,headers:qu?.headers}});let Ku=$$(me,hn);await K.promise;let Qu=Xr.filter(mt=>mt.providerExecuted!==!0),jd=hi.filter(mt=>mt.providerExecuted!==!0);for(let mt of Xr){if(mt.providerExecuted!==!0)continue;let Hn=m?.[mt.toolName];Hn?.type==="provider"&&Hn.supportsDeferredResults&&(hi.some(wt=>(wt.type==="tool-result"||wt.type==="tool-error")&&wt.toolCallId===mt.toolCallId)||se.set(mt.toolCallId,{toolName:mt.toolName}))}for(let mt of hi)(mt.type==="tool-result"||mt.type==="tool-error")&&se.delete(mt.toolCallId);if(mi(),Gn(),(Qu.length>0&&jd.length===Qu.length||se.size>0)&&!await L$({stopConditions:I,steps:re})){T.push(...await pw({content:re[re.length-1].content,tools:m}));try{await Z({currentStep:R+1,responseMessages:T,usage:Ku})}catch(mt){be.enqueue({type:"error",error:mt}),Ze.closeStream()}}else be.enqueue({type:"finish",finishReason:es,rawFinishReason:b0,totalUsage:Ku}),Ze.closeStream()}})))}finally{mi(),Gn()}}await Z({currentStep:0,responseMessages:de,usage:cw()})}}).catch(ze=>{Ze.addStream(new ReadableStream({start(ke){ke.enqueue({type:"error",error:ze}),ke.close()}})),Ze.closeStream()})}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then(e=>e[e.length-1])}get content(){return this.finalStep.then(e=>e.content)}get warnings(){return this.finalStep.then(e=>e.warnings)}get providerMetadata(){return this.finalStep.then(e=>e.providerMetadata)}get text(){return this.finalStep.then(e=>e.text)}get reasoningText(){return this.finalStep.then(e=>e.reasoningText)}get reasoning(){return this.finalStep.then(e=>e.reasoning)}get sources(){return this.finalStep.then(e=>e.sources)}get files(){return this.finalStep.then(e=>e.files)}get toolCalls(){return this.finalStep.then(e=>e.toolCalls)}get staticToolCalls(){return this.finalStep.then(e=>e.staticToolCalls)}get dynamicToolCalls(){return this.finalStep.then(e=>e.dynamicToolCalls)}get toolResults(){return this.finalStep.then(e=>e.toolResults)}get staticToolResults(){return this.finalStep.then(e=>e.staticToolResults)}get dynamicToolResults(){return this.finalStep.then(e=>e.dynamicToolResults)}get usage(){return this.finalStep.then(e=>e.usage)}get request(){return this.finalStep.then(e=>e.request)}get response(){return this.finalStep.then(e=>e.response)}get totalUsage(){return this.consumeStream(),this._totalUsage.promise}get finishReason(){return this.consumeStream(),this._finishReason.promise}get rawFinishReason(){return this.consumeStream(),this._rawFinishReason.promise}teeStream(){let[e,t]=this.baseStream.tee();return this.baseStream=t,e}get textStream(){return el(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){e.type==="text-delta"&&t.enqueue(e.text)}})))}get fullStream(){return el(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){t.enqueue(e)}})))}async consumeStream(e){var t;try{await D5({stream:this.fullStream,onError:e?.onError})}catch(r){(t=e?.onError)==null||t.call(e,r)}}get experimental_partialOutputStream(){return this.partialOutputStream}get partialOutputStream(){return el(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:e},t){e!=null&&t.enqueue(e)}})))}get elementStream(){var e,t,r;let o=(e=this.outputSpecification)==null?void 0:e.createElementStreamTransform();if(o==null)throw new hI({functionality:`element streams in ${(r=(t=this.outputSpecification)==null?void 0:t.name)!=null?r:"text"} mode`});return el(this.teeStream().pipeThrough(o))}get output(){return this.finalStep.then(e=>{var t;return((t=this.outputSpecification)!=null?t:qf()).parseCompleteOutput({text:e.text},{response:e.response,usage:e.usage,finishReason:e.finishReason})})}toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:o,sendReasoning:n=!0,sendSources:i=!1,sendStart:a=!0,sendFinish:s=!0,onError:c=gn}={}){let l=t!=null?E5({originalMessages:e,responseMessageId:t}):void 0,d=p=>{var m;let v=(m=this.tools)==null?void 0:m[p.toolName];return v==null?p.dynamic:v?.type==="dynamic"?!0:void 0},f=this.fullStream.pipeThrough(new TransformStream({transform:async(p,m)=>{let v=o?.({part:p}),g=p.type;switch(g){case"text-start":{m.enqueue({type:"text-start",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"text-delta":{m.enqueue({type:"text-delta",id:p.id,delta:p.text,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"text-end":{m.enqueue({type:"text-end",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"reasoning-start":{m.enqueue({type:"reasoning-start",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"reasoning-delta":{n&&m.enqueue({type:"reasoning-delta",id:p.id,delta:p.text,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"reasoning-end":{m.enqueue({type:"reasoning-end",id:p.id,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"file":{m.enqueue({type:"file",mediaType:p.file.mediaType,url:`data:${p.file.mediaType};base64,${p.file.base64}`});break}case"source":{i&&p.sourceType==="url"&&m.enqueue({type:"source-url",sourceId:p.id,url:p.url,title:p.title,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}}),i&&p.sourceType==="document"&&m.enqueue({type:"source-document",sourceId:p.id,mediaType:p.mediaType,title:p.title,filename:p.filename,...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{}});break}case"tool-input-start":{let y=d(p);m.enqueue({type:"tool-input-start",toolCallId:p.id,toolName:p.toolName,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{},...y!=null?{dynamic:y}:{},...p.title!=null?{title:p.title}:{}});break}case"tool-input-delta":{m.enqueue({type:"tool-input-delta",toolCallId:p.id,inputTextDelta:p.delta});break}case"tool-call":{let y=d(p);p.invalid?m.enqueue({type:"tool-input-error",toolCallId:p.toolCallId,toolName:p.toolName,input:p.input,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{},...y!=null?{dynamic:y}:{},errorText:c(p.error),...p.title!=null?{title:p.title}:{}}):m.enqueue({type:"tool-input-available",toolCallId:p.toolCallId,toolName:p.toolName,input:p.input,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.providerMetadata!=null?{providerMetadata:p.providerMetadata}:{},...y!=null?{dynamic:y}:{},...p.title!=null?{title:p.title}:{}});break}case"tool-approval-request":{m.enqueue({type:"tool-approval-request",approvalId:p.approvalId,toolCallId:p.toolCall.toolCallId});break}case"tool-result":{let y=d(p);m.enqueue({type:"tool-output-available",toolCallId:p.toolCallId,output:p.output,...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...p.preliminary!=null?{preliminary:p.preliminary}:{},...y!=null?{dynamic:y}:{}});break}case"tool-error":{let y=d(p);m.enqueue({type:"tool-output-error",toolCallId:p.toolCallId,errorText:c(p.error),...p.providerExecuted!=null?{providerExecuted:p.providerExecuted}:{},...y!=null?{dynamic:y}:{}});break}case"tool-output-denied":{m.enqueue({type:"tool-output-denied",toolCallId:p.toolCallId});break}case"error":{m.enqueue({type:"error",errorText:c(p.error)});break}case"start-step":{m.enqueue({type:"start-step"});break}case"finish-step":{m.enqueue({type:"finish-step"});break}case"start":{a&&m.enqueue({type:"start",...v!=null?{messageMetadata:v}:{},...l!=null?{messageId:l}:{}});break}case"finish":{s&&m.enqueue({type:"finish",finishReason:p.finishReason,...v!=null?{messageMetadata:v}:{}});break}case"abort":{m.enqueue(p);break}case"tool-input-end":break;case"raw":break;default:{let y=g;throw new Error(`Unknown chunk type: ${y}`)}}v!=null&&g!=="start"&&g!=="finish"&&m.enqueue({type:"message-metadata",messageMetadata:v})}}));return el(R5({stream:f,messageId:l??t?.(),originalMessages:e,onFinish:r,onError:c}))}pipeUIMessageStreamToResponse(e,{originalMessages:t,generateMessageId:r,onFinish:o,messageMetadata:n,sendReasoning:i,sendSources:a,sendFinish:s,sendStart:c,onError:l,...d}={}){O5({response:e,stream:this.toUIMessageStream({originalMessages:t,generateMessageId:r,onFinish:o,messageMetadata:n,sendReasoning:i,sendSources:a,sendFinish:s,sendStart:c,onError:l}),...d})}pipeTextStreamToResponse(e,t){_5({response:e,textStream:this.textStream,...t})}toUIMessageStreamResponse({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:o,sendReasoning:n,sendSources:i,sendFinish:a,sendStart:s,onError:c,...l}={}){return I5({stream:this.toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:o,sendReasoning:n,sendSources:i,sendFinish:a,sendStart:s,onError:c}),...l})}toTextStreamResponse(e){return S5({textStream:this.textStream,...e})}};var Jee=St(()=>vt(u.array(u.object({id:u.string(),role:u.enum(["system","user","assistant"]),metadata:u.unknown().optional(),parts:u.array(u.union([u.object({type:u.literal("text"),text:u.string(),state:u.enum(["streaming","done"]).optional(),providerMetadata:he.optional()}),u.object({type:u.literal("reasoning"),text:u.string(),state:u.enum(["streaming","done"]).optional(),providerMetadata:he.optional()}),u.object({type:u.literal("source-url"),sourceId:u.string(),url:u.string(),title:u.string().optional(),providerMetadata:he.optional()}),u.object({type:u.literal("source-document"),sourceId:u.string(),mediaType:u.string(),title:u.string(),filename:u.string().optional(),providerMetadata:he.optional()}),u.object({type:u.literal("file"),mediaType:u.string(),filename:u.string().optional(),url:u.string(),providerMetadata:he.optional()}),u.object({type:u.literal("step-start")}),u.object({type:u.string().startsWith("data-"),id:u.string().optional(),data:u.unknown()}),u.object({type:u.literal("dynamic-tool"),toolName:u.string(),toolCallId:u.string(),state:u.literal("input-streaming"),input:u.unknown().optional(),providerExecuted:u.boolean().optional(),callProviderMetadata:he.optional(),output:u.never().optional(),errorText:u.never().optional(),approval:u.never().optional()}),u.object({type:u.literal("dynamic-tool"),toolName:u.string(),toolCallId:u.string(),state:u.literal("input-available"),input:u.unknown(),providerExecuted:u.boolean().optional(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.never().optional()}),u.object({type:u.literal("dynamic-tool"),toolName:u.string(),toolCallId:u.string(),state:u.literal("approval-requested"),input:u.unknown(),providerExecuted:u.boolean().optional(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.never().optional(),reason:u.never().optional()})}),u.object({type:u.literal("dynamic-tool"),toolName:u.string(),toolCallId:u.string(),state:u.literal("approval-responded"),input:u.unknown(),providerExecuted:u.boolean().optional(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.boolean(),reason:u.string().optional()})}),u.object({type:u.literal("dynamic-tool"),toolName:u.string(),toolCallId:u.string(),state:u.literal("output-available"),input:u.unknown(),providerExecuted:u.boolean().optional(),output:u.unknown(),errorText:u.never().optional(),callProviderMetadata:he.optional(),preliminary:u.boolean().optional(),approval:u.object({id:u.string(),approved:u.literal(!0),reason:u.string().optional()}).optional()}),u.object({type:u.literal("dynamic-tool"),toolName:u.string(),toolCallId:u.string(),state:u.literal("output-error"),input:u.unknown(),rawInput:u.unknown().optional(),providerExecuted:u.boolean().optional(),output:u.never().optional(),errorText:u.string(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.literal(!0),reason:u.string().optional()}).optional()}),u.object({type:u.literal("dynamic-tool"),toolName:u.string(),toolCallId:u.string(),state:u.literal("output-denied"),input:u.unknown(),providerExecuted:u.boolean().optional(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.literal(!1),reason:u.string().optional()})}),u.object({type:u.string().startsWith("tool-"),toolCallId:u.string(),state:u.literal("input-streaming"),providerExecuted:u.boolean().optional(),callProviderMetadata:he.optional(),input:u.unknown().optional(),output:u.never().optional(),errorText:u.never().optional(),approval:u.never().optional()}),u.object({type:u.string().startsWith("tool-"),toolCallId:u.string(),state:u.literal("input-available"),providerExecuted:u.boolean().optional(),input:u.unknown(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.never().optional()}),u.object({type:u.string().startsWith("tool-"),toolCallId:u.string(),state:u.literal("approval-requested"),input:u.unknown(),providerExecuted:u.boolean().optional(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.never().optional(),reason:u.never().optional()})}),u.object({type:u.string().startsWith("tool-"),toolCallId:u.string(),state:u.literal("approval-responded"),input:u.unknown(),providerExecuted:u.boolean().optional(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.boolean(),reason:u.string().optional()})}),u.object({type:u.string().startsWith("tool-"),toolCallId:u.string(),state:u.literal("output-available"),providerExecuted:u.boolean().optional(),input:u.unknown(),output:u.unknown(),errorText:u.never().optional(),callProviderMetadata:he.optional(),preliminary:u.boolean().optional(),approval:u.object({id:u.string(),approved:u.literal(!0),reason:u.string().optional()}).optional()}),u.object({type:u.string().startsWith("tool-"),toolCallId:u.string(),state:u.literal("output-error"),providerExecuted:u.boolean().optional(),input:u.unknown(),rawInput:u.unknown().optional(),output:u.never().optional(),errorText:u.string(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.literal(!0),reason:u.string().optional()}).optional()}),u.object({type:u.string().startsWith("tool-"),toolCallId:u.string(),state:u.literal("output-denied"),providerExecuted:u.boolean().optional(),input:u.unknown(),output:u.never().optional(),errorText:u.never().optional(),callProviderMetadata:he.optional(),approval:u.object({id:u.string(),approved:u.literal(!1),reason:u.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")));var Qee=Po({prefix:"aiobj",size:24});var Xee=Po({prefix:"aiobj",size:24});var z5="AI_NoSuchProviderError",B5=`vercel.ai.error.${z5}`,Z5=Symbol.for(B5),G5;G5=Z5;var{btoa:bte,atob:xte}=globalThis;var K$="AI_DownloadError",Q$=`vercel.ai.error.${K$}`,V5=Symbol.for(Q$),V$,H$,Ste=class extends(H$=W,V$=V5,H$){constructor({url:e,statusCode:t,statusText:r,cause:o,message:n=o==null?`Failed to download ${e}: ${t} ${r}`:`Failed to download ${e}: ${o}`}){super({name:K$,message:n,cause:o}),this[V$]=!0,this.url=e,this.statusCode=t,this.statusText=r}static isInstance(e){return W.hasMarker(e,Q$)}},_te=2*1024*1024*1024;var H5=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:o="-"}={})=>{let n=()=>{let i=r.length,a=new Array(t);for(let s=0;s<t;s++)a[s]=r[Math.random()*i|0];return a.join("")};if(e==null)return n;if(r.includes(o))throw new Ld({argument:"separator",message:`The separator "${o}" must not be part of the alphabet "${r}".`});return()=>`${e}${o}${n()}`},Ete=H5();function Qf(e=globalThis){var t,r,o;return e.window?"runtime/browser":(t=e.navigator)!=null&&t.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(o=(r=e.process)==null?void 0:r.versions)!=null&&o.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function W5(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((r,o)=>{t[o.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(let[r,o]of e)o!=null&&(t[r.toLowerCase()]=o)}return t}function Yf(e,...t){let r=new Headers(W5(e)),o=r.get("user-agent")||"";return r.set("user-agent",[o,...t].filter(Boolean).join(" ")),Object.fromEntries(r.entries())}var q5=/"__proto__"\s*:/,J5=/"constructor"\s*:/;function W$(e){let t=JSON.parse(e);return t===null||typeof t!="object"||q5.test(e)===!1&&J5.test(e)===!1?t:K5(t)}function K5(e){let t=[e];for(;t.length;){let r=t;t=[];for(let o of r){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(let n in o){let i=o[n];i&&typeof i=="object"&&t.push(i)}}}return e}function Q5(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return W$(e)}try{return W$(e)}finally{Error.stackTraceLimit=t}}function Sw(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;let{properties:r}=e;if(r!=null)for(let o of Object.keys(r))r[o]=wa(r[o])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(wa):wa(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(wa)),e.allOf!=null&&(e.allOf=e.allOf.map(wa)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(wa));let{definitions:t}=e;if(t!=null)for(let r of Object.keys(t))t[r]=wa(t[r]);return e}function wa(e){return typeof e=="boolean"?e:Sw(e)}var Y5=Symbol("Let zodToJsonSchema decide on which parser to use"),q$={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},X5=e=>typeof e=="string"?{...q$,name:e}:{...q$,...e};function Gr(){return{}}function eB(e,t){var r,o,n;let i={type:"array"};return(r=e.type)!=null&&r._def&&((n=(o=e.type)==null?void 0:o._def)==null?void 0:n.typeName)!==S.ZodAny&&(i.items=Qe(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}function tB(e){let t={type:"integer",format:"int64"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function rB(){return{type:"boolean"}}function Y$(e,t){return Qe(e.type._def,t)}var nB=(e,t)=>Qe(e.innerType._def,t);function X$(e,t,r){let o=r??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>X$(e,t,n))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return oB(e)}}var oB=e=>{let t={type:"integer",format:"unix-time"};for(let r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value;break}return t};function iB(e,t){return{...Qe(e.innerType._def,t),default:e.defaultValue()}}function aB(e,t){return t.effectStrategy==="input"?Qe(e.schema._def,t):Gr()}function sB(e){return{type:"string",enum:Array.from(e.values)}}var uB=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function cB(e,t){let r=[Qe(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Qe(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(n=>!!n),o=[];return r.forEach(n=>{if(uB(n))o.push(...n.allOf);else{let i=n;if("additionalProperties"in n&&n.additionalProperties===!1){let{additionalProperties:a,...s}=n;i=s}o.push(i)}}),o.length?{allOf:o}:void 0}function lB(e){let t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var Aw=void 0,In={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Aw===void 0&&(Aw=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Aw),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function eN(e,t){let r={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"email":switch(t.emailStrategy){case"format:email":En(r,"email",o.message,t);break;case"format:idn-email":En(r,"idn-email",o.message,t);break;case"pattern:zod":Ar(r,In.email,o.message,t);break}break;case"url":En(r,"uri",o.message,t);break;case"uuid":En(r,"uuid",o.message,t);break;case"regex":Ar(r,o.regex,o.message,t);break;case"cuid":Ar(r,In.cuid,o.message,t);break;case"cuid2":Ar(r,In.cuid2,o.message,t);break;case"startsWith":Ar(r,RegExp(`^${bw(o.value,t)}`),o.message,t);break;case"endsWith":Ar(r,RegExp(`${bw(o.value,t)}$`),o.message,t);break;case"datetime":En(r,"date-time",o.message,t);break;case"date":En(r,"date",o.message,t);break;case"time":En(r,"time",o.message,t);break;case"duration":En(r,"duration",o.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value;break;case"includes":{Ar(r,RegExp(bw(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&En(r,"ipv4",o.message,t),o.version!=="v4"&&En(r,"ipv6",o.message,t);break}case"base64url":Ar(r,In.base64url,o.message,t);break;case"jwt":Ar(r,In.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&Ar(r,In.ipv4Cidr,o.message,t),o.version!=="v4"&&Ar(r,In.ipv6Cidr,o.message,t);break}case"emoji":Ar(r,In.emoji(),o.message,t);break;case"ulid":{Ar(r,In.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{En(r,"binary",o.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{Ar(r,In.base64,o.message,t);break}}break}case"nanoid":Ar(r,In.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function bw(e,t){return t.patternStrategy==="escape"?pB(e):e}var dB=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function pB(e){let t="";for(let r=0;r<e.length;r++)dB.has(e[r])||(t+="\\"),t+=e[r];return t}function En(e,t,r,o){var n;e.format||(n=e.anyOf)!=null&&n.some(i=>i.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...r&&o.errorMessages&&{errorMessage:{format:r}}})):e.format=t}function Ar(e,t,r,o){var n;e.pattern||(n=e.allOf)!=null&&n.some(i=>i.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:J$(t,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=J$(t,o)}function J$(e,t){var r;if(!t.applyRegexFlags||!e.flags)return e.source;let o={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=o.i?e.source.toLowerCase():e.source,i="",a=!1,s=!1,c=!1;for(let l=0;l<n.length;l++){if(a){i+=n[l],a=!1;continue}if(o.i){if(s){if(n[l].match(/[a-z]/)){c?(i+=n[l],i+=`${n[l-2]}-${n[l]}`.toUpperCase(),c=!1):n[l+1]==="-"&&((r=n[l+2])!=null&&r.match(/[a-z]/))?(i+=n[l],c=!0):i+=`${n[l]}${n[l].toUpperCase()}`;continue}}else if(n[l].match(/[a-z]/)){i+=`[${n[l]}${n[l].toUpperCase()}]`;continue}}if(o.m){if(n[l]==="^"){i+=`(^|(?<=[\r
99
- ]))`;continue}else if(n[l]==="$"){i+=`($|(?=[\r
100
- ]))`;continue}}if(o.s&&n[l]==="."){i+=s?`${n[l]}\r
101
- `:`[${n[l]}\r
102
- ]`;continue}i+=n[l],n[l]==="\\"?a=!0:s&&n[l]==="]"?s=!1:!s&&n[l]==="["&&(s=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function tN(e,t){var r,o,n,i,a,s;let c={type:"object",additionalProperties:(r=Qe(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((o=e.keyType)==null?void 0:o._def.typeName)===S.ZodString&&((n=e.keyType._def.checks)!=null&&n.length)){let{type:l,...d}=eN(e.keyType._def,t);return{...c,propertyNames:d}}else{if(((i=e.keyType)==null?void 0:i._def.typeName)===S.ZodEnum)return{...c,propertyNames:{enum:e.keyType._def.values}};if(((a=e.keyType)==null?void 0:a._def.typeName)===S.ZodBranded&&e.keyType._def.type._def.typeName===S.ZodString&&((s=e.keyType._def.type._def.checks)!=null&&s.length)){let{type:l,...d}=Y$(e.keyType._def,t);return{...c,propertyNames:d}}}return c}function fB(e,t){if(t.mapStrategy==="record")return tN(e,t);let r=Qe(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Gr(),o=Qe(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Gr();return{type:"array",maxItems:125,items:{type:"array",items:[r,o],minItems:2,maxItems:2}}}function mB(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function hB(){return{not:Gr()}}function gB(){return{type:"null"}}var xw={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function vB(e,t){let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in xw&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let a=xw[i._def.typeName];return a&&!n.includes(a)?[...n,a]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((n,i)=>{let a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...n,a];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(o.length===r.length){let n=o.filter((i,a,s)=>s.indexOf(i)===a);return{type:n.length>1?n:n[0],enum:r.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return yB(e,t)}var yB=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>Qe(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function AB(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[xw[e.innerType._def.typeName],"null"]};let r=Qe(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function bB(e){let t={type:"number"};if(!e.checks)return t;for(let r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function xB(e,t){let r={type:"object",properties:{}},o=[],n=e.shape();for(let a in n){let s=n[a];if(s===void 0||s._def===void 0)continue;let c=SB(s),l=Qe(s._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});l!==void 0&&(r.properties[a]=l,c||o.push(a))}o.length&&(r.required=o);let i=wB(e,t);return i!==void 0&&(r.additionalProperties=i),r}function wB(e,t){if(e.catchall._def.typeName!=="ZodNever")return Qe(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function SB(e){try{return e.isOptional()}catch{return!0}}var _B=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Qe(e.innerType._def,t);let o=Qe(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return o?{anyOf:[{not:Gr()},o]}:Gr()},IB=(e,t)=>{if(t.pipeStrategy==="input")return Qe(e.in._def,t);if(t.pipeStrategy==="output")return Qe(e.out._def,t);let r=Qe(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=Qe(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function EB(e,t){return Qe(e.type._def,t)}function kB(e,t){let o={type:"array",uniqueItems:!0,items:Qe(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}function TB(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>Qe(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:Qe(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>Qe(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function CB(){return{not:Gr()}}function $B(){return Gr()}var NB=(e,t)=>Qe(e.innerType._def,t),RB=(e,t,r)=>{switch(t){case S.ZodString:return eN(e,r);case S.ZodNumber:return bB(e);case S.ZodObject:return xB(e,r);case S.ZodBigInt:return tB(e);case S.ZodBoolean:return rB();case S.ZodDate:return X$(e,r);case S.ZodUndefined:return CB();case S.ZodNull:return gB();case S.ZodArray:return eB(e,r);case S.ZodUnion:case S.ZodDiscriminatedUnion:return vB(e,r);case S.ZodIntersection:return cB(e,r);case S.ZodTuple:return TB(e,r);case S.ZodRecord:return tN(e,r);case S.ZodLiteral:return lB(e);case S.ZodEnum:return sB(e);case S.ZodNativeEnum:return mB(e);case S.ZodNullable:return AB(e,r);case S.ZodOptional:return _B(e,r);case S.ZodMap:return fB(e,r);case S.ZodSet:return kB(e,r);case S.ZodLazy:return()=>e.getter()._def;case S.ZodPromise:return EB(e,r);case S.ZodNaN:case S.ZodNever:return hB();case S.ZodEffects:return aB(e,r);case S.ZodAny:return Gr();case S.ZodUnknown:return $B();case S.ZodDefault:return iB(e,r);case S.ZodBranded:return Y$(e,r);case S.ZodReadonly:return NB(e,r);case S.ZodCatch:return nB(e,r);case S.ZodPipeline:return IB(e,r);case S.ZodFunction:case S.ZodVoid:case S.ZodSymbol:return;default:return(o=>{})(t)}},OB=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Qe(e,t,r=!1){var o;let n=t.seen.get(e);if(t.override){let c=(o=t.override)==null?void 0:o.call(t,e,t,n,r);if(c!==Y5)return c}if(n&&!r){let c=DB(n,t);if(c!==void 0)return c}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=RB(e,e.typeName,t),s=typeof a=="function"?Qe(a(),t):a;if(s&&PB(e,t,s),t.postProcess){let c=t.postProcess(s,e,t);return i.jsonSchema=s,c}return i.jsonSchema=s,s}var DB=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:OB(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,o)=>t.currentPath[o]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Gr()):t.$refStrategy==="seen"?Gr():void 0}},PB=(e,t,r)=>(e.description&&(r.description=e.description),r),MB=e=>{let t=X5(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}},jB=(e,t)=>{var r;let o=MB(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[d,f])=>{var p;return{...l,[d]:(p=Qe(f._def,{...o,currentPath:[...o.basePath,o.definitionPath,d]},!0))!=null?p:Gr()}},{}):void 0,i=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,a=(r=Qe(e._def,i===void 0?o:{...o,currentPath:[...o.basePath,o.definitionPath,i]},!1))!=null?r:Gr(),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(a.title=s);let c=i===void 0?n?{...a,[o.definitionPath]:n}:a:{$ref:[...o.$refStrategy==="relative"?[]:o.basePath,o.definitionPath,i].join("/"),[o.definitionPath]:{...n,[i]:a}};return c.$schema="http://json-schema.org/draft-07/schema#",c},ww=Symbol.for("vercel.ai.schema");function ru(e,{validate:t}={}){return{[ww]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function UB(e){return typeof e=="object"&&e!==null&&ww in e&&e[ww]===!0&&"jsonSchema"in e&&"validate"in e}function _w(e){return e==null?ru({properties:{},additionalProperties:!1}):UB(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?ZB(e):LB(e):e()}function LB(e){return ru(()=>Sw(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{let r=await e["~standard"].validate(t);return"value"in r?{success:!0,value:r.value}:{success:!1,error:new qt({value:t,cause:r.issues})}}})}function FB(e,t){var r;let o=(r=t?.useReferences)!=null?r:!1;return ru(()=>jB(e,{$refStrategy:o?"root":"none"}),{validate:async n=>{let i=await e.safeParseAsync(n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function zB(e,t){var r;let o=(r=t?.useReferences)!=null?r:!1;return ru(()=>Sw(ki(e,{target:"draft-7",io:"input",reused:o?"ref":"inline"})),{validate:async n=>{let i=await da(e,n);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}function BB(e){return"_zod"in e}function ZB(e,t){return BB(e)?zB(e,t):FB(e,t)}async function Iw({value:e,schema:t,context:r}){let o=_w(t);try{if(o.validate==null)return{success:!0,value:e,rawValue:e};let n=await o.validate(e);return n.success?{success:!0,value:n.value,rawValue:e}:{success:!1,error:qt.wrap({value:e,cause:n.error,context:r}),rawValue:e}}catch(n){return{success:!1,error:qt.wrap({value:e,cause:n,context:r}),rawValue:e}}}async function rN({text:e,schema:t}){try{let r=Q5(e);return t==null?{success:!0,value:r,rawValue:r}:await Iw({value:r,schema:t})}catch(r){return{success:!1,error:gi.isInstance(r)?r:new gi({text:e,cause:r}),rawValue:void 0}}}function nN(e){return{...e,type:"dynamic"}}var Ew;Ew=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);async function GB(e){return(await Ew).getRandomValues(new Uint8Array(e))}async function VB(e){let t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%t.length,o="";for(;o.length<e;){let n=await GB(e-o.length);for(let i of n)i<r&&(o+=t[i%t.length])}return o}async function HB(e){return await VB(e)}async function WB(e){let t=await(await Ew).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function kw(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await HB(e),r=await WB(t);return{code_verifier:t,code_challenge:r}}var qB="AI_MCPClientError",dN=`vercel.ai.error.${qB}`,JB=Symbol.for(dN),oN,iN,Ge=class extends(iN=W,oN=JB,iN){constructor({name:e="MCPClientError",message:t,cause:r,data:o,code:n}){super({name:e,message:t,cause:r}),this[oN]=!0,this.data=o,this.code=n}static isInstance(e){return W.hasMarker(e,dN)}},ou="2025-06-18",KB=[ou,"2025-03-26","2024-11-05"],QB=u.optional(u.record(u.string(),u.unknown())),YB=u.looseObject({name:u.string(),version:u.string()}),im=u.looseObject({_meta:u.optional(u.object({}).loose())}),Bo=im,pN=u.object({method:u.string(),params:u.optional(im)}),fN=u.object({applyDefaults:u.optional(u.boolean())}).loose(),XB=u.looseObject({experimental:u.optional(u.object({}).loose()),logging:u.optional(u.object({}).loose()),prompts:u.optional(u.looseObject({listChanged:u.optional(u.boolean())})),resources:u.optional(u.looseObject({subscribe:u.optional(u.boolean()),listChanged:u.optional(u.boolean())})),tools:u.optional(u.looseObject({listChanged:u.optional(u.boolean())})),elicitation:u.optional(fN)}),Zte=u.object({elicitation:u.optional(fN)}).loose(),e9=Bo.extend({protocolVersion:u.string(),capabilities:XB,serverInfo:YB,instructions:u.optional(u.string())}),Cw=Bo.extend({nextCursor:u.optional(u.string())}),t9=u.object({name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),inputSchema:u.object({type:u.literal("object"),properties:u.optional(u.object({}).loose())}).loose(),outputSchema:u.optional(u.object({}).loose()),annotations:u.optional(u.object({title:u.optional(u.string())}).loose()),_meta:QB}).loose(),r9=Cw.extend({tools:u.array(t9)}),mN=u.object({type:u.literal("text"),text:u.string()}).loose(),hN=u.object({type:u.literal("image"),data:u.base64(),mimeType:u.string()}).loose(),n9=u.object({uri:u.string(),name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),mimeType:u.optional(u.string()),size:u.optional(u.number())}).loose(),o9=Cw.extend({resources:u.array(n9)}),gN=u.object({uri:u.string(),name:u.optional(u.string()),title:u.optional(u.string()),mimeType:u.optional(u.string())}).loose(),vN=gN.extend({text:u.string()}),yN=gN.extend({blob:u.base64()}),AN=u.object({type:u.literal("resource"),resource:u.union([vN,yN])}).loose(),i9=Bo.extend({content:u.array(u.union([mN,hN,AN])),structuredContent:u.optional(u.unknown()),isError:u.boolean().default(!1).optional()}).or(Bo.extend({toolResult:u.unknown()})),a9=u.object({uriTemplate:u.string(),name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),mimeType:u.optional(u.string())}).loose(),s9=Bo.extend({resourceTemplates:u.array(a9)}),u9=Bo.extend({contents:u.array(u.union([vN,yN]))}),c9=u.object({name:u.string(),description:u.optional(u.string()),required:u.optional(u.boolean())}).loose(),l9=u.object({name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),arguments:u.optional(u.array(c9))}).loose(),d9=Cw.extend({prompts:u.array(l9)}),p9=u.object({role:u.union([u.literal("user"),u.literal("assistant")]),content:u.union([mN,hN,AN])}).loose(),f9=Bo.extend({description:u.optional(u.string()),messages:u.array(p9)}),m9=im.extend({message:u.string(),requestedSchema:u.unknown()}),aN=pN.extend({method:u.literal("elicitation/create"),params:m9}),h9=Bo.extend({action:u.union([u.literal("accept"),u.literal("decline"),u.literal("cancel")]),content:u.optional(u.record(u.string(),u.unknown()))}),am="2.0",g9=u.object({jsonrpc:u.literal(am),id:u.union([u.string(),u.number().int()])}).merge(pN).strict(),v9=u.object({jsonrpc:u.literal(am),id:u.union([u.string(),u.number().int()]),result:Bo}).strict(),y9=u.object({jsonrpc:u.literal(am),id:u.union([u.string(),u.number().int()]),error:u.object({code:u.number().int(),message:u.string(),data:u.optional(u.unknown())})}).strict(),A9=u.object({jsonrpc:u.literal(am)}).merge(u.object({method:u.string(),params:u.optional(im)})).strict(),sl=u.union([g9,A9,v9,y9]),bN=typeof __PACKAGE_VERSION__<"u"?__PACKAGE_VERSION__:"0.0.0-test",xN=u.object({access_token:u.string(),id_token:u.string().optional(),token_type:u.string(),expires_in:u.number().optional(),scope:u.string().optional(),refresh_token:u.string().optional()}).strip(),$r=u.string().url().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:u.ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),u.NEVER}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),b9=u.object({resource:u.string().url(),authorization_servers:u.array($r).optional(),jwks_uri:u.string().url().optional(),scopes_supported:u.array(u.string()).optional(),bearer_methods_supported:u.array(u.string()).optional(),resource_signing_alg_values_supported:u.array(u.string()).optional(),resource_name:u.string().optional(),resource_documentation:u.string().optional(),resource_policy_uri:u.string().url().optional(),resource_tos_uri:u.string().url().optional(),tls_client_certificate_bound_access_tokens:u.boolean().optional(),authorization_details_types_supported:u.array(u.string()).optional(),dpop_signing_alg_values_supported:u.array(u.string()).optional(),dpop_bound_access_tokens_required:u.boolean().optional()}).passthrough(),wN=u.object({issuer:u.string(),authorization_endpoint:$r,token_endpoint:$r,registration_endpoint:$r.optional(),scopes_supported:u.array(u.string()).optional(),response_types_supported:u.array(u.string()),grant_types_supported:u.array(u.string()).optional(),code_challenge_methods_supported:u.array(u.string()),token_endpoint_auth_methods_supported:u.array(u.string()).optional(),token_endpoint_auth_signing_alg_values_supported:u.array(u.string()).optional()}).passthrough(),x9=u.object({issuer:u.string(),authorization_endpoint:$r,token_endpoint:$r,userinfo_endpoint:$r.optional(),jwks_uri:$r,registration_endpoint:$r.optional(),scopes_supported:u.array(u.string()).optional(),response_types_supported:u.array(u.string()),grant_types_supported:u.array(u.string()).optional(),subject_types_supported:u.array(u.string()),id_token_signing_alg_values_supported:u.array(u.string()),claims_supported:u.array(u.string()).optional(),token_endpoint_auth_methods_supported:u.array(u.string()).optional()}).passthrough(),w9=x9.merge(wN.pick({code_challenge_methods_supported:!0})),S9=u.object({client_id:u.string(),client_secret:u.string().optional(),client_id_issued_at:u.number().optional(),client_secret_expires_at:u.number().optional()}).strip(),_9=u.object({redirect_uris:u.array($r),token_endpoint_auth_method:u.string().optional(),grant_types:u.array(u.string()).optional(),response_types:u.array(u.string()).optional(),client_name:u.string().optional(),client_uri:$r.optional(),logo_uri:$r.optional(),scope:u.string().optional(),contacts:u.array(u.string()).optional(),tos_uri:$r.optional(),policy_uri:u.string().optional(),jwks_uri:$r.optional(),jwks:u.any().optional(),software_id:u.string().optional(),software_version:u.string().optional(),software_statement:u.string().optional()}).strip(),I9=u.object({error:u.string(),error_description:u.string().optional(),error_uri:u.string().optional()}),E9=_9.merge(S9),k9="AI_MCPClientOAuthError",SN=`vercel.ai.error.${k9}`,T9=Symbol.for(SN),sN,uN,ul=class extends(uN=W,sN=T9,uN){constructor({name:e="MCPClientOAuthError",message:t,cause:r}){super({name:e,message:t,cause:r}),this[sN]=!0}static isInstance(e){return W.hasMarker(e,SN)}},nu=class extends ul{};nu.errorCode="server_error";var Xf=class extends ul{};Xf.errorCode="invalid_client";var em=class extends ul{};em.errorCode="invalid_grant";var tm=class extends ul{};tm.errorCode="unauthorized_client";var C9={[nu.errorCode]:nu,[Xf.errorCode]:Xf,[em.errorCode]:em,[tm.errorCode]:tm};function $9(e){let t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function N9({requestedResource:e,configuredResource:t}){let r=typeof e=="string"?new URL(e):new URL(e.href),o=typeof t=="string"?new URL(t):new URL(t.href);if(r.origin!==o.origin||r.pathname.length<o.pathname.length)return!1;let n=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",i=o.pathname.endsWith("/")?o.pathname:o.pathname+"/";return n.startsWith(i)}var rm=class extends Error{constructor(e="Unauthorized"){super(e),this.name="UnauthorizedError"}};function nm(e){var t;let r=(t=e.headers.get("www-authenticate"))!=null?t:e.headers.get("WWW-Authenticate");if(!r)return;let[o,n]=r.split(" ");if(o.toLowerCase()!=="bearer"||!n)return;let i=/resource_metadata="([^"]*)"/,a=r.match(i);if(a)try{return new URL(a[1])}catch{return}}function R9(e,t="",r={}){return t.endsWith("/")&&(t=t.slice(0,-1)),r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function $w(e,t,r=fetch){try{return await r(e,{headers:t})}catch(o){if(o instanceof TypeError)return t?$w(e,void 0,r):void 0;throw o}}async function cN(e,t,r=fetch){return await $w(e,{"MCP-Protocol-Version":t},r)}function O9(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function D9(e,t,r,o){var n,i;let a=new URL(e),s=(n=o?.protocolVersion)!=null?n:ou,c;if(o?.metadataUrl)c=new URL(o.metadataUrl);else{let d=R9(t,a.pathname);c=new URL(d,(i=o?.metadataServerUrl)!=null?i:a),c.search=a.search}let l=await cN(c,s,r);if(!o?.metadataUrl&&O9(l,a.pathname)){let d=new URL(`/.well-known/${t}`,a);l=await cN(d,s,r)}return l}async function P9(e,t,r=fetch){let o=await D9(e,"oauth-protected-resource",r,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!o||o.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!o.ok)throw new Error(`HTTP ${o.status} trying to load well-known OAuth protected resource metadata.`);return b9.parse(await o.json())}function M9(e){let t=typeof e=="string"?new URL(e):e,r=t.pathname!=="/",o=[];if(!r)return o.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),o.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),o;let n=t.pathname;return n.endsWith("/")&&(n=n.slice(0,-1)),o.push({url:new URL(`/.well-known/oauth-authorization-server${n}`,t.origin),type:"oauth"}),o.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),o.push({url:new URL(`/.well-known/openid-configuration${n}`,t.origin),type:"oidc"}),o.push({url:new URL(`${n}/.well-known/openid-configuration`,t.origin),type:"oidc"}),o}async function j9(e,{fetchFn:t=fetch,protocolVersion:r=ou}={}){var o;let n={"MCP-Protocol-Version":r},i=M9(e);for(let{url:a,type:s}of i){let c=await $w(a,n,t);if(c){if(!c.ok){if(c.status>=400&&c.status<500)continue;throw new Error(`HTTP ${c.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${a}`)}if(s==="oauth")return wN.parse(await c.json());{let l=w9.parse(await c.json());if(!((o=l.code_challenge_methods_supported)!=null&&o.includes("S256")))throw new Error(`Incompatible OIDC provider at ${a}: does not support S256 code challenge method required by MCP specification`);return l}}}}async function U9(e,{metadata:t,clientInformation:r,redirectUrl:o,scope:n,state:i,resource:a}){let s="code",c="S256",l;if(t){if(l=new URL(t.authorization_endpoint),!t.response_types_supported.includes(s))throw new Error(`Incompatible auth server: does not support response type ${s}`);if(!t.code_challenge_methods_supported||!t.code_challenge_methods_supported.includes(c))throw new Error(`Incompatible auth server: does not support code challenge method ${c}`)}else l=new URL("/authorize",e);let d=await kw(),f=d.code_verifier,p=d.code_challenge;return l.searchParams.set("response_type",s),l.searchParams.set("client_id",r.client_id),l.searchParams.set("code_challenge",p),l.searchParams.set("code_challenge_method",c),l.searchParams.set("redirect_uri",String(o)),i&&l.searchParams.set("state",i),n&&l.searchParams.set("scope",n),n?.includes("offline_access")&&l.searchParams.append("prompt","consent"),a&&l.searchParams.set("resource",a.href),{authorizationUrl:l,codeVerifier:f}}function _N(e,t){let r=e.client_secret!==void 0;return t.length===0?r?"client_secret_post":"none":r&&t.includes("client_secret_basic")?"client_secret_basic":r&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":r?"client_secret_post":"none"}function IN(e,t,r,o){let{client_id:n,client_secret:i}=t;switch(e){case"client_secret_basic":L9(n,i,r);return;case"client_secret_post":F9(n,i,o);return;case"none":z9(n,o);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function L9(e,t,r){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");let o=btoa(`${e}:${t}`);r.set("Authorization",`Basic ${o}`)}function F9(e,t,r){r.set("client_id",e),t&&r.set("client_secret",t)}function z9(e,t){t.set("client_id",e)}async function Nw(e){let t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{let o=I9.parse(JSON.parse(r)),{error:n,error_description:i,error_uri:a}=o,s=C9[n]||nu;return new s({message:i||"",cause:a})}catch(o){let n=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${o}. Raw body: ${r}`;return new nu({message:n})}}async function B9(e,{metadata:t,clientInformation:r,authorizationCode:o,codeVerifier:n,redirectUri:i,resource:a,addClientAuthentication:s,fetchFn:c}){var l;let d="authorization_code",f=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e);if(t?.grant_types_supported&&!t.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`);let p=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),m=new URLSearchParams({grant_type:d,code:o,code_verifier:n,redirect_uri:String(i)});if(s)s(p,m,e,t);else{let g=(l=t?.token_endpoint_auth_methods_supported)!=null?l:[],y=_N(r,g);IN(y,r,p,m)}a&&m.set("resource",a.href);let v=await(c??fetch)(f,{method:"POST",headers:p,body:m});if(!v.ok)throw await Nw(v);return xN.parse(await v.json())}async function Z9(e,{metadata:t,clientInformation:r,refreshToken:o,resource:n,addClientAuthentication:i,fetchFn:a}){var s;let c="refresh_token",l;if(t){if(l=new URL(t.token_endpoint),t.grant_types_supported&&!t.grant_types_supported.includes(c))throw new Error(`Incompatible auth server: does not support grant type ${c}`)}else l=new URL("/token",e);let d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),f=new URLSearchParams({grant_type:c,refresh_token:o});if(i)i(d,f,e,t);else{let m=(s=t?.token_endpoint_auth_methods_supported)!=null?s:[],v=_N(r,m);IN(v,r,d,f)}n&&f.set("resource",n.href);let p=await(a??fetch)(l,{method:"POST",headers:d,body:f});if(!p.ok)throw await Nw(p);return xN.parse({refresh_token:o,...await p.json()})}async function G9(e,{metadata:t,clientMetadata:r,fetchFn:o}){let n;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");n=new URL(t.registration_endpoint)}else n=new URL("/register",e);let i=await(o??fetch)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw await Nw(i);return E9.parse(await i.json())}async function om(e,t){var r,o;try{return await Tw(e,t)}catch(n){if(n instanceof Xf||n instanceof tm)return await((r=e.invalidateCredentials)==null?void 0:r.call(e,"all")),await Tw(e,t);if(n instanceof em)return await((o=e.invalidateCredentials)==null?void 0:o.call(e,"tokens")),await Tw(e,t);throw n}}async function V9(e,t,r){let o=$9(e);if(t.validateResourceURL)return await t.validateResourceURL(o,r?.resource);if(r){if(!N9({requestedResource:o,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${o} (or origin)`);return new URL(r.resource)}}async function Tw(e,{serverUrl:t,authorizationCode:r,scope:o,resourceMetadataUrl:n,fetchFn:i}){let a,s;try{a=await P9(t,{resourceMetadataUrl:n},i),a.authorization_servers&&a.authorization_servers.length>0&&(s=a.authorization_servers[0])}catch{}s||(s=t);let c=await V9(t,e,a),l=await j9(s,{fetchFn:i}),d=await Promise.resolve(e.clientInformation());if(!d){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");let g=await G9(s,{metadata:l,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(g),d=g}if(r!==void 0){let g=await e.codeVerifier(),y=await B9(s,{metadata:l,clientInformation:d,authorizationCode:r,codeVerifier:g,redirectUri:e.redirectUrl,resource:c,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(y),"AUTHORIZED"}let f=await e.tokens();if(f?.refresh_token)try{let g=await Z9(s,{metadata:l,clientInformation:d,refreshToken:f.refresh_token,resource:c,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(g),"AUTHORIZED"}catch(g){if(!(!(g instanceof ul)||g instanceof nu))throw g}let p=e.state?await e.state():void 0,{authorizationUrl:m,codeVerifier:v}=await U9(s,{metadata:l,clientInformation:d,state:p,redirectUrl:e.redirectUrl,scope:o||e.clientMetadata.scope,resource:c});return await e.saveCodeVerifier(v),await e.redirectToAuthorization(m),"REDIRECT"}var H9=class{constructor({url:e,headers:t,authProvider:r}){this.connected=!1,this.url=new URL(e),this.headers=t,this.authProvider=r}async commonHeaders(e){let t={...this.headers,...e,"mcp-protocol-version":ou};if(this.authProvider){let r=await this.authProvider.tokens();r?.access_token&&(t.Authorization=`Bearer ${r.access_token}`)}return Yf(t,`ai-sdk/${bN}`,Qf())}async start(){return new Promise((e,t)=>{if(this.connected)return e();this.abortController=new AbortController;let r=async(o=!1)=>{var n,i,a,s,c;try{let l=await this.commonHeaders({Accept:"text/event-stream"}),d=await fetch(this.url.href,{headers:l,signal:(n=this.abortController)==null?void 0:n.signal});if(d.status===401&&this.authProvider&&!o){this.resourceMetadataUrl=nm(d);try{if(await om(this.authProvider,{serverUrl:this.url,resourceMetadataUrl:this.resourceMetadataUrl})!=="AUTHORIZED"){let g=new rm;return(i=this.onerror)==null||i.call(this,g),t(g)}}catch(v){return(a=this.onerror)==null||a.call(this,v),t(v)}return r(!0)}if(!d.ok||!d.body){let v=`MCP SSE Transport Error: ${d.status} ${d.statusText}`;d.status===405&&(v+=". This server does not support SSE transport. Try using `http` transport instead");let g=new Ge({message:v});return(s=this.onerror)==null||s.call(this,g),t(g)}let p=d.body.pipeThrough(new TextDecoderStream).pipeThrough(new Yn).getReader(),m=async()=>{var v,g,y;try{for(;;){let{done:E,value:I}=await p.read();if(E){if(this.connected)throw this.connected=!1,new Ge({message:"MCP SSE Transport Error: Connection closed unexpectedly"});return}let{event:h,data:N}=I;if(h==="endpoint"){if(this.endpoint=new URL(N,this.url),this.endpoint.origin!==this.url.origin)throw new Ge({message:`MCP SSE Transport Error: Endpoint origin does not match connection origin: ${this.endpoint.origin}`});this.connected=!0,e()}else if(h==="message")try{let L=sl.parse(JSON.parse(N));(v=this.onmessage)==null||v.call(this,L)}catch(L){let b=new Ge({message:"MCP SSE Transport Error: Failed to parse message",cause:L});(g=this.onerror)==null||g.call(this,b)}}}catch(E){if(E instanceof Error&&E.name==="AbortError")return;(y=this.onerror)==null||y.call(this,E),t(E)}};this.sseConnection={close:()=>p.cancel()},m()}catch(l){if(l instanceof Error&&l.name==="AbortError")return;(c=this.onerror)==null||c.call(this,l),t(l)}};r()})}async close(){var e,t,r;this.connected=!1,(e=this.sseConnection)==null||e.close(),(t=this.abortController)==null||t.abort(),(r=this.onclose)==null||r.call(this)}async send(e){if(!this.endpoint||!this.connected)throw new Ge({message:"MCP SSE Transport Error: Not connected"});let t=this.endpoint,r=async(o=!1)=>{var n,i,a,s,c;try{let d={method:"POST",headers:await this.commonHeaders({"Content-Type":"application/json"}),body:JSON.stringify(e),signal:(n=this.abortController)==null?void 0:n.signal},f=await fetch(t,d);if(f.status===401&&this.authProvider&&!o){this.resourceMetadataUrl=nm(f);try{if(await om(this.authProvider,{serverUrl:this.url,resourceMetadataUrl:this.resourceMetadataUrl})!=="AUTHORIZED"){let m=new rm;(i=this.onerror)==null||i.call(this,m);return}}catch(p){(a=this.onerror)==null||a.call(this,p);return}return r(!0)}if(!f.ok){let p=await f.text().catch(()=>null),m=new Ge({message:`MCP SSE Transport Error: POSTing to endpoint (HTTP ${f.status}): ${p}`});(s=this.onerror)==null||s.call(this,m);return}}catch(l){(c=this.onerror)==null||c.call(this,l);return}};await r()}},W9=class{constructor({url:e,headers:t,authProvider:r}){this.inboundReconnectAttempts=0,this.reconnectionOptions={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},this.url=new URL(e),this.headers=t,this.authProvider=r}async commonHeaders(e){let t={...this.headers,...e,"mcp-protocol-version":ou};if(this.sessionId&&(t["mcp-session-id"]=this.sessionId),this.authProvider){let r=await this.authProvider.tokens();r?.access_token&&(t.Authorization=`Bearer ${r.access_token}`)}return Yf(t,`ai-sdk/${bN}`,Qf())}async start(){if(this.abortController)throw new Ge({message:"MCP HTTP Transport Error: Transport already started. Note: client.connect() calls start() automatically."});this.abortController=new AbortController,this.openInboundSse()}async close(){var e,t,r;(e=this.inboundSseConnection)==null||e.close();try{if(this.sessionId&&this.abortController&&!this.abortController.signal.aborted){let o=await this.commonHeaders({});await fetch(this.url,{method:"DELETE",headers:o,signal:this.abortController.signal}).catch(()=>{})}}catch{}(t=this.abortController)==null||t.abort(),(r=this.onclose)==null||r.call(this)}async send(e){let t=async(r=!1)=>{var o,n,i,a,s,c,l;try{let f={method:"POST",headers:await this.commonHeaders({"Content-Type":"application/json",Accept:"application/json, text/event-stream"}),body:JSON.stringify(e),signal:(o=this.abortController)==null?void 0:o.signal},p=await fetch(this.url,f),m=p.headers.get("mcp-session-id");if(m&&(this.sessionId=m),p.status===401&&this.authProvider&&!r){this.resourceMetadataUrl=nm(p);try{if(await om(this.authProvider,{serverUrl:this.url,resourceMetadataUrl:this.resourceMetadataUrl})!=="AUTHORIZED")throw new rm}catch(E){throw(n=this.onerror)==null||n.call(this,E),E}return t(!0)}if(p.status===202){this.inboundSseConnection||this.openInboundSse();return}if(!p.ok){let E=await p.text().catch(()=>null),I=`MCP HTTP Transport Error: POSTing to endpoint (HTTP ${p.status}): ${E}`;p.status===404&&(I+=". This server does not support HTTP transport. Try using `sse` transport instead");let h=new Ge({message:I});throw(i=this.onerror)==null||i.call(this,h),h}if(!("id"in e))return;let g=p.headers.get("content-type")||"";if(g.includes("application/json")){let E=await p.json(),I=Array.isArray(E)?E.map(h=>sl.parse(h)):[sl.parse(E)];for(let h of I)(a=this.onmessage)==null||a.call(this,h);return}if(g.includes("text/event-stream")){if(!p.body){let N=new Ge({message:"MCP HTTP Transport Error: text/event-stream response without body"});throw(s=this.onerror)==null||s.call(this,N),N}let I=p.body.pipeThrough(new TextDecoderStream).pipeThrough(new Yn).getReader();(async()=>{var N,L,b;try{for(;;){let{done:M,value:P}=await I.read();if(M)return;let{event:Q,data:O}=P;if(Q==="message")try{let ne=sl.parse(JSON.parse(O));(N=this.onmessage)==null||N.call(this,ne)}catch(ne){let we=new Ge({message:"MCP HTTP Transport Error: Failed to parse message",cause:ne});(L=this.onerror)==null||L.call(this,we)}}}catch(M){if(M instanceof Error&&M.name==="AbortError")return;(b=this.onerror)==null||b.call(this,M)}})();return}let y=new Ge({message:`MCP HTTP Transport Error: Unexpected content type: ${g}`});throw(c=this.onerror)==null||c.call(this,y),y}catch(d){throw(l=this.onerror)==null||l.call(this,d),d}};await t()}getNextReconnectionDelay(e){let{initialReconnectionDelay:t,reconnectionDelayGrowFactor:r,maxReconnectionDelay:o}=this.reconnectionOptions;return Math.min(t*Math.pow(r,e),o)}scheduleInboundSseReconnection(){var e;let{maxRetries:t}=this.reconnectionOptions;if(t>0&&this.inboundReconnectAttempts>=t){(e=this.onerror)==null||e.call(this,new Ge({message:`MCP HTTP Transport Error: Maximum reconnection attempts (${t}) exceeded.`}));return}let r=this.getNextReconnectionDelay(this.inboundReconnectAttempts);this.inboundReconnectAttempts+=1,setTimeout(async()=>{var o;(o=this.abortController)!=null&&o.signal.aborted||await this.openInboundSse(!1,this.lastInboundEventId)},r)}async openInboundSse(e=!1,t){var r,o,n,i,a,s;try{let c=await this.commonHeaders({Accept:"text/event-stream"});t&&(c["last-event-id"]=t);let l=await fetch(this.url.href,{method:"GET",headers:c,signal:(r=this.abortController)==null?void 0:r.signal}),d=l.headers.get("mcp-session-id");if(d&&(this.sessionId=d),l.status===401&&this.authProvider&&!e){this.resourceMetadataUrl=nm(l);try{if(await om(this.authProvider,{serverUrl:this.url,resourceMetadataUrl:this.resourceMetadataUrl})!=="AUTHORIZED"){let g=new rm;(o=this.onerror)==null||o.call(this,g);return}}catch(v){(n=this.onerror)==null||n.call(this,v);return}return this.openInboundSse(!0,t)}if(l.status===405)return;if(!l.ok||!l.body){let v=new Ge({message:`MCP HTTP Transport Error: GET SSE failed: ${l.status} ${l.statusText}`});(i=this.onerror)==null||i.call(this,v);return}let p=l.body.pipeThrough(new TextDecoderStream).pipeThrough(new Yn).getReader(),m=async()=>{var v,g,y,E;try{for(;;){let{done:I,value:h}=await p.read();if(I)return;let{event:N,data:L,id:b}=h;if(b&&(this.lastInboundEventId=b),N==="message")try{let M=sl.parse(JSON.parse(L));(v=this.onmessage)==null||v.call(this,M)}catch(M){let P=new Ge({message:"MCP HTTP Transport Error: Failed to parse message",cause:M});(g=this.onerror)==null||g.call(this,P)}}}catch(I){if(I instanceof Error&&I.name==="AbortError")return;(y=this.onerror)==null||y.call(this,I),(E=this.abortController)!=null&&E.signal.aborted||this.scheduleInboundSseReconnection()}};this.inboundSseConnection={close:()=>p.cancel()},this.inboundReconnectAttempts=0,m()}catch(c){if(c instanceof Error&&c.name==="AbortError")return;(a=this.onerror)==null||a.call(this,c),(s=this.abortController)!=null&&s.signal.aborted||this.scheduleInboundSseReconnection()}}};function q9(e){switch(e.type){case"sse":return new H9(e);case"http":return new W9(e);default:throw new Ge({message:"Unsupported or invalid transport configuration. If you are using a custom transport, make sure it implements the MCPTransport interface."})}}function J9(e){return"start"in e&&typeof e.start=="function"&&"send"in e&&typeof e.send=="function"&&"close"in e&&typeof e.close=="function"}var K9="1.0.0";function lN({output:e}){let t=e;return!("content"in t)||!Array.isArray(t.content)?{type:"json",value:t}:{type:"content",value:t.content.map(o=>o.type==="text"&&"text"in o?{type:"text",text:o.text}:o.type==="image"&&"data"in o&&"mimeType"in o?{type:"image-data",data:o.data,mediaType:o.mimeType}:{type:"text",text:JSON.stringify(o)})}}async function Rw(e){let t=new Q9(e);return await t.init(),t}var Q9=class{constructor({transport:e,name:t="ai-sdk-mcp-client",version:r=K9,onUncaughtError:o,capabilities:n}){this.requestMessageId=0,this.responseHandlers=new Map,this.serverCapabilities={},this.isClosed=!0,this.onUncaughtError=o,this.clientCapabilities=n??{},J9(e)?this.transport=e:this.transport=q9(e),this.transport.onclose=()=>this.onClose(),this.transport.onerror=i=>this.onError(i),this.transport.onmessage=i=>{if("method"in i){"id"in i?this.onRequestMessage(i):this.onError(new Ge({message:"Unsupported message type"}));return}this.onResponse(i)},this.clientInfo={name:t,version:r}}async init(){try{await this.transport.start(),this.isClosed=!1;let e=await this.request({request:{method:"initialize",params:{protocolVersion:ou,capabilities:this.clientCapabilities,clientInfo:this.clientInfo}},resultSchema:e9});if(e===void 0)throw new Ge({message:"Server sent invalid initialize result"});if(!KB.includes(e.protocolVersion))throw new Ge({message:`Server's protocol version is not supported: ${e.protocolVersion}`});return this.serverCapabilities=e.capabilities,await this.notification({method:"notifications/initialized"}),this}catch(e){throw await this.close(),e}}async close(){var e;this.isClosed||(await((e=this.transport)==null?void 0:e.close()),this.onClose())}assertCapability(e){switch(e){case"initialize":break;case"tools/list":case"tools/call":if(!this.serverCapabilities.tools)throw new Ge({message:"Server does not support tools"});break;case"resources/list":case"resources/read":case"resources/templates/list":if(!this.serverCapabilities.resources)throw new Ge({message:"Server does not support resources"});break;case"prompts/list":case"prompts/get":if(!this.serverCapabilities.prompts)throw new Ge({message:"Server does not support prompts"});break;default:throw new Ge({message:`Unsupported method: ${e}`})}}async request({request:e,resultSchema:t,options:r}){return new Promise((o,n)=>{if(this.isClosed)return n(new Ge({message:"Attempted to send a request from a closed client"}));this.assertCapability(e.method);let i=r?.signal;i?.throwIfAborted();let a=this.requestMessageId++,s={...e,jsonrpc:"2.0",id:a},c=()=>{this.responseHandlers.delete(a)};this.responseHandlers.set(a,l=>{if(i?.aborted)return n(new Ge({message:"Request was aborted",cause:i.reason}));if(l instanceof Error)return n(l);try{let d=t.parse(l.result);o(d)}catch(d){let f=new Ge({message:"Failed to parse server response",cause:d});n(f)}}),this.transport.send(s).catch(l=>{c(),n(l)})})}async listTools({params:e,options:t}={}){return this.request({request:{method:"tools/list",params:e},resultSchema:r9,options:t})}async callTool({name:e,args:t,options:r}){try{return this.request({request:{method:"tools/call",params:{name:e,arguments:t}},resultSchema:i9,options:{signal:r?.abortSignal}})}catch(o){throw o}}async listResourcesInternal({params:e,options:t}={}){try{return this.request({request:{method:"resources/list",params:e},resultSchema:o9,options:t})}catch(r){throw r}}async readResourceInternal({uri:e,options:t}){try{return this.request({request:{method:"resources/read",params:{uri:e}},resultSchema:u9,options:t})}catch(r){throw r}}async listResourceTemplatesInternal({options:e}={}){try{return this.request({request:{method:"resources/templates/list"},resultSchema:s9,options:e})}catch(t){throw t}}async listPromptsInternal({params:e,options:t}={}){try{return this.request({request:{method:"prompts/list",params:e},resultSchema:d9,options:t})}catch(r){throw r}}async getPromptInternal({name:e,args:t,options:r}){try{return this.request({request:{method:"prompts/get",params:{name:e,arguments:t}},resultSchema:f9,options:r})}catch(o){throw o}}async notification(e){let t={...e,jsonrpc:"2.0"};await this.transport.send(t)}async tools({schemas:e="automatic"}={}){let t=await this.listTools();return this.toolsFromDefinitions(t,{schemas:e})}toolsFromDefinitions(e,{schemas:t="automatic"}={}){var r,o;let n={};for(let{name:i,title:a,description:s,inputSchema:c,annotations:l,_meta:d}of e.tools){let f=a??l?.title;if(t!=="automatic"&&!(i in t))continue;let p=this,m=t!=="automatic"?(r=t[i])==null?void 0:r.outputSchema:void 0,v=async(y,E)=>{var I;(I=E?.abortSignal)==null||I.throwIfAborted();let h=await p.callTool({name:i,args:y,options:E});return m!=null?p.extractStructuredContent(h,m,i):h},g=t==="automatic"?nN({description:s,title:f,inputSchema:ru({...c,properties:(o=c.properties)!=null?o:{},additionalProperties:!1}),execute:v,toModelOutput:lN}):{description:s,title:f,inputSchema:t[i].inputSchema,...m!=null?{outputSchema:m}:{},execute:v,toModelOutput:lN};n[i]={...g,_meta:d}}return n}async extractStructuredContent(e,t,r){if("structuredContent"in e&&e.structuredContent!=null){let o=await Iw({value:e.structuredContent,schema:_w(t)});if(!o.success)throw new Ge({message:`Tool "${r}" returned structuredContent that does not match the expected outputSchema`,cause:o.error});return o.value}if("content"in e&&Array.isArray(e.content)){let o=e.content.find(n=>n.type==="text");if(o&&"text"in o){let n=await rN({text:o.text,schema:t});if(!n.success)throw new Ge({message:`Tool "${r}" returned content that does not match the expected outputSchema`,cause:n.error});return n.value}}throw new Ge({message:`Tool "${r}" did not return structuredContent or parseable text content`})}listResources({params:e,options:t}={}){return this.listResourcesInternal({params:e,options:t})}readResource({uri:e,options:t}){return this.readResourceInternal({uri:e,options:t})}listResourceTemplates({options:e}={}){return this.listResourceTemplatesInternal({options:e})}experimental_listPrompts({params:e,options:t}={}){return this.listPromptsInternal({params:e,options:t})}experimental_getPrompt({name:e,arguments:t,options:r}){return this.getPromptInternal({name:e,args:t,options:r})}onElicitationRequest(e,t){if(e!==aN)throw new Ge({message:"Unsupported request schema. Only ElicitationRequestSchema is supported."});this.elicitationRequestHandler=t}async onRequestMessage(e){try{if(e.method!=="elicitation/create"){await this.transport.send({jsonrpc:"2.0",id:e.id,error:{code:-32601,message:`Unsupported request method: ${e.method}`}});return}if(!this.elicitationRequestHandler){await this.transport.send({jsonrpc:"2.0",id:e.id,error:{code:-32601,message:"No elicitation handler registered on client"}});return}let t=aN.safeParse({method:e.method,params:e.params});if(!t.success){await this.transport.send({jsonrpc:"2.0",id:e.id,error:{code:-32602,message:`Invalid elicitation request: ${t.error.message}`,data:t.error.issues}});return}try{let r=await this.elicitationRequestHandler(t.data),o=h9.parse(r);await this.transport.send({jsonrpc:"2.0",id:e.id,result:o})}catch(r){await this.transport.send({jsonrpc:"2.0",id:e.id,error:{code:-32603,message:r instanceof Error?r.message:"Failed to handle elicitation request"}}),this.onError(r)}}catch(t){this.onError(t)}}onClose(){if(this.isClosed)return;this.isClosed=!0;let e=new Ge({message:"Connection closed"});for(let t of this.responseHandlers.values())t(e);this.responseHandlers.clear()}onError(e){this.onUncaughtError&&this.onUncaughtError(e)}onResponse(e){let t=Number(e.id),r=this.responseHandlers.get(t);if(r===void 0)throw new Ge({message:`Protocol error: Received a response for an unknown message ID: ${JSON.stringify(e)}`});this.responseHandlers.delete(t),r("result"in e?e:new Ge({message:e.error.message,code:e.error.code,data:e.error.data,cause:e.error}))}};import{spawn as hZ}from"node:child_process";var Y9=u.optional(u.record(u.string(),u.unknown())),X9=u.looseObject({name:u.string(),version:u.string()}),sm=u.looseObject({_meta:u.optional(u.object({}).loose())}),Zo=sm,CN=u.object({method:u.string(),params:u.optional(sm)}),$N=u.object({applyDefaults:u.optional(u.boolean())}).loose(),eZ=u.looseObject({experimental:u.optional(u.object({}).loose()),logging:u.optional(u.object({}).loose()),prompts:u.optional(u.looseObject({listChanged:u.optional(u.boolean())})),resources:u.optional(u.looseObject({subscribe:u.optional(u.boolean()),listChanged:u.optional(u.boolean())})),tools:u.optional(u.looseObject({listChanged:u.optional(u.boolean())})),elicitation:u.optional($N)}),sre=u.object({elicitation:u.optional($N)}).loose(),ure=Zo.extend({protocolVersion:u.string(),capabilities:eZ,serverInfo:X9,instructions:u.optional(u.string())}),Ow=Zo.extend({nextCursor:u.optional(u.string())}),tZ=u.object({name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),inputSchema:u.object({type:u.literal("object"),properties:u.optional(u.object({}).loose())}).loose(),outputSchema:u.optional(u.object({}).loose()),annotations:u.optional(u.object({title:u.optional(u.string())}).loose()),_meta:Y9}).loose(),cre=Ow.extend({tools:u.array(tZ)}),NN=u.object({type:u.literal("text"),text:u.string()}).loose(),RN=u.object({type:u.literal("image"),data:u.base64(),mimeType:u.string()}).loose(),rZ=u.object({uri:u.string(),name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),mimeType:u.optional(u.string()),size:u.optional(u.number())}).loose(),lre=Ow.extend({resources:u.array(rZ)}),ON=u.object({uri:u.string(),name:u.optional(u.string()),title:u.optional(u.string()),mimeType:u.optional(u.string())}).loose(),DN=ON.extend({text:u.string()}),PN=ON.extend({blob:u.base64()}),MN=u.object({type:u.literal("resource"),resource:u.union([DN,PN])}).loose(),dre=Zo.extend({content:u.array(u.union([NN,RN,MN])),structuredContent:u.optional(u.unknown()),isError:u.boolean().default(!1).optional()}).or(Zo.extend({toolResult:u.unknown()})),nZ=u.object({uriTemplate:u.string(),name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),mimeType:u.optional(u.string())}).loose(),pre=Zo.extend({resourceTemplates:u.array(nZ)}),fre=Zo.extend({contents:u.array(u.union([DN,PN]))}),oZ=u.object({name:u.string(),description:u.optional(u.string()),required:u.optional(u.boolean())}).loose(),iZ=u.object({name:u.string(),title:u.optional(u.string()),description:u.optional(u.string()),arguments:u.optional(u.array(oZ))}).loose(),mre=Ow.extend({prompts:u.array(iZ)}),aZ=u.object({role:u.union([u.literal("user"),u.literal("assistant")]),content:u.union([NN,RN,MN])}).loose(),hre=Zo.extend({description:u.optional(u.string()),messages:u.array(aZ)}),sZ=sm.extend({message:u.string(),requestedSchema:u.unknown()}),gre=CN.extend({method:u.literal("elicitation/create"),params:sZ}),vre=Zo.extend({action:u.union([u.literal("accept"),u.literal("decline"),u.literal("cancel")]),content:u.optional(u.record(u.string(),u.unknown()))}),um="2.0",uZ=u.object({jsonrpc:u.literal(um),id:u.union([u.string(),u.number().int()])}).merge(CN).strict(),cZ=u.object({jsonrpc:u.literal(um),id:u.union([u.string(),u.number().int()]),result:Zo}).strict(),lZ=u.object({jsonrpc:u.literal(um),id:u.union([u.string(),u.number().int()]),error:u.object({code:u.number().int(),message:u.string(),data:u.optional(u.unknown())})}).strict(),dZ=u.object({jsonrpc:u.literal(um)}).merge(u.object({method:u.string(),params:u.optional(sm)})).strict(),pZ=u.union([uZ,dZ,cZ,lZ]),fZ="AI_MCPClientError",jN=`vercel.ai.error.${fZ}`,mZ=Symbol.for(jN),EN,kN,TN=class extends(kN=W,EN=mZ,kN){constructor({name:e="MCPClientError",message:t,cause:r,data:o,code:n}){super({name:e,message:t,cause:r}),this[EN]=!0,this.data=o,this.code=n}static isInstance(e){return W.hasMarker(e,jN)}};function gZ(e){let t=globalThis.process.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"],r=e?{...e}:{};for(let o of t){let n=globalThis.process.env[o];n!==void 0&&(n.startsWith("()")||(r[o]=n))}return r}function vZ(e,t){var r,o;return hZ(e.command,(r=e.args)!=null?r:[],{env:gZ(e.env),stdio:["pipe","pipe",(o=e.stderr)!=null?o:"inherit"],shell:!1,signal:t,windowsHide:globalThis.process.platform==="win32"&&yZ(),cwd:e.cwd})}function yZ(){return"type"in globalThis.process}var UN=class{constructor(e){this.abortController=new AbortController,this.readBuffer=new AZ,this.serverParams=e}async start(){if(this.process)throw new TN({message:"StdioMCPTransport already started."});return new Promise((e,t)=>{var r,o,n,i;try{let a=vZ(this.serverParams,this.abortController.signal);this.process=a,this.process.on("error",s=>{var c,l;if(s.name==="AbortError"){(c=this.onclose)==null||c.call(this);return}t(s),(l=this.onerror)==null||l.call(this,s)}),this.process.on("spawn",()=>{e()}),this.process.on("close",s=>{var c;this.process=void 0,(c=this.onclose)==null||c.call(this)}),(r=this.process.stdin)==null||r.on("error",s=>{var c;(c=this.onerror)==null||c.call(this,s)}),(o=this.process.stdout)==null||o.on("data",s=>{this.readBuffer.append(s),this.processReadBuffer()}),(n=this.process.stdout)==null||n.on("error",s=>{var c;(c=this.onerror)==null||c.call(this,s)})}catch(a){t(a),(i=this.onerror)==null||i.call(this,a)}})}processReadBuffer(){for(var e,t;;)try{let r=this.readBuffer.readMessage();if(r===null)break;(e=this.onmessage)==null||e.call(this,r)}catch(r){(t=this.onerror)==null||t.call(this,r)}}async close(){this.abortController.abort(),this.process=void 0,this.readBuffer.clear()}send(e){return new Promise(t=>{var r;if(!((r=this.process)!=null&&r.stdin))throw new TN({message:"StdioClientTransport not connected"});let o=bZ(e);this.process.stdin.write(o)?t():this.process.stdin.once("drain",t)})}},AZ=class{append(e){this.buffer=this.buffer?Buffer.concat([this.buffer,e]):e}readMessage(){if(!this.buffer)return null;let e=this.buffer.indexOf(`
103
- `);if(e===-1)return null;let t=this.buffer.toString("utf8",0,e);return this.buffer=this.buffer.subarray(e+1),xZ(t)}clear(){this.buffer=void 0}};function bZ(e){return JSON.stringify(e)+`
104
- `}function xZ(e){return pZ.parse(JSON.parse(e))}Di();xr();import*as iu from"node:fs";function ll(e){return e.replace(/\$\{([^}]+)\}/g,(t,r)=>{let[o,n]=r.split(":-");return process.env[o]||n||""})}function wZ(e){let t={...e};return t.url&&(t.url=ll(t.url)),t.command&&(t.command=ll(t.command)),t.args&&(t.args=t.args.map(ll)),t.env&&(t.env=Object.fromEntries(Object.entries(t.env).map(([r,o])=>[r,ll(o)]))),t.headers&&(t.headers=Object.fromEntries(Object.entries(t.headers).map(([r,o])=>[r,ll(o)]))),t}function dm(){nr();try{if(iu.existsSync(cm))return{servers:JSON.parse(iu.readFileSync(cm,"utf-8")).servers||{}}}catch(e){Nt(e)}return{servers:{}}}function FN(e){nr(),iu.writeFileSync(cm,JSON.stringify(e,null,2),"utf-8")}function dl(){let e=dm(),t={};for(let[r,o]of Object.entries(e.servers))t[r]=wZ(o);return t}function zN(e,t){let r=dm();r.servers[e]=t,FN(r)}function BN(e){let t=dm();return t.servers[e]?(delete t.servers[e],FN(t),!0):!1}function ZN(){return Object.keys(dm().servers)}function Go(){return!process.env.NO_COLOR}function Ui(e,t){return Go()?`${e}${t}\x1B[0m`:t}var q=e=>Ui("\x1B[2m",e),GN=e=>Go()?`\x1B[2m\x1B[90m${e}\x1B[0m`:e,Pw=e=>Ui("\x1B[1m",e),Sa=e=>Ui("\x1B[32m",e),au=e=>Ui("\x1B[31m",e),Mw=e=>Ui("\x1B[36m",e),VN=e=>Ui("\x1B[33m",e),HN=e=>Ui("\x1B[35m",e);var su=e=>Ui("\x1B[90m",e);var pm=!1,WN=Date.now();function qN(){return pm=!pm,WN=Date.now(),pm}function Re(e){if(!pm)return;let t=((Date.now()-WN)/1e3).toFixed(2);process.stdout.write(`${q(`[${t}s] ${e}`)}
105
- `)}var uu=new Map,jw=!1;async function SZ(e,t){try{let r;if(t.type==="stdio"&&t.command){let o=new UN({command:t.command,args:t.args||[],env:{...process.env,...t.env}});r=await Rw({transport:o})}else if((t.type==="http"||t.type==="sse")&&t.url)r=await Rw({transport:{type:t.type,url:t.url,headers:t.headers}});else return Re(`mcp: invalid config for ${e}`),null;return Re(`mcp: connected to ${e}`),{client:r,name:e}}catch(r){return Re(`mcp: failed to connect to ${e}: ${r}`),null}}async function JN(){if(jw)return;jw=!0;let e=dl(),t=Object.keys(e);t.length!==0&&(Re(`mcp: connecting to ${t.length} server(s)`),await Promise.allSettled(t.map(async r=>{let o=await SZ(r,e[r]);o&&uu.set(r,o)})),Re(`mcp: ${uu.size}/${t.length} connected`))}async function KN(){await JN();let e={};for(let[t,r]of uu)try{let o=await r.client.tools();for(let[n,i]of Object.entries(o)){let a=`${t}_${n}`;e[a]=i}Re(`mcp: loaded ${Object.keys(o).length} tools from ${t}`)}catch(o){Re(`mcp: failed to get tools from ${t}: ${o}`)}return e}async function _Z(){for(let[e,t]of uu)try{await t.client.close(),Re(`mcp: closed ${e}`)}catch(r){Re(`mcp: error closing ${e}: ${r}`)}uu.clear(),jw=!1}function fm(){let e=dl();return Object.keys(e).map(t=>({name:t,connected:uu.has(t)}))}async function mm(){await _Z(),await JN()}import*as Ho from"node:fs";import*as Ia from"node:path";import*as hm from"node:fs";import*as QN from"node:os";import*as Vo from"node:path";function Uw(e){return e==="~"||e.startsWith("~/")?Vo.join(QN.homedir(),e.slice(1)):e}function st(e){let t=hm.realpathSync(process.cwd()),r;try{r=hm.realpathSync(Vo.resolve(Uw(e)))}catch{r=Vo.resolve(Uw(e))}return r.startsWith(t+Vo.sep)||r===t?r:null}function ut(e){let t=Uw(e);try{return hm.realpathSync(Vo.resolve(t))}catch{return Vo.resolve(t)}}import{AsyncLocalStorage as IZ}from"node:async_hooks";xr();import*as Li from"node:fs";import*as ro from"node:path";function YN(){return ro.join(an,"permissions.json")}var _a=null;function gm(){if(_a)return _a;try{let e=YN();if(Li.existsSync(e)){let t=JSON.parse(Li.readFileSync(e,"utf-8"));if(t&&Array.isArray(t.rules))return _a=t,_a}}catch{}return _a={rules:[]},_a}function Lw(e){let t=YN();Li.mkdirSync(ro.dirname(t),{recursive:!0}),Li.writeFileSync(t,JSON.stringify(e,null,2),"utf-8"),_a=e}function XN(e,t,r){let{rules:o}=gm(),n=ro.resolve(t);for(let i of o){if(i.tool!==e)continue;let a=ro.resolve(i.directory);if(!(n!==a&&!n.startsWith(a+ro.sep)))if(i.tool==="runCommand"){if(i.command&&i.command===r)return!0}else return!0}return!1}function e4(e,t,r){let o=gm(),n=ro.resolve(t);if(o.rules.some(s=>s.tool===e&&s.directory===n&&(s.tool==="runCommand"?s.command===r:!0)))return;let a={tool:e,directory:n};r&&(a.command=r),o.rules.push(a),Lw(o)}function t4(e){let t=gm();return e<0||e>=t.rules.length?!1:(t.rules.splice(e,1),Lw(t),!0)}function r4(){Lw({rules:[]})}function n4(){return gm().rules}var Fw=null,i4=new IZ;function a4(e){return i4.run(!0,e)}var o4=Promise.resolve(!0);async function He(e,t){if(i4.getStore())return!0;if(t?.tool){let n=process.cwd();if(XN(t.tool,n,t.command))return!0}if(!Fw)return!0;let r=o4,o;o4=new Promise(n=>{o=n}),await r;try{let n=await Fw(e,t);return o(n),n}catch(n){throw o(!1),n}}function s4(e){Fw=e}var EZ=[{kind:"function",re:/^(?:export\s+)?(?:async\s+)?function\s+(\w+)/},{kind:"const",re:/^(?:export\s+)?(?:const|let|var)\s+(\w+)\s*[=:]/},{kind:"class",re:/^(?:export\s+)?(?:abstract\s+)?class\s+(\w+)/},{kind:"interface",re:/^(?:export\s+)?(?:interface|type)\s+(\w+)/},{kind:"enum",re:/^(?:export\s+)?enum\s+(\w+)/},{kind:"export",re:/^export\s+default\s+(?:function|class|abstract\s+class)\s+(\w+)/},{kind:"export-default",re:/^export\s+default\s+(\w+)/}],kZ=[{kind:"class",re:/^class\s+(\w+)/},{kind:"function",re:/^(?:async\s+)?def\s+(\w+)/},{kind:"variable",re:/^(\w+)\s*(?::\s*\w+)?\s*=/}],TZ=[{kind:"function",re:/^func\s+(?:\(\w+\s+\*?\w+\)\s+)?(\w+)/},{kind:"type",re:/^type\s+(\w+)\s+(?:struct|interface)/},{kind:"const",re:/^(?:const|var)\s+(\w+)/}],CZ=[{kind:"function",re:/^(?:pub\s+)?(?:async\s+)?fn\s+(\w+)/},{kind:"struct",re:/^(?:pub\s+)?struct\s+(\w+)/},{kind:"enum",re:/^(?:pub\s+)?enum\s+(\w+)/},{kind:"trait",re:/^(?:pub\s+)?trait\s+(\w+)/},{kind:"impl",re:/^impl(?:<[^>]+>)?\s+(\w+)/}];function l4(e){switch(Ia.extname(e).toLowerCase()){case".ts":case".tsx":case".js":case".jsx":case".mts":case".mjs":case".cts":case".cjs":return EZ;case".py":return kZ;case".go":return TZ;case".rs":return CZ;default:return null}}function u4(e,t){let r=l4(e);if(!r)return[];let o=[],n=new Set,i=t.split(`
106
- `);for(let a=0;a<i.length;a++){let s=i[a].trimStart();if(!(s.startsWith("//")||s.startsWith("#")||s.startsWith("*")))for(let{kind:c,re:l}of r){let d=s.match(l);if(d?.[1]){let f=`${c}:${d[1]}`;n.has(f)||(n.add(f),o.push({name:d[1],kind:c,line:a+1}));break}}}return o}function c4(e,t){if(t.length===0)return`${e}: no symbols found`;let r=t.map(o=>` ${o.kind} ${o.name} (line ${o.line})`);return`${e}:
107
- ${r.join(`
108
- `)}`}var zw={description:"Get an outline of code symbols (functions, classes, exports, types) from a file or all supported files in a directory. Use this to understand code structure without reading entire files.",inputSchema:u.object({filePath:u.string().describe("File or directory path. For directories, outlines all supported files."),maxFiles:u.number().optional().describe("Max files to outline in a directory (default 20)")}),execute:async({filePath:e,maxFiles:t=20})=>{try{let s=function(c){if(a>=t)return;let l=new Set(["node_modules",".git","dist","build",".next","coverage"]),d;try{d=Ho.readdirSync(c,{withFileTypes:!0})}catch{return}for(let f of d){if(a>=t)return;if(f.name.startsWith(".")||l.has(f.name))continue;let p=Ia.join(c,f.name);if(f.isDirectory())s(p);else if(f.isFile()&&l4(p))try{let m=Ho.readFileSync(p,"utf-8"),v=u4(p,m);v.length>0&&i.push(c4(Ia.relative(process.cwd(),p),v)),a++}catch{}}};var r=s;let o=st(e);if(!o){if(!await He(`outline code outside project: ${e}`,{tool:"codeOutline",noAlways:!0}))return{error:"User denied access to path outside project."};o=ut(e)}if(!Ho.existsSync(o))return{error:`not found: ${e}`};if(Ho.statSync(o).isFile()){let c=Ho.readFileSync(o,"utf-8"),l=u4(o,c);return{outline:c4(Ia.relative(process.cwd(),o)||e,l),symbols:l}}let i=[],a=0;return s(o),i.length===0?{outline:"No symbols found",symbols:[]}:{outline:i.join(`
109
-
110
- `),filesScanned:a}}catch{return{error:`outline failed: ${e}`}}}};import*as Ea from"node:fs";import*as d4 from"node:path";var p4={description:"Copy a file to a new location.",inputSchema:u.object({sourcePath:u.string().describe("Absolute or relative path to source"),destPath:u.string().describe("Absolute or relative path to destination")}),execute:async({sourcePath:e,destPath:t})=>{try{let r=st(e);if(!r){if(!await He(`copy from outside project: ${e}`,{tool:"copyFile",noAlways:!0}))return{error:"User denied access to path outside project."};r=ut(e)}let o=st(t);if(!o){if(!await He(`copy to outside project: ${t}`,{tool:"copyFile",noAlways:!0}))return{error:"User denied access to path outside project."};o=ut(t)}if(!Ea.existsSync(r))return{error:`not found: ${e}`};let n=d4.dirname(o);return Ea.existsSync(n)||Ea.mkdirSync(n,{recursive:!0}),Ea.copyFileSync(r,o),{message:`Copied to ${t}`,silent:!0}}catch{return{error:`copy failed: ${e}`}}}};import*as vm from"node:fs";var f4={description:"Create a new folder/directory.",inputSchema:u.object({folderPath:u.string().describe("Absolute or relative path to create")}),execute:async({folderPath:e})=>{try{let t=st(e);if(!t){if(!await He(`create folder outside project: ${e}`,{tool:"createFolder",noAlways:!0}))return{error:"User denied access to path outside project."};t=ut(e)}return vm.existsSync(t)?{error:`exists: ${e}`}:(vm.mkdirSync(t,{recursive:!0}),{message:`created ${e}`,silent:!0})}catch{return{error:`create failed: ${e}`}}}};import*as Fi from"node:fs";import*as Zw from"node:path";import*as Rt from"node:fs";import*as or from"node:path";var Ot=[],Bw=50;function ym(e){let t=or.resolve(e),r=null;if(Rt.existsSync(t))try{r=Rt.readFileSync(t,"utf-8")}catch{r=null}Ot.push({type:"write",path:t,previous:r,timestamp:Date.now()}),Ot.length>Bw&&Ot.shift()}function m4(e){let t=or.resolve(e);try{let r=Rt.readFileSync(t,"utf-8");Ot.push({type:"delete",path:t,content:r,timestamp:Date.now()}),Ot.length>Bw&&Ot.shift()}catch{}}function h4(e,t){let r=or.resolve(e),o=or.resolve(t);Ot.push({type:"rename",oldPath:r,newPath:o,timestamp:Date.now()}),Ot.length>Bw&&Ot.shift()}function g4(){return Ot.length>0}function v4(){let e=Ot.pop();return e?y4(e):{success:!1,message:"nothing to undo"}}function y4(e){try{if(e.type==="write")return e.previous===null?(Rt.existsSync(e.path)&&Rt.unlinkSync(e.path),{success:!0,message:`deleted ${or.basename(e.path)}`}):(Rt.writeFileSync(e.path,e.previous,"utf-8"),{success:!0,message:`restored ${or.basename(e.path)}`});if(e.type==="delete"){let t=or.dirname(e.path);return Rt.existsSync(t)||Rt.mkdirSync(t,{recursive:!0}),Rt.writeFileSync(e.path,e.content,"utf-8"),{success:!0,message:`restored ${or.basename(e.path)}`}}if(e.type==="rename"){if(Rt.existsSync(e.newPath)){let t=or.dirname(e.oldPath);return Rt.existsSync(t)||Rt.mkdirSync(t,{recursive:!0}),Rt.renameSync(e.newPath,e.oldPath),{success:!0,message:`renamed back to ${or.basename(e.oldPath)}`}}return{success:!1,message:"file no longer exists"}}return{success:!1,message:"unknown operation"}}catch(t){return{success:!1,message:t instanceof Error?t.message:String(t)}}}function A4(){return Ot.length}function b4(){return Ot.map((e,t)=>{let r=$Z(e.timestamp);if(e.type==="write"){let o=e.previous===null?"created":"modified";return{index:t+1,action:o,file:or.basename(e.path),time:r}}return e.type==="delete"?{index:t+1,action:"deleted",file:or.basename(e.path),time:r}:e.type==="rename"?{index:t+1,action:"renamed",file:or.basename(e.oldPath),time:r}:{index:t+1,action:"unknown",file:"",time:r}}).reverse()}function x4(e){if(e<1||e>Ot.length)return{success:!1,message:"invalid index",count:0};let t=Ot.length-e,r=0,o=[];for(;Ot.length>t;){let n=Ot.pop();if(n){let i=y4(n);i.success?r++:o.push(i.message)}}return o.length>0?{success:!1,message:o.join(", "),count:r}:{success:!0,message:`rolled back ${r} change(s)`,count:r}}function Am(){return Ot.some(e=>e.type==="write"||e.type==="delete")}function bm(){let e=new Map;for(let t of Ot)t.type==="write"&&!e.has(t.path)?e.set(t.path,t.previous):t.type==="delete"&&!e.has(t.path)&&e.set(t.path,t.content);return[...e.entries()].map(([t,r])=>({path:t,original:r}))}function $Z(e){let t=Math.floor((Date.now()-e)/1e3);return t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:`${Math.floor(t/3600)}h ago`}var w4={description:"Delete one or more files or folders.",inputSchema:u.object({paths:u.array(u.string()).describe("Array of paths to delete")}),execute:async({paths:e})=>{let t=[],r=[],o=[];for(let s of e){let c=st(s);if(!c){if(!await He(`delete path outside project: ${s}`,{tool:"deleteFile",noAlways:!0})){r.push("User denied access to path outside project.");continue}c=ut(s)}if(!Fi.existsSync(c)){r.push(`not found: ${s}`);continue}o.push({filePath:s,fullPath:c})}if(o.length===0)return{error:r.join(", ")};let n=o.map(s=>{let c=Zw.basename(s.filePath);return Fi.statSync(s.fullPath).isDirectory()?`${c}/`:c}).join(", ");if(!await He(`Delete ${n}?`,{tool:"deleteFile"}))return{error:"User denied this action. Do not retry."};for(let{filePath:s,fullPath:c}of o)try{let d=Fi.statSync(c).isDirectory();m4(c),d?await Fi.promises.rm(c,{recursive:!0}):await Fi.promises.unlink(c);let f=Zw.basename(s);t.push(d?`${f}/`:f)}catch{r.push(`failed: ${s}`)}if(t.length===0)return{error:r.join(", ")};let a=`Deleted ${t.join(", ")}`;return{message:r.length?`${a} (errors: ${r.join(", ")})`:a,silent:!0}}};import*as cu from"node:fs";import*as S4 from"node:path";function NZ(e,t){let r=e.split(`
111
- `).slice(0,5),o=t.split(`
112
- `).slice(0,5),n=[];for(let a of r)n.push(au(`- ${a}`));for(let a of o)n.push(Sa(`+ ${a}`));let i=Math.max(e.split(`
113
- `).length,t.split(`
114
- `).length)-5;return i>0&&n.push(` ... ${i} more lines`),n.join(`
115
- `)}var xm={description:"Edit a file by replacing old text with new text. Much faster than writeFile for small changes. The tool reads the file, so you dont need to read it first.",inputSchema:u.object({filePath:u.string().describe("Absolute or relative path to the file"),oldText:u.string().describe("Exact text to find (include 2-3 lines of context)"),newText:u.string().describe("Text to replace it with")}),execute:async({filePath:e,oldText:t,newText:r})=>{Re(`editFile: ${e}`);try{let o=st(e);if(!o){if(!await He(`edit file outside project: ${e}`,{tool:"editFile",noAlways:!0}))return{error:"User denied access to file outside project."};o=ut(e)}if(!cu.existsSync(o))return{error:`file not found: ${e}. Check <project-files> for the correct path.`};let n=cu.readFileSync(o,"utf-8");if(!n.includes(t)){let l=n.split(`
116
- `),d=l.slice(0,40).join(`
117
- `),f=l.length>40?`
118
- ... (${l.length-40} more lines)`:"";return{error:`text not found in ${e}. Read the file first to see the exact content. Here are the first 40 lines:
119
- ${d}${f}`}}let i=NZ(t,r);if(!await He(`Edit ${S4.basename(e)}?
120
- ${i}`,{tool:"editFile"}))return{error:"User denied this action. Do not retry."};ym(o);let s=n.replace(t,r);cu.writeFileSync(o,s,"utf-8");let c=i.split(`
121
- `).map(l=>` ${l}`).join(`
122
- `);return{message:`Edited ${e}
123
- ${c}`,silent:!0}}catch{return{error:`edit failed: ${e}`}}}};var f3=Ut(C4(),1);var lu=Symbol("changed"),zi=Symbol("classList"),wr=Symbol("CustomElements"),pl=Symbol("content"),wm=Symbol("dataset"),Bi=Symbol("doctype"),fl=Symbol("DOMParser"),ce=Symbol("end"),du=Symbol("EventTarget"),pu=Symbol("globals"),Vr=Symbol("image"),Tn=Symbol("mime"),no=Symbol("MutationObserver"),H=Symbol("next"),Hw=Symbol("ownerElement"),Ye=Symbol("prev"),Et=Symbol("private"),ka=Symbol("sheet"),Lt=Symbol("start"),Sm=Symbol("style"),Zi=Symbol("upgrade"),Ue=Symbol("value");var AS={};lr(AS,{DefaultHandler:()=>qo,DomHandler:()=>qo,DomUtils:()=>yu,ElementType:()=>Cm,Parser:()=>Gi,QuoteType:()=>Hr,Tokenizer:()=>Ta,createDocumentStream:()=>UG,createDomStream:()=>LG,getFeed:()=>Il,parseDOM:()=>sR,parseDocument:()=>aR,parseFeed:()=>zG});var Ww,MZ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),ml=(Ww=String.fromCodePoint)!==null&&Ww!==void 0?Ww:(e=>{let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t});function qw(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=MZ.get(e))!==null&&t!==void 0?t:e}function _m(e){let t=typeof atob=="function"?atob(e):typeof Buffer.from=="function"?Buffer.from(e,"base64").toString("binary"):new Buffer(e,"base64").toString("binary"),r=t.length&-2,o=new Uint16Array(r/2);for(let n=0,i=0;n<r;n+=2){let a=t.charCodeAt(n),s=t.charCodeAt(n+1);o[i++]=a|s<<8}return o}var Im=_m("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var Em=_m("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg");var ir;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ir||(ir={}));var dt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(dt||(dt={}));var $4=32;function Jw(e){return e>=dt.ZERO&&e<=dt.NINE}function jZ(e){return e>=dt.UPPER_A&&e<=dt.UPPER_F||e>=dt.LOWER_A&&e<=dt.LOWER_F}function UZ(e){return e>=dt.UPPER_A&&e<=dt.UPPER_Z||e>=dt.LOWER_A&&e<=dt.LOWER_Z||Jw(e)}function LZ(e){return e===dt.EQUALS||UZ(e)}var Ft;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ft||(Ft={}));var Cn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Cn||(Cn={}));var km=class{constructor(t,r,o){this.decodeTree=t,this.emitCodePoint=r,this.errors=o,this.state=Ft.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cn.Strict,this.runConsumed=0}startEntity(t){this.decodeMode=t,this.state=Ft.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(t,r){switch(this.state){case Ft.EntityStart:return t.charCodeAt(r)===dt.NUM?(this.state=Ft.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Ft.NamedEntity,this.stateNamedEntity(t,r));case Ft.NumericStart:return this.stateNumericStart(t,r);case Ft.NumericDecimal:return this.stateNumericDecimal(t,r);case Ft.NumericHex:return this.stateNumericHex(t,r);case Ft.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|$4)===dt.LOWER_X?(this.state=Ft.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Ft.NumericDecimal,this.stateNumericDecimal(t,r))}stateNumericHex(t,r){for(;r<t.length;){let o=t.charCodeAt(r);if(Jw(o)||jZ(o)){let n=o<=dt.NINE?o-dt.ZERO:(o|$4)-dt.LOWER_A+10;this.result=this.result*16+n,this.consumed++,r++}else return this.emitNumericEntity(o,3)}return-1}stateNumericDecimal(t,r){for(;r<t.length;){let o=t.charCodeAt(r);if(Jw(o))this.result=this.result*10+(o-dt.ZERO),this.consumed++,r++;else return this.emitNumericEntity(o,2)}return-1}emitNumericEntity(t,r){var o;if(this.consumed<=r)return(o=this.errors)===null||o===void 0||o.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===dt.SEMI)this.consumed+=1;else if(this.decodeMode===Cn.Strict)return 0;return this.emitCodePoint(qw(this.result),this.consumed),this.errors&&(t!==dt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){let{decodeTree:o}=this,n=o[this.treeIndex],i=(n&ir.VALUE_LENGTH)>>14;for(;r<t.length;){if(i===0&&(n&ir.FLAG13)!==0){let s=(n&ir.BRANCH_LENGTH)>>7;if(this.runConsumed===0){let c=n&ir.JUMP_TABLE;if(t.charCodeAt(r)!==c)return this.result===0?0:this.emitNotTerminatedNamedEntity();r++,this.excess++,this.runConsumed++}for(;this.runConsumed<s;){if(r>=t.length)return-1;let c=this.runConsumed-1,l=o[this.treeIndex+1+(c>>1)],d=c%2===0?l&255:l>>8&255;if(t.charCodeAt(r)!==d)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();r++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(s>>1),n=o[this.treeIndex],i=(n&ir.VALUE_LENGTH)>>14}if(r>=t.length)break;let a=t.charCodeAt(r);if(a===dt.SEMI&&i!==0&&(n&ir.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);if(this.treeIndex=FZ(o,n,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Cn.Attribute&&(i===0||LZ(a))?0:this.emitNotTerminatedNamedEntity();if(n=o[this.treeIndex],i=(n&ir.VALUE_LENGTH)>>14,i!==0){if(a===dt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Cn.Strict&&(n&ir.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}r++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var t;let{result:r,decodeTree:o}=this,n=(o[r]&ir.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,o){let{decodeTree:n}=this;return this.emitCodePoint(r===1?n[t]&~(ir.VALUE_LENGTH|ir.FLAG13):n[t+1],o),r===3&&this.emitCodePoint(n[t+2],o),o}end(){var t;switch(this.state){case Ft.NamedEntity:return this.result!==0&&(this.decodeMode!==Cn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ft.NumericDecimal:return this.emitNumericEntity(0,2);case Ft.NumericHex:return this.emitNumericEntity(0,3);case Ft.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ft.EntityStart:return 0}}};function FZ(e,t,r,o){let n=(t&ir.BRANCH_LENGTH)>>7,i=t&ir.JUMP_TABLE;if(n===0)return i!==0&&o===i?r:-1;if(i){let l=o-i;return l<0||l>=n?-1:e[r+l]-1}let a=n+1>>1,s=0,c=n-1;for(;s<=c;){let l=s+c>>>1,d=l>>1,p=e[r+d]>>(l&1)*8&255;if(p<o)s=l+1;else if(p>o)c=l-1;else return e[r+a+l]}return-1}var ve;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(ve||(ve={}));var j;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(j||(j={}));function Wo(e){return e===ve.Space||e===ve.NewLine||e===ve.Tab||e===ve.FormFeed||e===ve.CarriageReturn}function Tm(e){return e===ve.Slash||e===ve.Gt||Wo(e)}function zZ(e){return e>=ve.LowerA&&e<=ve.LowerZ||e>=ve.UpperA&&e<=ve.UpperZ}var Hr;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Hr||(Hr={}));var kt={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])},Ta=class{constructor({xmlMode:t=!1,decodeEntities:r=!0},o){this.cbs=o,this.state=j.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=j.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=r,this.entityDecoder=new km(t?Em:Im,(n,i)=>this.emitCodePoint(n,i))}reset(){this.state=j.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=j.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===ve.Lt||!this.decodeEntities&&this.fastForwardTo(ve.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=j.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===ve.Amp&&this.startEntity()}stateSpecialStartSequence(t){let r=this.sequenceIndex===this.currentSequence.length;if(!(r?Tm(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=j.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===ve.Gt||Wo(t)){let r=this.index-this.currentSequence.length;if(this.sectionStart<r){let o=this.index;this.index=r,this.cbs.ontext(this.sectionStart,r),this.index=o}this.isSpecial=!1,this.sectionStart=r+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===kt.TitleEnd?this.decodeEntities&&t===ve.Amp&&this.startEntity():this.fastForwardTo(ve.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===ve.Lt)}stateCDATASequence(t){t===kt.Cdata[this.sequenceIndex]?++this.sequenceIndex===kt.Cdata.length&&(this.state=j.InCommentLike,this.currentSequence=kt.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=j.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===kt.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=j.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!Tm(t):zZ(t)}startSpecial(t,r){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=r,this.state=j.SpecialStartSequence}stateBeforeTagName(t){if(t===ve.ExclamationMark)this.state=j.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===ve.Questionmark)this.state=j.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){let r=t|32;this.sectionStart=this.index,this.xmlMode?this.state=j.InTagName:r===kt.ScriptEnd[2]?this.state=j.BeforeSpecialS:r===kt.TitleEnd[2]||r===kt.XmpEnd[2]?this.state=j.BeforeSpecialT:this.state=j.InTagName}else t===ve.Slash?this.state=j.BeforeClosingTagName:(this.state=j.Text,this.stateText(t))}stateInTagName(t){Tm(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=j.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Wo(t)||(t===ve.Gt?this.state=j.Text:(this.state=this.isTagStartChar(t)?j.InClosingTagName:j.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===ve.Gt||Wo(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=j.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===ve.Gt||this.fastForwardTo(ve.Gt))&&(this.state=j.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===ve.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=j.InSpecialTag,this.sequenceIndex=0):this.state=j.Text,this.sectionStart=this.index+1):t===ve.Slash?this.state=j.InSelfClosingTag:Wo(t)||(this.state=j.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===ve.Gt?(this.cbs.onselfclosingtag(this.index),this.state=j.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Wo(t)||(this.state=j.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===ve.Eq||Tm(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=j.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===ve.Eq?this.state=j.BeforeAttributeValue:t===ve.Slash||t===ve.Gt?(this.cbs.onattribend(Hr.NoValue,this.sectionStart),this.sectionStart=-1,this.state=j.BeforeAttributeName,this.stateBeforeAttributeName(t)):Wo(t)||(this.cbs.onattribend(Hr.NoValue,this.sectionStart),this.state=j.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===ve.DoubleQuote?(this.state=j.InAttributeValueDq,this.sectionStart=this.index+1):t===ve.SingleQuote?(this.state=j.InAttributeValueSq,this.sectionStart=this.index+1):Wo(t)||(this.sectionStart=this.index,this.state=j.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,r){t===r||!this.decodeEntities&&this.fastForwardTo(r)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(r===ve.DoubleQuote?Hr.Double:Hr.Single,this.index+1),this.state=j.BeforeAttributeName):this.decodeEntities&&t===ve.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,ve.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,ve.SingleQuote)}stateInAttributeValueNoQuotes(t){Wo(t)||t===ve.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Hr.Unquoted,this.index),this.state=j.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===ve.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===ve.OpeningSquareBracket?(this.state=j.CDATASequence,this.sequenceIndex=0):this.state=t===ve.Dash?j.BeforeComment:j.InDeclaration}stateInDeclaration(t){(t===ve.Gt||this.fastForwardTo(ve.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=j.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===ve.Gt||this.fastForwardTo(ve.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=j.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===ve.Dash?(this.state=j.InCommentLike,this.currentSequence=kt.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=j.InDeclaration}stateInSpecialComment(t){(t===ve.Gt||this.fastForwardTo(ve.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=j.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){let r=t|32;r===kt.ScriptEnd[3]?this.startSpecial(kt.ScriptEnd,4):r===kt.StyleEnd[3]?this.startSpecial(kt.StyleEnd,4):(this.state=j.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){switch(t|32){case kt.TitleEnd[3]:{this.startSpecial(kt.TitleEnd,4);break}case kt.TextareaEnd[3]:{this.startSpecial(kt.TextareaEnd,4);break}case kt.XmpEnd[3]:{this.startSpecial(kt.XmpEnd,4);break}default:this.state=j.InTagName,this.stateInTagName(t)}}startEntity(){this.baseState=this.state,this.state=j.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Cn.Strict:this.baseState===j.Text||this.baseState===j.InSpecialTag?Cn.Legacy:Cn.Attribute)}stateInEntity(){let t=this.index-this.offset,r=this.entityDecoder.write(this.buffer,t);if(r>=0)this.state=this.baseState,r===0&&(this.index-=1);else{if(t<this.buffer.length&&this.buffer.charCodeAt(t)===ve.Amp){this.state=this.baseState,this.index-=1;return}this.index=this.offset+this.buffer.length-1}}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===j.Text||this.state===j.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===j.InAttributeValueDq||this.state===j.InAttributeValueSq||this.state===j.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){let t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case j.Text:{this.stateText(t);break}case j.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case j.InSpecialTag:{this.stateInSpecialTag(t);break}case j.CDATASequence:{this.stateCDATASequence(t);break}case j.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case j.InAttributeName:{this.stateInAttributeName(t);break}case j.InCommentLike:{this.stateInCommentLike(t);break}case j.InSpecialComment:{this.stateInSpecialComment(t);break}case j.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case j.InTagName:{this.stateInTagName(t);break}case j.InClosingTagName:{this.stateInClosingTagName(t);break}case j.BeforeTagName:{this.stateBeforeTagName(t);break}case j.AfterAttributeName:{this.stateAfterAttributeName(t);break}case j.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case j.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case j.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case j.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case j.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case j.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case j.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case j.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case j.InDeclaration:{this.stateInDeclaration(t);break}case j.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case j.BeforeComment:{this.stateBeforeComment(t);break}case j.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case j.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===j.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===j.InCommentLike?this.currentSequence===kt.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===j.InTagName||this.state===j.BeforeAttributeName||this.state===j.BeforeAttributeValue||this.state===j.AfterAttributeName||this.state===j.InAttributeName||this.state===j.InAttributeValueSq||this.state===j.InAttributeValueDq||this.state===j.InAttributeValueNq||this.state===j.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,r){this.baseState!==j.Text&&this.baseState!==j.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+r,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+r,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}};var fu=new Set(["input","option","optgroup","select","button","datalist","textarea"]),tt=new Set(["p"]),N4=new Set(["thead","tbody"]),R4=new Set(["dd","dt"]),O4=new Set(["rt","rp"]),BZ=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",tt],["h1",tt],["h2",tt],["h3",tt],["h4",tt],["h5",tt],["h6",tt],["select",fu],["input",fu],["output",fu],["button",fu],["datalist",fu],["textarea",fu],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",R4],["dt",R4],["address",tt],["article",tt],["aside",tt],["blockquote",tt],["details",tt],["div",tt],["dl",tt],["fieldset",tt],["figcaption",tt],["figure",tt],["footer",tt],["form",tt],["header",tt],["hr",tt],["main",tt],["nav",tt],["ol",tt],["pre",tt],["section",tt],["table",tt],["ul",tt],["rt",O4],["rp",O4],["tbody",N4],["tfoot",N4]]),ZZ=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),D4=new Set(["math","svg"]),P4=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),GZ=/\s|\//,Gi=class{constructor(t,r={}){var o,n,i,a,s,c;this.options=r,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(o=r.lowerCaseTags)!==null&&o!==void 0?o:this.htmlMode,this.lowerCaseAttributeNames=(n=r.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(i=r.recognizeSelfClosing)!==null&&i!==void 0?i:!this.htmlMode,this.tokenizer=new((a=r.Tokenizer)!==null&&a!==void 0?a:Ta)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(s=this.cbs).onparserinit)===null||c===void 0||c.call(s,this)}ontext(t,r){var o,n;let i=this.getSlice(t,r);this.endIndex=r-1,(n=(o=this.cbs).ontext)===null||n===void 0||n.call(o,i),this.startIndex=r}ontextentity(t,r){var o,n;this.endIndex=r-1,(n=(o=this.cbs).ontext)===null||n===void 0||n.call(o,ml(t)),this.startIndex=r}isVoidElement(t){return this.htmlMode&&ZZ.has(t)}onopentagname(t,r){this.endIndex=r;let o=this.getSlice(t,r);this.lowerCaseTagNames&&(o=o.toLowerCase()),this.emitOpenTag(o)}emitOpenTag(t){var r,o,n,i;this.openTagStart=this.startIndex,this.tagname=t;let a=this.htmlMode&&BZ.get(t);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){let s=this.stack.shift();(o=(r=this.cbs).onclosetag)===null||o===void 0||o.call(r,s,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(D4.has(t)?this.foreignContext.unshift(!0):P4.has(t)&&this.foreignContext.unshift(!1))),(i=(n=this.cbs).onopentagname)===null||i===void 0||i.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var r,o;this.startIndex=this.openTagStart,this.attribs&&((o=(r=this.cbs).onopentag)===null||o===void 0||o.call(r,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,r){var o,n,i,a,s,c,l,d;this.endIndex=r;let f=this.getSlice(t,r);if(this.lowerCaseTagNames&&(f=f.toLowerCase()),this.htmlMode&&(D4.has(f)||P4.has(f))&&this.foreignContext.shift(),this.isVoidElement(f))this.htmlMode&&f==="br"&&((a=(i=this.cbs).onopentagname)===null||a===void 0||a.call(i,"br"),(c=(s=this.cbs).onopentag)===null||c===void 0||c.call(s,"br",{},!0),(d=(l=this.cbs).onclosetag)===null||d===void 0||d.call(l,"br",!1));else{let p=this.stack.indexOf(f);if(p!==-1)for(let m=0;m<=p;m++){let v=this.stack.shift();(n=(o=this.cbs).onclosetag)===null||n===void 0||n.call(o,v,m!==p)}else this.htmlMode&&f==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var r,o;let n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((o=(r=this.cbs).onclosetag)===null||o===void 0||o.call(r,n,!t),this.stack.shift())}onattribname(t,r){this.startIndex=t;let o=this.getSlice(t,r);this.attribname=this.lowerCaseAttributeNames?o.toLowerCase():o}onattribdata(t,r){this.attribvalue+=this.getSlice(t,r)}onattribentity(t){this.attribvalue+=ml(t)}onattribend(t,r){var o,n;this.endIndex=r,(n=(o=this.cbs).onattribute)===null||n===void 0||n.call(o,this.attribname,this.attribvalue,t===Hr.Double?'"':t===Hr.Single?"'":t===Hr.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){let r=t.search(GZ),o=r<0?t:t.substr(0,r);return this.lowerCaseTagNames&&(o=o.toLowerCase()),o}ondeclaration(t,r){this.endIndex=r;let o=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let n=this.getInstructionName(o);this.cbs.onprocessinginstruction(`!${n}`,`!${o}`)}this.startIndex=r+1}onprocessinginstruction(t,r){this.endIndex=r;let o=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let n=this.getInstructionName(o);this.cbs.onprocessinginstruction(`?${n}`,`?${o}`)}this.startIndex=r+1}oncomment(t,r,o){var n,i,a,s;this.endIndex=r,(i=(n=this.cbs).oncomment)===null||i===void 0||i.call(n,this.getSlice(t,r-o)),(s=(a=this.cbs).oncommentend)===null||s===void 0||s.call(a),this.startIndex=r+1}oncdata(t,r,o){var n,i,a,s,c,l,d,f,p,m;this.endIndex=r;let v=this.getSlice(t,r-o);!this.htmlMode||this.options.recognizeCDATA?((i=(n=this.cbs).oncdatastart)===null||i===void 0||i.call(n),(s=(a=this.cbs).ontext)===null||s===void 0||s.call(a,v),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,`[CDATA[${v}]]`),(m=(p=this.cbs).oncommentend)===null||m===void 0||m.call(p)),this.startIndex=r+1}onend(){var t,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let o=0;o<this.stack.length;o++)this.cbs.onclosetag(this.stack[o],!0)}(r=(t=this.cbs).onend)===null||r===void 0||r.call(t)}reset(){var t,r,o,n;(r=(t=this.cbs).onreset)===null||r===void 0||r.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(o=this.cbs).onparserinit)===null||n===void 0||n.call(o,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,r){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let o=this.buffers[0].slice(t-this.bufferOffset,r-this.bufferOffset);for(;r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),o+=this.buffers[0].slice(0,r-this.bufferOffset);return o}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var r,o;if(this.ended){(o=(r=this.cbs).onerror)===null||o===void 0||o.call(r,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var r,o;if(this.ended){(o=(r=this.cbs).onerror)===null||o===void 0||o.call(r,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}};var Cm={};lr(Cm,{CDATA:()=>oS,Comment:()=>eS,Directive:()=>Xw,Doctype:()=>iS,ElementType:()=>Fe,Root:()=>Qw,Script:()=>tS,Style:()=>rS,Tag:()=>nS,Text:()=>Yw,isTag:()=>Kw});var Fe;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(Fe||(Fe={}));function Kw(e){return e.type===Fe.Tag||e.type===Fe.Script||e.type===Fe.Style}var Qw=Fe.Root,Yw=Fe.Text,Xw=Fe.Directive,eS=Fe.Comment,tS=Fe.Script,rS=Fe.Style,nS=Fe.Tag,oS=Fe.CDATA,iS=Fe.Doctype;var $m=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return M4(this,t)}},hl=class extends $m{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},mu=class extends hl{constructor(){super(...arguments),this.type=Fe.Text}get nodeType(){return 3}},gl=class extends hl{constructor(){super(...arguments),this.type=Fe.Comment}get nodeType(){return 8}},vl=class extends hl{constructor(t,r){super(r),this.name=t,this.type=Fe.Directive}get nodeType(){return 1}},yl=class extends $m{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},Al=class extends yl{constructor(){super(...arguments),this.type=Fe.CDATA}get nodeType(){return 4}},hu=class extends yl{constructor(){super(...arguments),this.type=Fe.Root}get nodeType(){return 9}},bl=class extends yl{constructor(t,r,o=[],n=t==="script"?Fe.Script:t==="style"?Fe.Style:Fe.Tag){super(o),this.name=t,this.attribs=r,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,o;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(o=this["x-attribsPrefix"])===null||o===void 0?void 0:o[t]}})}};function zt(e){return Kw(e)}function gu(e){return e.type===Fe.CDATA}function oo(e){return e.type===Fe.Text}function xl(e){return e.type===Fe.Comment}function VZ(e){return e.type===Fe.Directive}function sS(e){return e.type===Fe.Root}function ar(e){return Object.prototype.hasOwnProperty.call(e,"children")}function M4(e,t=!1){let r;if(oo(e))r=new mu(e.data);else if(xl(e))r=new gl(e.data);else if(zt(e)){let o=t?aS(e.children):[],n=new bl(e.name,{...e.attribs},o);o.forEach(i=>i.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=n}else if(gu(e)){let o=t?aS(e.children):[],n=new Al(o);o.forEach(i=>i.parent=n),r=n}else if(sS(e)){let o=t?aS(e.children):[],n=new hu(o);o.forEach(i=>i.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),r=n}else if(VZ(e)){let o=new vl(e.name,e.data);e["x-name"]!=null&&(o["x-name"]=e["x-name"],o["x-publicId"]=e["x-publicId"],o["x-systemId"]=e["x-systemId"]),r=o}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function aS(e){let t=e.map(r=>M4(r,!0));for(let r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}var j4={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},qo=class{constructor(t,r,o){this.dom=[],this.root=new hu(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(o=r,r=j4),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??j4,this.elementCB=o??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new hu(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;let t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,r){let o=this.options.xmlMode?Fe.Tag:void 0,n=new bl(t,r,void 0,o);this.addNode(n),this.tagStack.push(n)}ontext(t){let{lastNode:r}=this;if(r&&r.type===Fe.Text)r.data+=t,this.options.withEndIndices&&(r.endIndex=this.parser.endIndex);else{let o=new mu(t);this.addNode(o),this.lastNode=o}}oncomment(t){if(this.lastNode&&this.lastNode.type===Fe.Comment){this.lastNode.data+=t;return}let r=new gl(t);this.addNode(r),this.lastNode=r}oncommentend(){this.lastNode=null}oncdatastart(){let t=new mu(""),r=new Al([t]);this.addNode(r),t.parent=r,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,r){let o=new vl(t,r);this.addNode(o)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){let r=this.tagStack[this.tagStack.length-1],o=r.children[r.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),r.children.push(t),o&&(t.prev=o,o.next=t),t.parent=r,this.lastNode=null}};var yu={};lr(yu,{DocumentPosition:()=>sn,append:()=>bG,appendChild:()=>AG,compareDocumentPosition:()=>oR,existsOne:()=>rR,filter:()=>vu,find:()=>tR,findAll:()=>_G,findOne:()=>Mm,findOneChild:()=>SG,getAttributeValue:()=>fG,getChildren:()=>X4,getElementById:()=>TG,getElements:()=>kG,getElementsByClassName:()=>CG,getElementsByTagName:()=>Ca,getElementsByTagType:()=>$G,getFeed:()=>Il,getInnerHTML:()=>dG,getName:()=>hG,getOuterHTML:()=>Y4,getParent:()=>eR,getSiblings:()=>pG,getText:()=>Pm,hasAttrib:()=>mG,hasChildren:()=>ar,innerText:()=>vS,isCDATA:()=>gu,isComment:()=>xl,isDocument:()=>sS,isTag:()=>zt,isText:()=>oo,nextElementSibling:()=>gG,prepend:()=>wG,prependChild:()=>xG,prevElementSibling:()=>vG,removeElement:()=>_l,removeSubsets:()=>NG,replaceElement:()=>yG,testElement:()=>EG,textContent:()=>Sl,uniqueSort:()=>RG});var U4=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var L4=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var uS,HZ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),cS=(uS=String.fromCodePoint)!==null&&uS!==void 0?uS:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function lS(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=HZ.get(e))!==null&&t!==void 0?t:e}var Zt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Zt||(Zt={}));var WZ=32,Vi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Vi||(Vi={}));function dS(e){return e>=Zt.ZERO&&e<=Zt.NINE}function qZ(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_F||e>=Zt.LOWER_A&&e<=Zt.LOWER_F}function JZ(e){return e>=Zt.UPPER_A&&e<=Zt.UPPER_Z||e>=Zt.LOWER_A&&e<=Zt.LOWER_Z||dS(e)}function KZ(e){return e===Zt.EQUALS||JZ(e)}var Bt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Bt||(Bt={}));var Jo;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Jo||(Jo={}));var Nm=class{constructor(t,r,o){this.decodeTree=t,this.emitCodePoint=r,this.errors=o,this.state=Bt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Jo.Strict}startEntity(t){this.decodeMode=t,this.state=Bt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Bt.EntityStart:return t.charCodeAt(r)===Zt.NUM?(this.state=Bt.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Bt.NamedEntity,this.stateNamedEntity(t,r));case Bt.NumericStart:return this.stateNumericStart(t,r);case Bt.NumericDecimal:return this.stateNumericDecimal(t,r);case Bt.NumericHex:return this.stateNumericHex(t,r);case Bt.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|WZ)===Zt.LOWER_X?(this.state=Bt.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Bt.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,o,n){if(r!==o){let i=o-r;this.result=this.result*Math.pow(n,i)+parseInt(t.substr(r,i),n),this.consumed+=i}}stateNumericHex(t,r){let o=r;for(;r<t.length;){let n=t.charCodeAt(r);if(dS(n)||qZ(n))r+=1;else return this.addToNumericResult(t,o,r,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,o,r,16),-1}stateNumericDecimal(t,r){let o=r;for(;r<t.length;){let n=t.charCodeAt(r);if(dS(n))r+=1;else return this.addToNumericResult(t,o,r,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,o,r,10),-1}emitNumericEntity(t,r){var o;if(this.consumed<=r)return(o=this.errors)===null||o===void 0||o.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Zt.SEMI)this.consumed+=1;else if(this.decodeMode===Jo.Strict)return 0;return this.emitCodePoint(lS(this.result),this.consumed),this.errors&&(t!==Zt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){let{decodeTree:o}=this,n=o[this.treeIndex],i=(n&Vi.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){let a=t.charCodeAt(r);if(this.treeIndex=QZ(o,n,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Jo.Attribute&&(i===0||KZ(a))?0:this.emitNotTerminatedNamedEntity();if(n=o[this.treeIndex],i=(n&Vi.VALUE_LENGTH)>>14,i!==0){if(a===Zt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Jo.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:r,decodeTree:o}=this,n=(o[r]&Vi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,o){let{decodeTree:n}=this;return this.emitCodePoint(r===1?n[t]&~Vi.VALUE_LENGTH:n[t+1],o),r===3&&this.emitCodePoint(n[t+2],o),o}end(){var t;switch(this.state){case Bt.NamedEntity:return this.result!==0&&(this.decodeMode!==Jo.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Bt.NumericDecimal:return this.emitNumericEntity(0,2);case Bt.NumericHex:return this.emitNumericEntity(0,3);case Bt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Bt.EntityStart:return 0}}};function F4(e){let t="",r=new Nm(e,o=>t+=cS(o));return function(n,i){let a=0,s=0;for(;(s=n.indexOf("&",s))>=0;){t+=n.slice(a,s),r.startEntity(i);let l=r.write(n,s+1);if(l<0){a=s+r.end();break}a=s+l,s=l===0?a+1:a}let c=t+n.slice(a);return t="",c}}function QZ(e,t,r,o){let n=(t&Vi.BRANCH_LENGTH)>>7,i=t&Vi.JUMP_TABLE;if(n===0)return i!==0&&o===i?r:-1;if(i){let c=o-i;return c<0||c>=n?-1:e[r+c]-1}let a=r,s=a+n-1;for(;a<=s;){let c=a+s>>>1,l=e[c];if(l<o)a=c+1;else if(l>o)s=c-1;else return e[c+n]}return-1}var Yne=F4(U4),Xne=F4(L4);function Rm(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}var YZ=new Map(Rm([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(Rm([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(Rm([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(Rm([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]));var pS=/["&'<>$\x80-\uFFFF]/g,z4=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),B4=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function wl(e){let t="",r=0,o;for(;(o=pS.exec(e))!==null;){let n=o.index,i=e.charCodeAt(n),a=z4.get(i);a!==void 0?(t+=e.substring(r,n)+a,r=n+1):(t+=`${e.substring(r,n)}&#x${B4(e,n).toString(16)};`,r=pS.lastIndex+=+((i&64512)===55296))}return t+e.substr(r)}function fS(e,t){return function(o){let n,i=0,a="";for(;n=e.exec(o);)i!==n.index&&(a+=o.substring(i,n.index)),a+=t.get(n[0].charCodeAt(0)),i=n.index+1;return a+o.substring(i)}}var Z4=fS(/[&<>'"]/g,z4),Om=fS(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Dm=fS(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var G4;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(G4||(G4={}));var V4;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(V4||(V4={}));var q4=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),J4=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e]));var eG=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function tG(e){return e.replace(/"/g,"&quot;")}function rG(e,t){var r;if(!e)return;let o=((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)===!1?tG:t.xmlMode||t.encodeEntities!=="utf8"?wl:Om;return Object.keys(e).map(n=>{var i,a;let s=(i=e[n])!==null&&i!==void 0?i:"";return t.xmlMode==="foreign"&&(n=(a=J4.get(n))!==null&&a!==void 0?a:n),!t.emptyAttrs&&!t.xmlMode&&s===""?n:`${n}="${o(s)}"`}).join(" ")}var K4=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function gS(e,t={}){let r="length"in e?e:[e],o="";for(let n=0;n<r.length;n++)o+=nG(r[n],t);return o}var Q4=gS;function nG(e,t){switch(e.type){case Qw:return gS(e.children,t);case iS:case Xw:return sG(e);case eS:return lG(e);case oS:return cG(e);case tS:case rS:case nS:return aG(e,t);case Yw:return uG(e,t)}}var oG=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),iG=new Set(["svg","math"]);function aG(e,t){var r;t.xmlMode==="foreign"&&(e.name=(r=q4.get(e.name))!==null&&r!==void 0?r:e.name,e.parent&&oG.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&iG.has(e.name)&&(t={...t,xmlMode:"foreign"});let o=`<${e.name}`,n=rG(e.attribs,t);return n&&(o+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&K4.has(e.name))?(t.xmlMode||(o+=" "),o+="/>"):(o+=">",e.children.length>0&&(o+=gS(e.children,t)),(t.xmlMode||!K4.has(e.name))&&(o+=`</${e.name}>`)),o}function sG(e){return`<${e.data}>`}function uG(e,t){var r;let o=e.data||"";return((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&eG.has(e.parent.name))&&(o=t.xmlMode||t.encodeEntities!=="utf8"?wl(o):Dm(o)),o}function cG(e){return`<![CDATA[${e.children[0].data}]]>`}function lG(e){return`<!--${e.data}-->`}function Y4(e,t){return Q4(e,t)}function dG(e,t){return ar(e)?e.children.map(r=>Y4(r,t)).join(""):""}function Pm(e){return Array.isArray(e)?e.map(Pm).join(""):zt(e)?e.name==="br"?`
124
- `:Pm(e.children):gu(e)?Pm(e.children):oo(e)?e.data:""}function Sl(e){return Array.isArray(e)?e.map(Sl).join(""):ar(e)&&!xl(e)?Sl(e.children):oo(e)?e.data:""}function vS(e){return Array.isArray(e)?e.map(vS).join(""):ar(e)&&(e.type===Fe.Tag||gu(e))?vS(e.children):oo(e)?e.data:""}function X4(e){return ar(e)?e.children:[]}function eR(e){return e.parent||null}function pG(e){let t=eR(e);if(t!=null)return X4(t);let r=[e],{prev:o,next:n}=e;for(;o!=null;)r.unshift(o),{prev:o}=o;for(;n!=null;)r.push(n),{next:n}=n;return r}function fG(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function mG(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function hG(e){return e.name}function gG(e){let{next:t}=e;for(;t!==null&&!zt(t);)({next:t}=t);return t}function vG(e){let{prev:t}=e;for(;t!==null&&!zt(t);)({prev:t}=t);return t}function _l(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function yG(e,t){let r=t.prev=e.prev;r&&(r.next=t);let o=t.next=e.next;o&&(o.prev=t);let n=t.parent=e.parent;if(n){let i=n.children;i[i.lastIndexOf(e)]=t,e.parent=null}}function AG(e,t){if(_l(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function bG(e,t){_l(t);let{parent:r}=e,o=e.next;if(t.next=o,t.prev=e,e.next=t,t.parent=r,o){if(o.prev=t,r){let n=r.children;n.splice(n.lastIndexOf(o),0,t)}}else r&&r.children.push(t)}function xG(e,t){if(_l(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function wG(e,t){_l(t);let{parent:r}=e;if(r){let o=r.children;o.splice(o.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}function vu(e,t,r=!0,o=1/0){return tR(e,Array.isArray(t)?t:[t],r,o)}function tR(e,t,r,o){let n=[],i=[Array.isArray(t)?t:[t]],a=[0];for(;;){if(a[0]>=i[0].length){if(a.length===1)return n;i.shift(),a.shift();continue}let s=i[0][a[0]++];if(e(s)&&(n.push(s),--o<=0))return n;r&&ar(s)&&s.children.length>0&&(a.unshift(0),i.unshift(s.children))}}function SG(e,t){return t.find(e)}function Mm(e,t,r=!0){let o=Array.isArray(t)?t:[t];for(let n=0;n<o.length;n++){let i=o[n];if(zt(i)&&e(i))return i;if(r&&ar(i)&&i.children.length>0){let a=Mm(e,i.children,!0);if(a)return a}}return null}function rR(e,t){return(Array.isArray(t)?t:[t]).some(r=>zt(r)&&e(r)||ar(r)&&rR(e,r.children))}function _G(e,t){let r=[],o=[Array.isArray(t)?t:[t]],n=[0];for(;;){if(n[0]>=o[0].length){if(o.length===1)return r;o.shift(),n.shift();continue}let i=o[0][n[0]++];zt(i)&&e(i)&&r.push(i),ar(i)&&i.children.length>0&&(n.unshift(0),o.unshift(i.children))}}var jm={tag_name(e){return typeof e=="function"?t=>zt(t)&&e(t.name):e==="*"?zt:t=>zt(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>oo(t)&&e(t.data):t=>oo(t)&&t.data===e}};function yS(e,t){return typeof t=="function"?r=>zt(r)&&t(r.attribs[e]):r=>zt(r)&&r.attribs[e]===t}function IG(e,t){return r=>e(r)||t(r)}function nR(e){let t=Object.keys(e).map(r=>{let o=e[r];return Object.prototype.hasOwnProperty.call(jm,r)?jm[r](o):yS(r,o)});return t.length===0?null:t.reduce(IG)}function EG(e,t){let r=nR(e);return r?r(t):!0}function kG(e,t,r,o=1/0){let n=nR(e);return n?vu(n,t,r,o):[]}function TG(e,t,r=!0){return Array.isArray(t)||(t=[t]),Mm(yS("id",e),t,r)}function Ca(e,t,r=!0,o=1/0){return vu(jm.tag_name(e),t,r,o)}function CG(e,t,r=!0,o=1/0){return vu(yS("class",e),t,r,o)}function $G(e,t,r=!0,o=1/0){return vu(jm.tag_type(e),t,r,o)}function NG(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let o=r.parent;o;o=o.parent)if(e.includes(o)){e.splice(t,1);break}}return e}var sn;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(sn||(sn={}));function oR(e,t){let r=[],o=[];if(e===t)return 0;let n=ar(e)?e:e.parent;for(;n;)r.unshift(n),n=n.parent;for(n=ar(t)?t:t.parent;n;)o.unshift(n),n=n.parent;let i=Math.min(r.length,o.length),a=0;for(;a<i&&r[a]===o[a];)a++;if(a===0)return sn.DISCONNECTED;let s=r[a-1],c=s.children,l=r[a],d=o[a];return c.indexOf(l)>c.indexOf(d)?s===t?sn.FOLLOWING|sn.CONTAINED_BY:sn.FOLLOWING:s===e?sn.PRECEDING|sn.CONTAINS:sn.PRECEDING}function RG(e){return e=e.filter((t,r,o)=>!o.includes(t,r+1)),e.sort((t,r)=>{let o=oR(t,r);return o&sn.PRECEDING?-1:o&sn.FOLLOWING?1:0}),e}function Il(e){let t=Um(jG,e);return t?t.name==="feed"?OG(t):DG(t):null}function OG(e){var t;let r=e.children,o={type:"atom",items:Ca("entry",r).map(a=>{var s;let{children:c}=a,l={media:iR(c)};Rr(l,"id","id",c),Rr(l,"title","title",c);let d=(s=Um("link",c))===null||s===void 0?void 0:s.attribs.href;d&&(l.link=d);let f=Hi("summary",c)||Hi("content",c);f&&(l.description=f);let p=Hi("updated",c);return p&&(l.pubDate=new Date(p)),l})};Rr(o,"id","id",r),Rr(o,"title","title",r);let n=(t=Um("link",r))===null||t===void 0?void 0:t.attribs.href;n&&(o.link=n),Rr(o,"description","subtitle",r);let i=Hi("updated",r);return i&&(o.updated=new Date(i)),Rr(o,"author","email",r,!0),o}function DG(e){var t,r;let o=(r=(t=Um("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&r!==void 0?r:[],n={type:e.name.substr(0,3),id:"",items:Ca("item",e.children).map(a=>{let{children:s}=a,c={media:iR(s)};Rr(c,"id","guid",s),Rr(c,"title","title",s),Rr(c,"link","link",s),Rr(c,"description","description",s);let l=Hi("pubDate",s)||Hi("dc:date",s);return l&&(c.pubDate=new Date(l)),c})};Rr(n,"title","title",o),Rr(n,"link","link",o),Rr(n,"description","description",o);let i=Hi("lastBuildDate",o);return i&&(n.updated=new Date(i)),Rr(n,"author","managingEditor",o,!0),n}var PG=["url","type","lang"],MG=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function iR(e){return Ca("media:content",e).map(t=>{let{attribs:r}=t,o={medium:r.medium,isDefault:!!r.isDefault};for(let n of PG)r[n]&&(o[n]=r[n]);for(let n of MG)r[n]&&(o[n]=parseInt(r[n],10));return r.expression&&(o.expression=r.expression),o})}function Um(e,t){return Ca(e,t,!0,1)[0]}function Hi(e,t,r=!1){return Sl(Ca(e,t,r,1)).trim()}function Rr(e,t,r,o,n=!1){let i=Hi(r,o,n);i&&(e[t]=i)}function jG(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}function aR(e,t){let r=new qo(void 0,t);return new Gi(r,t).end(e),r.root}function sR(e,t){return aR(e,t).children}function UG(e,t,r){let o=new qo(n=>e(n,o.root),t,r);return new Gi(o,t)}function LG(e,t,r){let o=new qo(e,t,r);return new Gi(o,t)}var FG={xmlMode:!0};function zG(e,t=FG){return Il(sR(e,t))}var uR=new Set(["ARTICLE","ASIDE","BLOCKQUOTE","BODY","BR","BUTTON","CANVAS","CAPTION","COL","COLGROUP","DD","DIV","DL","DT","EMBED","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","LI","UL","OL","P"]),bS=-1,xS=1,wS=4,SS=8,_S=128,cR=1,IS=2,ES=4,lR=8,dR=16,pR=32,$a="http://www.w3.org/2000/svg";var{assign:fR,create:mR,defineProperties:hR,entries:gR,getOwnPropertyDescriptors:Xoe,keys:vR,setPrototypeOf:Tt}=Object;var $n=String;var Dt=e=>e.nodeType===1?e[ce]:e,un=({ownerDocument:e})=>e[Tn].ignoreCase,Or=(e,t)=>{e[H]=t,t[Ye]=e},El=(e,t,r)=>{Or(e,t),Or(Dt(t),r)},kS=(e,t,r,o)=>{Or(e,t),Or(Dt(r),o)},Ko=(e,t,r)=>{Or(e,t),Or(t,r)},kl=({localName:e,ownerDocument:t})=>t[Tn].ignoreCase?e.toUpperCase():e,Lm=(e,t)=>{e&&(e[H]=t),t&&(t[Ye]=e)},Fm=(e,t)=>{let r=e.createDocumentFragment(),o=e.createElement("");o.innerHTML=t;let{firstChild:n,lastChild:i}=o;if(n){kS(r,n,i,r[ce]);let a=n;do a.parentNode=r;while(a!==i&&(a=Dt(a)[H]))}return r};var io=new WeakMap;var Bm=!1,Na=new WeakMap,Qo=new WeakMap,Ra=(e,t,r,o)=>{Bm&&Qo.has(e)&&e.attributeChangedCallback&&e.constructor.observedAttributes.includes(t)&&e.attributeChangedCallback(t,r,o)},bR=(e,t)=>r=>{if(Qo.has(r)){let o=Qo.get(r);o.connected!==t&&r.isConnected===t&&(o.connected=t,e in r&&r[e]())}},yR=bR("connectedCallback",!0),Tl=e=>{if(Bm){yR(e),io.has(e)&&(e=io.get(e).shadowRoot);let{[H]:t,[ce]:r}=e;for(;t!==r;)t.nodeType===1&&yR(t),t=t[H]}},AR=bR("disconnectedCallback",!1),xR=e=>{if(Bm){AR(e),io.has(e)&&(e=io.get(e).shadowRoot);let{[H]:t,[ce]:r}=e;for(;t!==r;)t.nodeType===1&&AR(t),t=t[H]}},zm=class{constructor(t){this.ownerDocument=t,this.registry=new Map,this.waiting=new Map,this.active=!1}define(t,r,o={}){let{ownerDocument:n,registry:i,waiting:a}=this;if(i.has(t))throw new Error("unable to redefine "+t);if(Na.has(r))throw new Error("unable to redefine the same class: "+r);this.active=Bm=!0;let{extends:s}=o;Na.set(r,{ownerDocument:n,options:{is:s?t:""},localName:s||t});let c=s?l=>l.localName===s&&l.getAttribute("is")===t:l=>l.localName===t;if(i.set(t,{Class:r,check:c}),a.has(t)){for(let l of a.get(t))l(r);a.delete(t)}n.querySelectorAll(s?`${s}[is="${t}"]`:t).forEach(this.upgrade,this)}upgrade(t){if(Qo.has(t))return;let{ownerDocument:r,registry:o}=this,n=t.getAttribute("is")||t.localName;if(o.has(n)){let{Class:i,check:a}=o.get(n);if(a(t)){let{attributes:s,isConnected:c}=t;for(let d of s)t.removeAttributeNode(d);let l=gR(t);for(let[d]of l)delete t[d];Tt(t,i.prototype),r[Zi]={element:t,values:l},new i(r,n),Qo.set(t,{connected:c});for(let d of s)t.setAttributeNode(d);c&&t.connectedCallback&&t.connectedCallback()}}}whenDefined(t){let{registry:r,waiting:o}=this;return new Promise(n=>{r.has(t)?n(r.get(t).Class):(o.has(t)||o.set(t,[]),o.get(t).push(n))})}get(t){let r=this.registry.get(t);return r&&r.Class}getName(t){if(Na.has(t)){let{localName:r}=Na.get(t);return r}return null}};var{Parser:BG}=AS,wR=!0,Oa=(e,t,r)=>{let o=e[ce];return t.parentNode=e,El(o[Ye],t,o),r&&t.nodeType===1&&Tl(t),t},ZG=(e,t,r,o,n)=>{r[Ue]=o,r.ownerElement=e,Ko(t[Ye],r,t),r.name==="class"&&(e.className=o),n&&Ra(e,r.name,null,o)};var Zm=(e,t,r)=>{let{active:o,registry:n}=e[wr],i=e,a=null,s=!1;wR=!1;let c=new BG({onprocessinginstruction(l,d){l.toLowerCase()==="!doctype"&&(e.doctype=d.slice(l.length).trim())},onopentag(l,d){let f=!0;if(t){if(a)i=Oa(i,e.createElementNS($a,l),o),i.ownerSVGElement=a,f=!1;else if(l==="svg"||l==="SVG")a=e.createElementNS($a,l),i=Oa(i,a,o),f=!1;else if(o){let m=l.includes("-")?l:d.is||"";if(m&&n.has(m)){let{Class:v}=n.get(m);i=Oa(i,new v,o),delete d.is,f=!1}}}f&&(i=Oa(i,e.createElement(l),!1));let p=i[ce];for(let m of vR(d))ZG(i,p,e.createAttribute(m),d[m],o)},oncomment(l){Oa(i,e.createComment(l),o)},ontext(l){s?Oa(i,e.createCDATASection(l),o):Oa(i,e.createTextNode(l),o)},oncdatastart(){s=!0},oncdataend(){s=!1},onclosetag(){t&&i===a&&(a=null),i=i.parentNode}},{lowerCaseAttributeNames:!1,decodeEntities:!0,xmlMode:!t});return c.write(r),c.end(),wR=!0,e};var Au=new Map,je=(e,t)=>{for(let r of[].concat(e))Au.set(r,t),Au.set(r.toUpperCase(),t)};var SR=({[H]:e,[ce]:t},r)=>{for(;e!==t;){switch(e.nodeType){case 2:TS(e,r);break;case 3:case 8:case 4:CS(e,r);break;case 1:NS(e,r),e=Dt(e);break;case 10:$S(e,r);break}e=e[H]}let o=r.length-1,n=r[o];typeof n=="number"&&n<0?r[o]+=-1:r.push(-1)},TS=(e,t)=>{t.push(2,e.name);let r=e[Ue].trim();r&&t.push(r)},CS=(e,t)=>{let r=e[Ue];r.trim()&&t.push(e.nodeType,r)},_R=(e,t)=>{t.push(e.nodeType),SR(e,t)},$S=({name:e,publicId:t,systemId:r},o)=>{o.push(10,e),t&&o.push(t),r&&o.push(r)},NS=(e,t)=>{t.push(1,e.localName),SR(e,t)};var ER=(e,t,r,o,n,i,a)=>({type:e,target:t,addedNodes:o,removedNodes:n,attributeName:i,oldValue:a,previousSibling:r?.previousSibling||null,nextSibling:r?.nextSibling||null}),IR=(e,t,r,o,n,i)=>{if(!o||o.includes(r)){let{callback:a,records:s,scheduled:c}=e;s.push(ER("attributes",t,null,[],[],r,n?i:void 0)),c||(e.scheduled=!0,Promise.resolve().then(()=>{e.scheduled=!1,a(s.splice(0),e)}))}},Cl=(e,t,r)=>{let{ownerDocument:o}=e,{active:n,observers:i}=o[no];if(n){for(let a of i)for(let[s,{childList:c,subtree:l,attributes:d,attributeFilter:f,attributeOldValue:p}]of a.nodes)if(c){if(l&&(s===o||s.contains(e))||!l&&s.children.includes(e)){IR(a,e,t,f,p,r);break}}else if(d&&s===e){IR(a,e,t,f,p,r);break}}},Wi=(e,t)=>{let{ownerDocument:r}=e,{active:o,observers:n}=r[no];if(o){for(let i of n)for(let[a,{subtree:s,childList:c,characterData:l}]of i.nodes)if(c&&(t&&(a===t||s&&a.contains(t))||!t&&(s&&(a===r||a.contains(e))||!s&&a[l?"childNodes":"children"].includes(e)))){let{callback:d,records:f,scheduled:p}=i;f.push(ER("childList",a,e,t?[]:[e],t?[e]:[])),p||(i.scheduled=!0,Promise.resolve().then(()=>{i.scheduled=!1,d(f.splice(0),i)}));break}}},Gm=class{constructor(t){let r=new Set;this.observers=r,this.active=!1,this.class=class{constructor(n){this.callback=n,this.nodes=new Map,this.records=[],this.scheduled=!1}disconnect(){this.records.splice(0),this.nodes.clear(),r.delete(this),t[no].active=!!r.size}observe(n,i={subtree:!1,childList:!1,attributes:!1,attributeFilter:null,attributeOldValue:!1,characterData:!1}){("attributeOldValue"in i||"attributeFilter"in i)&&(i.attributes=!0),i.childList=!!i.childList,i.subtree=!!i.subtree,this.nodes.set(n,i),r.add(this),t[no].active=!0}takeRecords(){return this.records.splice(0)}}}};var kR=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","class","contenteditable","controls","default","defer","disabled","draggable","formnovalidate","hidden","id","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","style","truespeed"]),$l=(e,t)=>{let{[Ue]:r,name:o}=t;t.ownerElement=e,Ko(e,t,e[H]),o==="class"&&(e.className=r),Cl(e,o,null),Ra(e,o,null,r)},RS=(e,t)=>{let{[Ue]:r,name:o}=t;Or(t[Ye],t[H]),t.ownerElement=t[Ye]=t[H]=null,o==="class"&&(e[zi]=null),Cl(e,o,r),Ra(e,o,r,null)},Me={get(e,t){return e.hasAttribute(t)},set(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)}},Nn={get(e,t){return parseFloat(e.getAttribute(t)||0)},set(e,t,r){e.setAttribute(t,r)}},D={get(e,t){return e.getAttribute(t)||""},set(e,t,r){e.setAttribute(t,r)}};var Vm=new WeakMap;function GG(e,t){return typeof t=="function"?t.call(e.target,e):t.handleEvent(e),e._stopImmediatePropagationFlag}function VG({currentTarget:e,target:t}){let r=Vm.get(e);if(r&&r.has(this.type)){let o=r.get(this.type);e===t?this.eventPhase=this.AT_TARGET:this.eventPhase=this.BUBBLING_PHASE,this.currentTarget=e,this.target=t;for(let[n,i]of o)if(i&&i.once&&o.delete(n),GG(this,n))break;return delete this.currentTarget,delete this.target,this.cancelBubble}}var qi=class{constructor(){Vm.set(this,new Map)}_getParent(){return null}addEventListener(t,r,o){let n=Vm.get(this);n.has(t)||n.set(t,new Map),n.get(t).set(r,o)}removeEventListener(t,r){let o=Vm.get(this);if(o.has(t)){let n=o.get(t);n.delete(r)&&!n.size&&o.delete(t)}}dispatchEvent(t){let r=this;for(t.eventPhase=t.CAPTURING_PHASE;r;)r.dispatchEvent&&t._path.push({currentTarget:r,target:this}),r=t.bubbles&&r._getParent&&r._getParent();return t._path.some(VG,t),t._path=[],t.eventPhase=t.NONE,!t.defaultPrevented}};var Pt=class extends Array{item(t){return t<this.length?this[t]:null}};var TR=({parentNode:e})=>{let t=0;for(;e;)t++,e=e.parentNode;return t},Dr=class extends qi{static get ELEMENT_NODE(){return 1}static get ATTRIBUTE_NODE(){return 2}static get TEXT_NODE(){return 3}static get CDATA_SECTION_NODE(){return 4}static get COMMENT_NODE(){return 8}static get DOCUMENT_NODE(){return 9}static get DOCUMENT_FRAGMENT_NODE(){return 11}static get DOCUMENT_TYPE_NODE(){return 10}constructor(t,r,o){super(),this.ownerDocument=t,this.localName=r,this.nodeType=o,this.parentNode=null,this[H]=null,this[Ye]=null}get ELEMENT_NODE(){return 1}get ATTRIBUTE_NODE(){return 2}get TEXT_NODE(){return 3}get CDATA_SECTION_NODE(){return 4}get COMMENT_NODE(){return 8}get DOCUMENT_NODE(){return 9}get DOCUMENT_FRAGMENT_NODE(){return 11}get DOCUMENT_TYPE_NODE(){return 10}get baseURI(){let t=this.nodeType===9?this:this.ownerDocument;if(t){let r=t.querySelector("base");if(r)return r.getAttribute("href");let{location:o}=t.defaultView;if(o)return o.href}return null}get isConnected(){return!1}get nodeName(){return this.localName}get parentElement(){return null}get previousSibling(){return null}get previousElementSibling(){return null}get nextSibling(){return null}get nextElementSibling(){return null}get childNodes(){return new Pt}get firstChild(){return null}get lastChild(){return null}get nodeValue(){return null}set nodeValue(t){}get textContent(){return null}set textContent(t){}normalize(){}cloneNode(){return null}contains(){return!1}insertBefore(t,r){return t}appendChild(t){return t}replaceChild(t,r){return r}removeChild(t){return t}toString(){return""}hasChildNodes(){return!!this.lastChild}isSameNode(t){return this===t}compareDocumentPosition(t){let r=0;if(this!==t){let o=TR(this),n=TR(t);if(o<n)r+=ES,this.contains(t)&&(r+=dR);else if(n<o)r+=IS,t.contains(this)&&(r+=lR);else if(o&&n){let{childNodes:i}=this.parentNode;i.indexOf(this)<i.indexOf(t)?r+=ES:r+=IS}(!o||!n)&&(r+=pR,r+=cR)}return r}isEqualNode(t){if(this===t)return!0;if(this.nodeType===t.nodeType){switch(this.nodeType){case 9:case 11:{let r=this.childNodes,o=t.childNodes;return r.length===o.length&&r.every((n,i)=>n.isEqualNode(o[i]))}}return this.toString()===t.toString()}return!1}_getParent(){return this.parentNode}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}};var{replace:HG}="",WG=/[<>&\xA0]/g,qG={"\xA0":"&#160;","&":"&amp;","<":"&lt;",">":"&gt;"},JG=e=>qG[e],bu=e=>HG.call(e,WG,JG);var KG=/"/g,ln=class e extends Dr{constructor(t,r,o=""){super(t,r,2),this.ownerElement=null,this.name=$n(r),this[Ue]=$n(o),this[lu]=!1}get value(){return this[Ue]}set value(t){let{[Ue]:r,name:o,ownerElement:n}=this;this[Ue]=$n(t),this[lu]=!0,n&&(Cl(n,o,r),Ra(n,o,r,this[Ue]))}cloneNode(){let{ownerDocument:t,name:r,[Ue]:o}=this;return new e(t,r,o)}toString(){let{name:t,[Ue]:r}=this;if(kR.has(t)&&!r)return un(this)?t:`${t}=""`;let o=(un(this)?r:bu(r)).replace(KG,"&quot;");return`${t}="${o}"`}toJSON(){let t=[];return TS(this,t),t}};var Hm=({ownerDocument:e,parentNode:t})=>{for(;t;){if(t===e)return!0;t=t.parentNode||t.host}return!1},Wm=({parentNode:e})=>{if(e)switch(e.nodeType){case 9:case 11:return null}return e},Yo=({[Ye]:e})=>{switch(e?e.nodeType:0){case-1:return e[Lt];case 3:case 8:case 4:return e}return null},On=e=>{let t=Dt(e)[H];return t&&(t.nodeType===-1?null:t)};var xu=e=>{let t=On(e);for(;t&&t.nodeType!==1;)t=On(t);return t},qm=e=>{let t=Yo(e);for(;t&&t.nodeType!==1;)t=Yo(t);return t};var OS=(e,t)=>{let r=e.createDocumentFragment();return r.append(...t),r},Jm=(e,t)=>{let{ownerDocument:r,parentNode:o}=e;o&&o.insertBefore(OS(r,t),e)},Km=(e,t)=>{let{ownerDocument:r,parentNode:o}=e;o&&o.insertBefore(OS(r,t),Dt(e)[H])},Nl=(e,t)=>{let{ownerDocument:r,parentNode:o}=e;o&&(t.includes(e)&&Nl(e,[e=e.cloneNode()]),o.insertBefore(OS(r,t),e),e.remove())},Qm=(e,t,r)=>{let{parentNode:o,nodeType:n}=t;(e||r)&&(Lm(e,r),t[Ye]=null,Dt(t)[H]=null),o&&(t.parentNode=null,Wi(t,o),n===1&&xR(t))};var Dn=class extends Dr{constructor(t,r,o,n){super(t,r,o),this[Ue]=$n(n)}get isConnected(){return Hm(this)}get parentElement(){return Wm(this)}get previousSibling(){return Yo(this)}get nextSibling(){return On(this)}get previousElementSibling(){return qm(this)}get nextElementSibling(){return xu(this)}before(...t){Jm(this,t)}after(...t){Km(this,t)}replaceWith(...t){Nl(this,t)}remove(){Qm(this[Ye],this,this[H])}get data(){return this[Ue]}set data(t){this[Ue]=$n(t),Wi(this,this.parentNode)}get nodeValue(){return this.data}set nodeValue(t){this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}get length(){return this.data.length}substringData(t,r){return this.data.substr(t,r)}appendData(t){this.data+=t}insertData(t,r){let{data:o}=this;this.data=o.slice(0,t)+r+o.slice(t)}deleteData(t,r){let{data:o}=this;this.data=o.slice(0,t)+o.slice(t+r)}replaceData(t,r,o){let{data:n}=this;this.data=n.slice(0,t)+o+n.slice(t+r)}toJSON(){let t=[];return CS(this,t),t}};var Ji=class e extends Dn{constructor(t,r=""){super(t,"#cdatasection",4,r)}cloneNode(){let{ownerDocument:t,[Ue]:r}=this;return new e(t,r)}toString(){return`<![CDATA[${this[Ue]}]]>`}};var Ki=class e extends Dn{constructor(t,r=""){super(t,"#comment",8,r)}cloneNode(){let{ownerDocument:t,[Ue]:r}=this;return new e(t,r)}toString(){return`<!--${this[Ue]}-->`}};var WS=Ut(Da(),1);var Pn=Ut(Ol(),1),ei=Ut(Da(),1);var Sr=Ut(Ol(),1),ZR=new Map([[Sr.SelectorType.Universal,50],[Sr.SelectorType.Tag,30],[Sr.SelectorType.Attribute,1],[Sr.SelectorType.Pseudo,0]]);function Dl(e){return!ZR.has(e.type)}var dV=new Map([[Sr.AttributeAction.Exists,10],[Sr.AttributeAction.Equals,8],[Sr.AttributeAction.Not,7],[Sr.AttributeAction.Start,6],[Sr.AttributeAction.End,6],[Sr.AttributeAction.Any,5]]);function PS(e){let t=e.map(GR);for(let r=1;r<e.length;r++){let o=t[r];if(!(o<0))for(let n=r-1;n>=0&&o<t[n];n--){let i=e[n+1];e[n+1]=e[n],e[n]=i,t[n+1]=t[n],t[n]=o}}}function GR(e){var t,r;let o=(t=ZR.get(e.type))!==null&&t!==void 0?t:-1;return e.type===Sr.SelectorType.Attribute?(o=(r=dV.get(e.action))!==null&&r!==void 0?r:4,e.action===Sr.AttributeAction.Equals&&e.name==="id"&&(o=9),e.ignoreCase&&(o>>=1)):e.type===Sr.SelectorType.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?o=0:Array.isArray(e.data)?(o=Math.min(...e.data.map(n=>Math.min(...n.map(GR)))),o<0&&(o=0)):o=2:o=3),o}var Pl=Ut(Da(),1),pV=/[-[\]{}()*+?.,\\^$|#\s]/g;function VR(e){return e.replace(pV,"\\$&")}var fV=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function Pa(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&fV.has(e.name)}var HR={equals(e,t,r){let{adapter:o}=r,{name:n}=t,{value:i}=t;return Pa(t,r)?(i=i.toLowerCase(),a=>{let s=o.getAttributeValue(a,n);return s!=null&&s.length===i.length&&s.toLowerCase()===i&&e(a)}):a=>o.getAttributeValue(a,n)===i&&e(a)},hyphen(e,t,r){let{adapter:o}=r,{name:n}=t,{value:i}=t,a=i.length;return Pa(t,r)?(i=i.toLowerCase(),function(c){let l=o.getAttributeValue(c,n);return l!=null&&(l.length===a||l.charAt(a)==="-")&&l.substr(0,a).toLowerCase()===i&&e(c)}):function(c){let l=o.getAttributeValue(c,n);return l!=null&&(l.length===a||l.charAt(a)==="-")&&l.substr(0,a)===i&&e(c)}},element(e,t,r){let{adapter:o}=r,{name:n,value:i}=t;if(/\s/.test(i))return Pl.default.falseFunc;let a=new RegExp(`(?:^|\\s)${VR(i)}(?:$|\\s)`,Pa(t,r)?"i":"");return function(c){let l=o.getAttributeValue(c,n);return l!=null&&l.length>=i.length&&a.test(l)&&e(c)}},exists(e,{name:t},{adapter:r}){return o=>r.hasAttrib(o,t)&&e(o)},start(e,t,r){let{adapter:o}=r,{name:n}=t,{value:i}=t,a=i.length;return a===0?Pl.default.falseFunc:Pa(t,r)?(i=i.toLowerCase(),s=>{let c=o.getAttributeValue(s,n);return c!=null&&c.length>=a&&c.substr(0,a).toLowerCase()===i&&e(s)}):s=>{var c;return!!(!((c=o.getAttributeValue(s,n))===null||c===void 0)&&c.startsWith(i))&&e(s)}},end(e,t,r){let{adapter:o}=r,{name:n}=t,{value:i}=t,a=-i.length;return a===0?Pl.default.falseFunc:Pa(t,r)?(i=i.toLowerCase(),s=>{var c;return((c=o.getAttributeValue(s,n))===null||c===void 0?void 0:c.substr(a).toLowerCase())===i&&e(s)}):s=>{var c;return!!(!((c=o.getAttributeValue(s,n))===null||c===void 0)&&c.endsWith(i))&&e(s)}},any(e,t,r){let{adapter:o}=r,{name:n,value:i}=t;if(i==="")return Pl.default.falseFunc;if(Pa(t,r)){let a=new RegExp(VR(i),"i");return function(c){let l=o.getAttributeValue(c,n);return l!=null&&l.length>=i.length&&a.test(l)&&e(c)}}return a=>{var s;return!!(!((s=o.getAttributeValue(a,n))===null||s===void 0)&&s.includes(i))&&e(a)}},not(e,t,r){let{adapter:o}=r,{name:n}=t,{value:i}=t;return i===""?a=>!!o.getAttributeValue(a,n)&&e(a):Pa(t,r)?(i=i.toLowerCase(),a=>{let s=o.getAttributeValue(a,n);return(s==null||s.length!==i.length||s.toLowerCase()!==i)&&e(a)}):a=>o.getAttributeValue(a,n)!==i&&e(a)}};var KR=Ut(Ol(),1);var mV=new Set([9,10,12,13,32]),WR=48,hV=57;function qR(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,r=0,o=i(),n=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,r=o*(n??1),s(),t<e.length?(o=i(),s(),n=a()):o=n=0),n===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[r,o*n];function i(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){let c=t,l=0;for(;t<e.length&&e.charCodeAt(t)>=WR&&e.charCodeAt(t)<=hV;)l=l*10+(e.charCodeAt(t)-WR),t++;return t===c?null:l}function s(){for(;t<e.length&&mV.has(e.charCodeAt(t));)t++}}var MS=Ut(Da(),1);function JR(e){let t=e[0],r=e[1]-1;if(r<0&&t<=0)return MS.default.falseFunc;if(t===-1)return i=>i<=r;if(t===0)return i=>i===r;if(t===1)return r<0?MS.default.trueFunc:i=>i>=r;let o=Math.abs(t),n=(r%o+o)%o;return t>1?i=>i>=r&&i%o===n:i=>i<=r&&i%o===n}function Iu(e){return JR(qR(e))}var Pr=Ut(Da(),1);function eh(e,t){return r=>{let o=t.getParent(r);return o!=null&&t.isTag(o)&&e(r)}}var Ml={contains(e,t,{adapter:r}){return function(n){return e(n)&&r.getText(n).includes(t)}},icontains(e,t,{adapter:r}){let o=t.toLowerCase();return function(i){return e(i)&&r.getText(i).toLowerCase().includes(o)}},"nth-child"(e,t,{adapter:r,equals:o}){let n=Iu(t);return n===Pr.default.falseFunc?Pr.default.falseFunc:n===Pr.default.trueFunc?eh(e,r):function(a){let s=r.getSiblings(a),c=0;for(let l=0;l<s.length&&!o(a,s[l]);l++)r.isTag(s[l])&&c++;return n(c)&&e(a)}},"nth-last-child"(e,t,{adapter:r,equals:o}){let n=Iu(t);return n===Pr.default.falseFunc?Pr.default.falseFunc:n===Pr.default.trueFunc?eh(e,r):function(a){let s=r.getSiblings(a),c=0;for(let l=s.length-1;l>=0&&!o(a,s[l]);l--)r.isTag(s[l])&&c++;return n(c)&&e(a)}},"nth-of-type"(e,t,{adapter:r,equals:o}){let n=Iu(t);return n===Pr.default.falseFunc?Pr.default.falseFunc:n===Pr.default.trueFunc?eh(e,r):function(a){let s=r.getSiblings(a),c=0;for(let l=0;l<s.length;l++){let d=s[l];if(o(a,d))break;r.isTag(d)&&r.getName(d)===r.getName(a)&&c++}return n(c)&&e(a)}},"nth-last-of-type"(e,t,{adapter:r,equals:o}){let n=Iu(t);return n===Pr.default.falseFunc?Pr.default.falseFunc:n===Pr.default.trueFunc?eh(e,r):function(a){let s=r.getSiblings(a),c=0;for(let l=s.length-1;l>=0;l--){let d=s[l];if(o(a,d))break;r.isTag(d)&&r.getName(d)===r.getName(a)&&c++}return n(c)&&e(a)}},root(e,t,{adapter:r}){return o=>{let n=r.getParent(o);return(n==null||!r.isTag(n))&&e(o)}},scope(e,t,r,o){let{equals:n}=r;return!o||o.length===0?Ml.root(e,t,r):o.length===1?i=>n(o[0],i)&&e(i):i=>o.includes(i)&&e(i)},hover:jS("isHovered"),visited:jS("isVisited"),active:jS("isActive")};function jS(e){return function(r,o,{adapter:n}){let i=n[e];return typeof i!="function"?Pr.default.falseFunc:function(s){return i(s)&&r(s)}}}var th={empty(e,{adapter:t}){return!t.getChildren(e).some(r=>t.isTag(r)||t.getText(r)!=="")},"first-child"(e,{adapter:t,equals:r}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;let o=t.getSiblings(e).find(n=>t.isTag(n));return o!=null&&r(e,o)},"last-child"(e,{adapter:t,equals:r}){let o=t.getSiblings(e);for(let n=o.length-1;n>=0;n--){if(r(e,o[n]))return!0;if(t.isTag(o[n]))break}return!1},"first-of-type"(e,{adapter:t,equals:r}){let o=t.getSiblings(e),n=t.getName(e);for(let i=0;i<o.length;i++){let a=o[i];if(r(e,a))return!0;if(t.isTag(a)&&t.getName(a)===n)break}return!1},"last-of-type"(e,{adapter:t,equals:r}){let o=t.getSiblings(e),n=t.getName(e);for(let i=o.length-1;i>=0;i--){let a=o[i];if(r(e,a))return!0;if(t.isTag(a)&&t.getName(a)===n)break}return!1},"only-of-type"(e,{adapter:t,equals:r}){let o=t.getName(e);return t.getSiblings(e).every(n=>r(e,n)||!t.isTag(n)||t.getName(n)!==o)},"only-child"(e,{adapter:t,equals:r}){return t.getSiblings(e).every(o=>r(e,o)||!t.isTag(o))}};function US(e,t,r,o){if(r===null){if(e.length>o)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===o)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}var LS={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
125
- :is(button, input, select, textarea, optgroup, option)[disabled],
126
- optgroup[disabled] > option,
127
- fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
128
- )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var dn=Ut(Da(),1);var BS={};function ZS(e,t){return e===dn.default.falseFunc?dn.default.falseFunc:r=>t.isTag(r)&&e(r)}function GS(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let o=r.indexOf(e);return o<0||o===r.length-1?[]:r.slice(o+1).filter(t.isTag)}function zS(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var FS=(e,t,r,o,n)=>{let i=n(t,zS(r),o);return i===dn.default.trueFunc?e:i===dn.default.falseFunc?dn.default.falseFunc:a=>i(a)&&e(a)},rh={is:FS,matches:FS,where:FS,not(e,t,r,o,n){let i=n(t,zS(r),o);return i===dn.default.falseFunc?e:i===dn.default.trueFunc?dn.default.falseFunc:a=>!i(a)&&e(a)},has(e,t,r,o,n){let{adapter:i}=r,a=zS(r);a.relativeSelector=!0;let s=t.some(d=>d.some(Dl))?[BS]:void 0,c=n(t,a,s);if(c===dn.default.falseFunc)return dn.default.falseFunc;let l=ZS(c,i);if(s&&c!==dn.default.trueFunc){let{shouldTestNextSiblings:d=!1}=c;return f=>{if(!e(f))return!1;s[0]=f;let p=i.getChildren(f),m=d?[...p,...GS(f,i)]:p;return i.existsOne(l,m)}}return d=>e(d)&&i.existsOne(l,i.getChildren(d))}};function QR(e,t,r,o,n){var i;let{name:a,data:s}=t;if(Array.isArray(s)){if(!(a in rh))throw new Error(`Unknown pseudo-class :${a}(${s})`);return rh[a](e,s,r,o,n)}let c=(i=r.pseudos)===null||i===void 0?void 0:i[a],l=typeof c=="string"?c:LS[a];if(typeof l=="string"){if(s!=null)throw new Error(`Pseudo ${a} doesn't have any arguments`);let d=(0,KR.parse)(l);return rh.is(e,d,r,o,n)}if(typeof c=="function")return US(c,a,s,1),d=>c(d,s)&&e(d);if(a in Ml)return Ml[a](e,s,r,o);if(a in th){let d=th[a];return US(d,a,s,2),f=>d(f,r,s)&&e(f)}throw new Error(`Unknown pseudo-class :${a}`)}var pn=Ut(Ol(),1);function VS(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function YR(e,t,r,o,n){let{adapter:i,equals:a}=r;switch(t.type){case pn.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case pn.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case pn.SelectorType.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),HR[t.action](e,t,r)}case pn.SelectorType.Pseudo:return QR(e,t,r,o,n);case pn.SelectorType.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:s}=t;return(!r.xmlMode||r.lowerCaseTags)&&(s=s.toLowerCase()),function(l){return i.getName(l)===s&&e(l)}}case pn.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(l){let d=l;for(;d=VS(d,i);)if(e(d))return!0;return!1};let s=new WeakSet;return function(l){let d=l;for(;d=VS(d,i);)if(!s.has(d)){if(i.isTag(d)&&e(d))return!0;s.add(d)}return!1}}case"_flexibleDescendant":return function(c){let l=c;do if(e(l))return!0;while(l=VS(l,i));return!1};case pn.SelectorType.Parent:return function(c){return i.getChildren(c).some(l=>i.isTag(l)&&e(l))};case pn.SelectorType.Child:return function(c){let l=i.getParent(c);return l!=null&&i.isTag(l)&&e(l)};case pn.SelectorType.Sibling:return function(c){let l=i.getSiblings(c);for(let d=0;d<l.length;d++){let f=l[d];if(a(c,f))break;if(i.isTag(f)&&e(f))return!0}return!1};case pn.SelectorType.Adjacent:return i.prevElementSibling?function(c){let l=i.prevElementSibling(c);return l!=null&&e(l)}:function(c){let l=i.getSiblings(c),d;for(let f=0;f<l.length;f++){let p=l[f];if(a(c,p))break;i.isTag(p)&&(d=p)}return!!d&&e(d)};case pn.SelectorType.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function HS(e,t,r){let o=nh(e,t,r);return ZS(o,t.adapter)}function nh(e,t,r){let o=typeof e=="string"?(0,Pn.parse)(e):e;return oh(o,t,r)}function XR(e){return e.type===Pn.SelectorType.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(XR)))}var gV={type:Pn.SelectorType.Descendant},vV={type:"_flexibleDescendant"},yV={type:Pn.SelectorType.Pseudo,name:"scope",data:null};function AV(e,{adapter:t},r){let o=!!r?.every(n=>{let i=t.isTag(n)&&t.getParent(n);return n===BS||i&&t.isTag(i)});for(let n of e){if(!(n.length>0&&Dl(n[0])&&n[0].type!==Pn.SelectorType.Descendant))if(o&&!n.some(XR))n.unshift(gV);else continue;n.unshift(yV)}}function oh(e,t,r){var o;e.forEach(PS),r=(o=t.context)!==null&&o!==void 0?o:r;let n=Array.isArray(r),i=r&&(Array.isArray(r)?r:[r]);if(t.relativeSelector!==!1)AV(e,t,i);else if(e.some(c=>c.length>0&&Dl(c[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let a=!1,s=e.map(c=>{if(c.length>=2){let[l,d]=c;l.type!==Pn.SelectorType.Pseudo||l.name!=="scope"||(n&&d.type===Pn.SelectorType.Descendant?c[1]=vV:(d.type===Pn.SelectorType.Adjacent||d.type===Pn.SelectorType.Sibling)&&(a=!0))}return bV(c,t,i)}).reduce(xV,ei.default.falseFunc);return s.shouldTestNextSiblings=a,s}function bV(e,t,r){var o;return e.reduce((n,i)=>n===ei.default.falseFunc?ei.default.falseFunc:YR(n,i,t,r,oh),(o=t.rootFunc)!==null&&o!==void 0?o:ei.default.trueFunc)}function xV(e,t){return t===ei.default.falseFunc||e===ei.default.trueFunc?e:e===ei.default.falseFunc||t===ei.default.trueFunc?t:function(o){return e(o)||t(o)}}var e6=(e,t)=>e===t,wV={adapter:yu,equals:e6};function qS(e){var t,r,o,n;let i=e??wV;return(t=i.adapter)!==null&&t!==void 0||(i.adapter=yu),(r=i.equals)!==null&&r!==void 0||(i.equals=(n=(o=i.adapter)===null||o===void 0?void 0:o.equals)!==null&&n!==void 0?n:e6),i}function JS(e){return function(r,o,n){let i=qS(o);return e(r,i,n)}}var t6=JS(HS),rse=JS(nh),nse=JS(oh);function r6(e){return function(r,o,n){let i=qS(n);typeof r!="function"&&(r=nh(r,i,o));let a=SV(o,i.adapter,r.shouldTestNextSiblings);return e(r,a,i)}}function SV(e,t,r=!1){return r&&(e=_V(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function _V(e,t){let r=Array.isArray(e)?e.slice(0):[e],o=r.length;for(let n=0;n<o;n++){let i=GS(r[n],t);r.push(...i)}return r}var ose=r6((e,t,r)=>e===WS.default.falseFunc||!t||t.length===0?[]:r.adapter.findAll(e,t)),ise=r6((e,t,r)=>e===WS.default.falseFunc||!t||t.length===0?null:r.adapter.findOne(e,t));function n6(e,t,r){let o=qS(r);return(typeof t=="function"?t:HS(t,o))(e)}var{isArray:EV}=Array,ih=({nodeType:e})=>e===1,o6=(e,t)=>t.some(r=>ih(r)&&(e(r)||o6(e,Eu(r)))),kV=(e,t)=>t==="class"?e.classList.value:e.getAttribute(t),Eu=({childNodes:e})=>e,TV=e=>{let{localName:t}=e;return un(e)?t.toLowerCase():t},CV=({parentNode:e})=>e,$V=e=>{let{parentNode:t}=e;return t?Eu(t):e},KS=e=>EV(e)?e.map(KS).join(""):ih(e)?KS(Eu(e)):e.nodeType===3?e.data:"",NV=(e,t)=>e.hasAttribute(t),RV=e=>{let{length:t}=e;for(;t--;){let r=e[t];if(t&&-1<e.lastIndexOf(r,t-1)){e.splice(t,1);continue}for(let{parentNode:o}=r;o;o=o.parentNode)if(e.includes(o)){e.splice(t,1);break}}return e},i6=(e,t)=>{let r=[];for(let o of t)ih(o)&&(e(o)&&r.push(o),r.push(...i6(e,Eu(o))));return r},a6=(e,t)=>{for(let r of t)if(e(r)||(r=a6(e,Eu(r))))return r;return null},s6={isTag:ih,existsOne:o6,getAttributeValue:kV,getChildren:Eu,getName:TV,getParent:CV,getSiblings:$V,getText:KS,hasAttrib:NV,removeSubsets:RV,findAll:i6,findOne:a6},jl=(e,t)=>t6(t,{context:t.includes(":scope")?e:void 0,xmlMode:!un(e),adapter:s6}),u6=(e,t)=>n6(e,t,{strict:!0,context:t.includes(":scope")?e:void 0,xmlMode:!un(e),adapter:s6});var fn=class e extends Dn{constructor(t,r=""){super(t,"#text",3,r)}get wholeText(){let t=[],{previousSibling:r,nextSibling:o}=this;for(;r&&r.nodeType===3;){t.unshift(r[Ue]);r=r.previousSibling}for(t.push(this[Ue]);o&&o.nodeType===3;){t.push(o[Ue]);o=o.nextSibling}return t.join("")}cloneNode(){let{ownerDocument:t,[Ue]:r}=this;return new e(t,r)}toString(){return bu(this[Ue])}};var OV=e=>e instanceof Dr,QS=(e,t,r)=>{let{ownerDocument:o}=e;for(let n of r)e.insertBefore(OV(n)?n:new fn(o,n),t)},ku=class extends Dr{constructor(t,r,o){super(t,r,o),this[Et]=null,this[H]=this[ce]={[H]:null,[Ye]:this,[Lt]:this,nodeType:-1,ownerDocument:this.ownerDocument,parentNode:null}}get childNodes(){let t=new Pt,{firstChild:r}=this;for(;r;)t.push(r),r=On(r);return t}get children(){let t=new Pt,{firstElementChild:r}=this;for(;r;)t.push(r),r=xu(r);return t}get firstChild(){let{[H]:t,[ce]:r}=this;for(;t.nodeType===2;)t=t[H];return t===r?null:t}get firstElementChild(){let{firstChild:t}=this;for(;t;){if(t.nodeType===1)return t;t=On(t)}return null}get lastChild(){let t=this[ce][Ye];switch(t.nodeType){case-1:return t[Lt];case 2:return null}return t===this?null:t}get lastElementChild(){let{lastChild:t}=this;for(;t;){if(t.nodeType===1)return t;t=Yo(t)}return null}get childElementCount(){return this.children.length}prepend(...t){QS(this,this.firstChild,t)}append(...t){QS(this,this[ce],t)}replaceChildren(...t){let{[H]:r,[ce]:o}=this;for(;r!==o&&r.nodeType===2;)r=r[H];for(;r!==o;){let n=Dt(r)[H];r.remove(),r=n}t.length&&QS(this,o,t)}getElementsByClassName(t){let r=new Pt,{[H]:o,[ce]:n}=this;for(;o!==n;)o.nodeType===1&&o.hasAttribute("class")&&o.classList.has(t)&&r.push(o),o=o[H];return r}getElementsByTagName(t){let r=new Pt,{[H]:o,[ce]:n}=this;for(;o!==n;)o.nodeType===1&&(o.localName===t||kl(o)===t)&&r.push(o),o=o[H];return r}querySelector(t){let r=jl(this,t),{[H]:o,[ce]:n}=this;for(;o!==n;){if(o.nodeType===1&&r(o))return o;o=o.nodeType===1&&o.localName==="template"?o[ce]:o[H]}return null}querySelectorAll(t){let r=jl(this,t),o=new Pt,{[H]:n,[ce]:i}=this;for(;n!==i;)n.nodeType===1&&r(n)&&o.push(n),n=n.nodeType===1&&n.localName==="template"?n[ce]:n[H];return o}appendChild(t){return this.insertBefore(t,this[ce])}contains(t){let r=t;for(;r&&r!==this;)r=r.parentNode;return r===this}insertBefore(t,r=null){if(t===r)return t;if(t===this)throw new Error("unable to append a node to itself");let o=r||this[ce];switch(t.nodeType){case 1:t.remove(),t.parentNode=this,El(o[Ye],t,o),Wi(t,null),Tl(t);break;case 11:{let{[Et]:n,firstChild:i,lastChild:a}=t;if(i){kS(o[Ye],i,a,o),Or(t,t[ce]),n&&n.replaceChildren();do i.parentNode=this,Wi(i,null),i.nodeType===1&&Tl(i);while(i!==a&&(i=On(i)))}break}case 3:case 8:case 4:t.remove();default:t.parentNode=this,Ko(o[Ye],t,o),Wi(t,null);break}return t}normalize(){let{[H]:t,[ce]:r}=this;for(;t!==r;){let{[H]:o,[Ye]:n,nodeType:i}=t;i===3&&(t[Ue]?n&&n.nodeType===3&&(n.textContent+=t.textContent,t.remove()):t.remove()),t=o}}removeChild(t){if(t.parentNode!==this)throw new Error("node is not a child");return t.remove(),t}replaceChild(t,r){let o=Dt(r)[H];return r.remove(),this.insertBefore(t,o),r}};var Qi=class extends ku{getElementById(t){let{[H]:r,[ce]:o}=this;for(;r!==o;){if(r.nodeType===1&&r.id===t)return r;r=r[H]}return null}cloneNode(t){let{ownerDocument:r,constructor:o}=this,n=new o(r);if(t){let{[ce]:i}=n;for(let a of this.childNodes)n.insertBefore(a.cloneNode(t),i)}return n}toString(){let{childNodes:t,localName:r}=this;return`<${r}>${t.join("")}</${r}>`}toJSON(){let t=[];return _R(this,t),t}};var Ma=class extends Qi{constructor(t){super(t,"#document-fragment",11)}};var ti=class e extends Dr{constructor(t,r,o="",n=""){super(t,"#document-type",10),this.name=r,this.publicId=o,this.systemId=n}cloneNode(){let{ownerDocument:t,name:r,publicId:o,systemId:n}=this;return new e(t,r,o,n)}toString(){let{name:t,publicId:r,systemId:o}=this,n=0<r.length,i=[t];return n&&i.push("PUBLIC",`"${r}"`),o.length&&(n||i.push("SYSTEM"),i.push(`"${o}"`)),`<!DOCTYPE ${i.join(" ")}>`}toJSON(){let t=[];return $S(this,t),t}};var ah=e=>e.childNodes.join(""),sh=(e,t)=>{let{ownerDocument:r}=e,{constructor:o}=r,n=new o;n[wr]=r[wr];let{childNodes:i}=Zm(n,un(e),t);e.replaceChildren(...i.map(c6,r))};function c6(e){switch(e.ownerDocument=this,e.nodeType){case 1:case 11:e.childNodes.forEach(c6,this);break}return e}var Tu=e=>e.replace(/(([A-Z0-9])([A-Z0-9][a-z]))|(([a-z0-9]+)([A-Z]))/g,"$2$5-$3$6").toLowerCase();var uh=new WeakMap,YS=e=>`data-${Tu(e)}`,DV=e=>e.slice(5).replace(/-([a-z])/g,(t,r)=>r.toUpperCase()),PV={get(e,t){if(t in e)return uh.get(e).getAttribute(YS(t))},set(e,t,r){return e[t]=r,uh.get(e).setAttribute(YS(t),r),!0},deleteProperty(e,t){return t in e&&uh.get(e).removeAttribute(YS(t)),delete e[t]}},Ul=class{constructor(t){for(let{name:r,value:o}of t.attributes)/^data-/.test(r)&&(this[DV(r)]=o);return uh.set(this,t),new Proxy(this,PV)}};Tt(Ul.prototype,null);var{add:MV}=Set.prototype,l6=(e,t)=>{for(let r of t)r&&MV.call(e,r)},Ll=({[Hw]:e,value:t})=>{let r=e.getAttributeNode("class");r?r.value=t:$l(e,new ln(e.ownerDocument,"class",t))},ch=class extends Set{constructor(t){super(),this[Hw]=t;let r=t.getAttributeNode("class");r&&l6(this,r.value.split(/\s+/))}get length(){return this.size}get value(){return[...this].join(" ")}add(...t){l6(this,t),Ll(this)}contains(t){return this.has(t)}remove(...t){for(let r of t)this.delete(r);Ll(this)}toggle(t,r){if(this.has(t)){if(r)return!0;this.delete(t),Ll(this)}else if(r||arguments.length===1)return super.add(t),Ll(this),!0;return!1}replace(t,r){return this.has(t)?(this.delete(t),super.add(r),Ll(this),!0):!1}supports(){return!0}};var dh=new WeakMap,XS=e=>[...e.keys()].filter(t=>t!==Et),ph=e=>{let t=dh.get(e).getAttributeNode("style");if((!t||t[lu]||e.get(Et)!==t)&&(e.clear(),t)){e.set(Et,t);for(let r of t[Ue].split(/\s*;\s*/)){let[o,...n]=r.split(":");if(n.length>0){o=o.trim();let i=n.join(":").trim();o&&i&&e.set(o,i)}}}return t},lh={get(e,t){return t in jV?e[t]:(ph(e),t==="length"?XS(e).length:/^\d+$/.test(t)?XS(e)[t]:e.get(Tu(t)))},set(e,t,r){if(t==="cssText")e[t]=r;else{let o=ph(e);if(r==null?e.delete(Tu(t)):e.set(Tu(t),r),!o){let n=dh.get(e);o=n.ownerDocument.createAttribute("style"),n.setAttributeNode(o),e.set(Et,o)}o[lu]=!1,o[Ue]=e.toString()}return!0}},Fl=class extends Map{constructor(t){return super(),dh.set(this,t),new Proxy(this,lh)}get cssText(){return this.toString()}set cssText(t){dh.get(this).setAttribute("style",t)}getPropertyValue(t){let r=this[Et];return lh.get(r,t)}setProperty(t,r){let o=this[Et];lh.set(o,t,r)}removeProperty(t){let r=this[Et];lh.set(r,t,null)}[Symbol.iterator](){let t=this[Et];ph(t);let r=XS(t),{length:o}=r,n=0;return{next(){let i=n===o;return{done:i,value:i?null:r[n++]}}}}get[Et](){return this}toString(){let t=this[Et];ph(t);let r=[];return t.forEach(UV,r),r.join(";")}},{prototype:jV}=Fl;function UV(e,t){t!==Et&&this.push(`${t}:${e}`)}function LV(e){return e.currentTarget}var _r=class{static get BUBBLING_PHASE(){return 3}static get AT_TARGET(){return 2}static get CAPTURING_PHASE(){return 1}static get NONE(){return 0}constructor(t,r={}){this.type=t,this.bubbles=!!r.bubbles,this.cancelBubble=!1,this._stopImmediatePropagationFlag=!1,this.cancelable=!!r.cancelable,this.eventPhase=this.NONE,this.timeStamp=Date.now(),this.defaultPrevented=!1,this.originalTarget=null,this.returnValue=null,this.srcElement=null,this.target=null,this._path=[]}get BUBBLING_PHASE(){return 3}get AT_TARGET(){return 2}get CAPTURING_PHASE(){return 1}get NONE(){return 0}preventDefault(){this.defaultPrevented=!0}composedPath(){return this._path.map(LV)}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this.stopPropagation(),this._stopImmediatePropagationFlag=!0}};var Cu=class extends Array{constructor(t){super(),this.ownerElement=t}getNamedItem(t){return this.ownerElement.getAttributeNode(t)}setNamedItem(t){this.ownerElement.setAttributeNode(t),this.unshift(t)}removeNamedItem(t){let r=this.getNamedItem(t);this.ownerElement.removeAttribute(t),this.splice(this.indexOf(r),1)}item(t){return t<this.length?this[t]:null}getNamedItemNS(t,r){return this.getNamedItem(r)}setNamedItemNS(t,r){return this.setNamedItem(r)}removeNamedItemNS(t,r){return this.removeNamedItem(r)}};var ja=class extends Qi{constructor(t){super(t.ownerDocument,"#shadow-root",11),this.host=t}get innerHTML(){return ah(this)}set innerHTML(t){sh(this,t)}};var FV={get(e,t){return t in e?e[t]:e.find(({name:r})=>r===t)}},d6=(e,t,r)=>{if("ownerSVGElement"in t){let o=e.createElementNS($a,r);return o.ownerSVGElement=t.ownerSVGElement,o}return e.createElement(r)},zV=({localName:e,ownerDocument:t})=>t[Tn].voidElements.test(e),Mn=class extends ku{constructor(t,r){super(t,r,1),this[zi]=null,this[wm]=null,this[Sm]=null}get isConnected(){return Hm(this)}get parentElement(){return Wm(this)}get previousSibling(){return Yo(this)}get nextSibling(){return On(this)}get namespaceURI(){return"http://www.w3.org/1999/xhtml"}get previousElementSibling(){return qm(this)}get nextElementSibling(){return xu(this)}before(...t){Jm(this,t)}after(...t){Km(this,t)}replaceWith(...t){Nl(this,t)}remove(){Qm(this[Ye],this,this[ce][H])}get id(){return D.get(this,"id")}set id(t){D.set(this,"id",t)}get className(){return this.classList.value}set className(t){let{classList:r}=this;r.clear(),r.add(...$n(t).split(/\s+/))}get nodeName(){return kl(this)}get tagName(){return kl(this)}get classList(){return this[zi]||(this[zi]=new ch(this))}get dataset(){return this[wm]||(this[wm]=new Ul(this))}getBoundingClientRect(){return{x:0,y:0,bottom:0,height:0,left:0,right:0,top:0,width:0}}get nonce(){return D.get(this,"nonce")}set nonce(t){D.set(this,"nonce",t)}get style(){return this[Sm]||(this[Sm]=new Fl(this))}get tabIndex(){return Nn.get(this,"tabindex")||-1}set tabIndex(t){Nn.set(this,"tabindex",t)}get slot(){return D.get(this,"slot")}set slot(t){D.set(this,"slot",t)}get innerText(){let t=[],{[H]:r,[ce]:o}=this;for(;r!==o;)r.nodeType===3?t.push(r.textContent.replace(/\s+/g," ")):t.length&&r[H]!=o&&uR.has(r.tagName)&&t.push(`
129
- `),r=r[H];return t.join("")}get textContent(){let t=[],{[H]:r,[ce]:o}=this;for(;r!==o;){let n=r.nodeType;(n===3||n===4)&&t.push(r.textContent),r=r[H]}return t.join("")}set textContent(t){this.replaceChildren(),t!=null&&t!==""&&this.appendChild(new fn(this.ownerDocument,t))}get innerHTML(){return ah(this)}set innerHTML(t){sh(this,t)}get outerHTML(){return this.toString()}set outerHTML(t){let r=this.ownerDocument.createElement("");r.innerHTML=t,this.replaceWith(...r.childNodes)}get attributes(){let t=new Cu(this),r=this[H];for(;r.nodeType===2;)t.push(r),r=r[H];return new Proxy(t,FV)}focus(){this.dispatchEvent(new _r("focus"))}getAttribute(t){if(t==="class")return this.className;let r=this.getAttributeNode(t);return r&&(un(this)?r.value:bu(r.value))}getAttributeNode(t){let r=this[H];for(;r.nodeType===2;){if(r.name===t)return r;r=r[H]}return null}getAttributeNames(){let t=new Pt,r=this[H];for(;r.nodeType===2;)t.push(r.name),r=r[H];return t}hasAttribute(t){return!!this.getAttributeNode(t)}hasAttributes(){return this[H].nodeType===2}removeAttribute(t){t==="class"&&this[zi]&&this[zi].clear();let r=this[H];for(;r.nodeType===2;){if(r.name===t){RS(this,r);return}r=r[H]}}removeAttributeNode(t){let r=this[H];for(;r.nodeType===2;){if(r===t){RS(this,r);return}r=r[H]}}setAttribute(t,r){if(t==="class")this.className=r;else{let o=this.getAttributeNode(t);o?o.value=r:$l(this,new ln(this.ownerDocument,t,r))}}setAttributeNode(t){let{name:r}=t,o=this.getAttributeNode(r);if(o!==t){o&&this.removeAttributeNode(o);let{ownerElement:n}=t;n&&n.removeAttributeNode(t),$l(this,t)}return o}toggleAttribute(t,r){return this.hasAttribute(t)?r?!0:(this.removeAttribute(t),!1):r||arguments.length===1?(this.setAttribute(t,""),!0):!1}get shadowRoot(){if(io.has(this)){let{mode:t,shadowRoot:r}=io.get(this);if(t==="open")return r}return null}attachShadow(t){if(io.has(this))throw new Error("operation not supported");let r=new ja(this);return io.set(this,{mode:t.mode,shadowRoot:r}),r}matches(t){return u6(this,t)}closest(t){let r=this,o=jl(r,t);for(;r&&!o(r);)r=r.parentElement;return r}insertAdjacentElement(t,r){let{parentElement:o}=this;switch(t){case"beforebegin":if(o){o.insertBefore(r,this);break}return null;case"afterbegin":this.insertBefore(r,this.firstChild);break;case"beforeend":this.insertBefore(r,null);break;case"afterend":if(o){o.insertBefore(r,this.nextSibling);break}return null}return r}insertAdjacentHTML(t,r){this.insertAdjacentElement(t,Fm(this.ownerDocument,r))}insertAdjacentText(t,r){let o=this.ownerDocument.createTextNode(r);this.insertAdjacentElement(t,o)}cloneNode(t=!1){let{ownerDocument:r,localName:o}=this,n=d=>{d.parentNode=a,Or(s,d),s=d},i=d6(r,this,o),a=i,s=i,{[H]:c,[ce]:l}=this;for(;c!==l&&(t||c.nodeType===2);){switch(c.nodeType){case-1:Or(s,a[ce]),s=a[ce],a=a.parentNode;break;case 1:{let d=d6(r,c,c.localName);n(d),a=d;break}case 2:{let d=c.cloneNode(t);d.ownerElement=a,n(d);break}case 3:case 8:case 4:n(c.cloneNode(t));break}c=c[H]}return Or(s,i[ce]),i}toString(){let t=[],{[ce]:r}=this,o={[H]:this},n=!1;do switch(o=o[H],o.nodeType){case 2:{let i=" "+o;switch(i){case" id":case" class":case" style":break;default:t.push(i)}break}case-1:{let i=o[Lt];n?("ownerSVGElement"in i?t.push(" />"):zV(i)?t.push(un(i)?">":" />"):t.push(`></${i.localName}>`),n=!1):t.push(`</${i.localName}>`);break}case 1:n&&t.push(">"),o.toString!==this.toString?(t.push(o.toString()),o=o[ce],n=!1):(t.push(`<${o.localName}`),n=!0);break;case 3:case 8:case 4:t.push((n?">":"")+o),n=!1;break}while(o!==r);return t.join("")}toJSON(){let t=[];return NS(this,t),t}getAttributeNS(t,r){return this.getAttribute(r)}getElementsByTagNameNS(t,r){return this.getElementsByTagName(r)}hasAttributeNS(t,r){return this.hasAttribute(r)}removeAttributeNS(t,r){this.removeAttribute(r)}setAttributeNS(t,r,o){this.setAttribute(r,o)}setAttributeNodeNS(t){return this.setAttributeNode(t)}};var e_=new WeakMap,BV={get(e,t){return e[t]},set(e,t,r){return e[t]=r,!0}},jn=class extends Mn{constructor(t,r,o=null){super(t,r),this.ownerSVGElement=o}get className(){return e_.has(this)||e_.set(this,new Proxy({baseVal:"",animVal:""},BV)),e_.get(this)}set className(t){let{classList:r}=this;r.clear(),r.add(...$n(t).split(/\s+/))}get namespaceURI(){return"http://www.w3.org/2000/svg"}getAttribute(t){return t==="class"?[...this.classList].join(" "):super.getAttribute(t)}setAttribute(t,r){if(t==="class")this.className=r;else if(t==="style"){let{className:o}=this;o.baseVal=o.animVal=r}super.setAttribute(t,r)}};var Ir=()=>{throw new TypeError("Illegal constructor")};function t_(){Ir()}Tt(t_,ln);t_.prototype=ln.prototype;function r_(){Ir()}Tt(r_,Ji);r_.prototype=Ji.prototype;function n_(){Ir()}Tt(n_,Dn);n_.prototype=Dn.prototype;function o_(){Ir()}Tt(o_,Ki);o_.prototype=Ki.prototype;function i_(){Ir()}Tt(i_,Ma);i_.prototype=Ma.prototype;function a_(){Ir()}Tt(a_,ti);a_.prototype=ti.prototype;function s_(){Ir()}Tt(s_,Mn);s_.prototype=Mn.prototype;function u_(){Ir()}Tt(u_,Dr);u_.prototype=Dr.prototype;function c_(){Ir()}Tt(c_,ja);c_.prototype=ja.prototype;function l_(){Ir()}Tt(l_,fn);l_.prototype=fn.prototype;function d_(){Ir()}Tt(d_,jn);d_.prototype=jn.prototype;var p6={Attr:t_,CDATASection:r_,CharacterData:n_,Comment:o_,DocumentFragment:i_,DocumentType:a_,Element:s_,Node:u_,ShadowRoot:c_,Text:l_,SVGElement:d_};var zl=new WeakMap,w={get(e,t){return zl.has(e)&&zl.get(e)[t]||null},set(e,t,r){zl.has(e)||zl.set(e,{});let o=zl.get(e),n=t.slice(2);o[t]&&e.removeEventListener(n,o[t],!1),(o[t]=r)&&e.addEventListener(n,r,!1)}},_=class extends Mn{static get observedAttributes(){return[]}constructor(t=null,r=""){super(t,r);let o=!t,n;if(o){let{constructor:i}=this;if(!Na.has(i))throw new Error("unable to initialize this Custom Element");({ownerDocument:t,localName:r,options:n}=Na.get(i))}if(t[Zi]){let{element:i,values:a}=t[Zi];t[Zi]=null;for(let[s,c]of a)i[s]=c;return i}o&&(this.ownerDocument=this[ce].ownerDocument=t,this.localName=r,Qo.set(this,{connected:!1}),n.is&&this.setAttribute("is",n.is))}blur(){this.dispatchEvent(new _r("blur"))}click(){let t=new _r("click",{bubbles:!0,cancelable:!0});t.button=0,this.dispatchEvent(t)}get accessKeyLabel(){let{accessKey:t}=this;return t&&`Alt+Shift+${t}`}get isContentEditable(){return this.hasAttribute("contenteditable")}get contentEditable(){return Me.get(this,"contenteditable")}set contentEditable(t){Me.set(this,"contenteditable",t)}get draggable(){return Me.get(this,"draggable")}set draggable(t){Me.set(this,"draggable",t)}get hidden(){return Me.get(this,"hidden")}set hidden(t){Me.set(this,"hidden",t)}get spellcheck(){return Me.get(this,"spellcheck")}set spellcheck(t){Me.set(this,"spellcheck",t)}get accessKey(){return D.get(this,"accesskey")}set accessKey(t){D.set(this,"accesskey",t)}get dir(){return D.get(this,"dir")}set dir(t){D.set(this,"dir",t)}get lang(){return D.get(this,"lang")}set lang(t){D.set(this,"lang",t)}get title(){return D.get(this,"title")}set title(t){D.set(this,"title",t)}get onabort(){return w.get(this,"onabort")}set onabort(t){w.set(this,"onabort",t)}get onblur(){return w.get(this,"onblur")}set onblur(t){w.set(this,"onblur",t)}get oncancel(){return w.get(this,"oncancel")}set oncancel(t){w.set(this,"oncancel",t)}get oncanplay(){return w.get(this,"oncanplay")}set oncanplay(t){w.set(this,"oncanplay",t)}get oncanplaythrough(){return w.get(this,"oncanplaythrough")}set oncanplaythrough(t){w.set(this,"oncanplaythrough",t)}get onchange(){return w.get(this,"onchange")}set onchange(t){w.set(this,"onchange",t)}get onclick(){return w.get(this,"onclick")}set onclick(t){w.set(this,"onclick",t)}get onclose(){return w.get(this,"onclose")}set onclose(t){w.set(this,"onclose",t)}get oncontextmenu(){return w.get(this,"oncontextmenu")}set oncontextmenu(t){w.set(this,"oncontextmenu",t)}get oncuechange(){return w.get(this,"oncuechange")}set oncuechange(t){w.set(this,"oncuechange",t)}get ondblclick(){return w.get(this,"ondblclick")}set ondblclick(t){w.set(this,"ondblclick",t)}get ondrag(){return w.get(this,"ondrag")}set ondrag(t){w.set(this,"ondrag",t)}get ondragend(){return w.get(this,"ondragend")}set ondragend(t){w.set(this,"ondragend",t)}get ondragenter(){return w.get(this,"ondragenter")}set ondragenter(t){w.set(this,"ondragenter",t)}get ondragleave(){return w.get(this,"ondragleave")}set ondragleave(t){w.set(this,"ondragleave",t)}get ondragover(){return w.get(this,"ondragover")}set ondragover(t){w.set(this,"ondragover",t)}get ondragstart(){return w.get(this,"ondragstart")}set ondragstart(t){w.set(this,"ondragstart",t)}get ondrop(){return w.get(this,"ondrop")}set ondrop(t){w.set(this,"ondrop",t)}get ondurationchange(){return w.get(this,"ondurationchange")}set ondurationchange(t){w.set(this,"ondurationchange",t)}get onemptied(){return w.get(this,"onemptied")}set onemptied(t){w.set(this,"onemptied",t)}get onended(){return w.get(this,"onended")}set onended(t){w.set(this,"onended",t)}get onerror(){return w.get(this,"onerror")}set onerror(t){w.set(this,"onerror",t)}get onfocus(){return w.get(this,"onfocus")}set onfocus(t){w.set(this,"onfocus",t)}get oninput(){return w.get(this,"oninput")}set oninput(t){w.set(this,"oninput",t)}get oninvalid(){return w.get(this,"oninvalid")}set oninvalid(t){w.set(this,"oninvalid",t)}get onkeydown(){return w.get(this,"onkeydown")}set onkeydown(t){w.set(this,"onkeydown",t)}get onkeypress(){return w.get(this,"onkeypress")}set onkeypress(t){w.set(this,"onkeypress",t)}get onkeyup(){return w.get(this,"onkeyup")}set onkeyup(t){w.set(this,"onkeyup",t)}get onload(){return w.get(this,"onload")}set onload(t){w.set(this,"onload",t)}get onloadeddata(){return w.get(this,"onloadeddata")}set onloadeddata(t){w.set(this,"onloadeddata",t)}get onloadedmetadata(){return w.get(this,"onloadedmetadata")}set onloadedmetadata(t){w.set(this,"onloadedmetadata",t)}get onloadstart(){return w.get(this,"onloadstart")}set onloadstart(t){w.set(this,"onloadstart",t)}get onmousedown(){return w.get(this,"onmousedown")}set onmousedown(t){w.set(this,"onmousedown",t)}get onmouseenter(){return w.get(this,"onmouseenter")}set onmouseenter(t){w.set(this,"onmouseenter",t)}get onmouseleave(){return w.get(this,"onmouseleave")}set onmouseleave(t){w.set(this,"onmouseleave",t)}get onmousemove(){return w.get(this,"onmousemove")}set onmousemove(t){w.set(this,"onmousemove",t)}get onmouseout(){return w.get(this,"onmouseout")}set onmouseout(t){w.set(this,"onmouseout",t)}get onmouseover(){return w.get(this,"onmouseover")}set onmouseover(t){w.set(this,"onmouseover",t)}get onmouseup(){return w.get(this,"onmouseup")}set onmouseup(t){w.set(this,"onmouseup",t)}get onmousewheel(){return w.get(this,"onmousewheel")}set onmousewheel(t){w.set(this,"onmousewheel",t)}get onpause(){return w.get(this,"onpause")}set onpause(t){w.set(this,"onpause",t)}get onplay(){return w.get(this,"onplay")}set onplay(t){w.set(this,"onplay",t)}get onplaying(){return w.get(this,"onplaying")}set onplaying(t){w.set(this,"onplaying",t)}get onprogress(){return w.get(this,"onprogress")}set onprogress(t){w.set(this,"onprogress",t)}get onratechange(){return w.get(this,"onratechange")}set onratechange(t){w.set(this,"onratechange",t)}get onreset(){return w.get(this,"onreset")}set onreset(t){w.set(this,"onreset",t)}get onresize(){return w.get(this,"onresize")}set onresize(t){w.set(this,"onresize",t)}get onscroll(){return w.get(this,"onscroll")}set onscroll(t){w.set(this,"onscroll",t)}get onseeked(){return w.get(this,"onseeked")}set onseeked(t){w.set(this,"onseeked",t)}get onseeking(){return w.get(this,"onseeking")}set onseeking(t){w.set(this,"onseeking",t)}get onselect(){return w.get(this,"onselect")}set onselect(t){w.set(this,"onselect",t)}get onshow(){return w.get(this,"onshow")}set onshow(t){w.set(this,"onshow",t)}get onstalled(){return w.get(this,"onstalled")}set onstalled(t){w.set(this,"onstalled",t)}get onsubmit(){return w.get(this,"onsubmit")}set onsubmit(t){w.set(this,"onsubmit",t)}get onsuspend(){return w.get(this,"onsuspend")}set onsuspend(t){w.set(this,"onsuspend",t)}get ontimeupdate(){return w.get(this,"ontimeupdate")}set ontimeupdate(t){w.set(this,"ontimeupdate",t)}get ontoggle(){return w.get(this,"ontoggle")}set ontoggle(t){w.set(this,"ontoggle",t)}get onvolumechange(){return w.get(this,"onvolumechange")}set onvolumechange(t){w.set(this,"onvolumechange",t)}get onwaiting(){return w.get(this,"onwaiting")}set onwaiting(t){w.set(this,"onwaiting",t)}get onauxclick(){return w.get(this,"onauxclick")}set onauxclick(t){w.set(this,"onauxclick",t)}get ongotpointercapture(){return w.get(this,"ongotpointercapture")}set ongotpointercapture(t){w.set(this,"ongotpointercapture",t)}get onlostpointercapture(){return w.get(this,"onlostpointercapture")}set onlostpointercapture(t){w.set(this,"onlostpointercapture",t)}get onpointercancel(){return w.get(this,"onpointercancel")}set onpointercancel(t){w.set(this,"onpointercancel",t)}get onpointerdown(){return w.get(this,"onpointerdown")}set onpointerdown(t){w.set(this,"onpointerdown",t)}get onpointerenter(){return w.get(this,"onpointerenter")}set onpointerenter(t){w.set(this,"onpointerenter",t)}get onpointerleave(){return w.get(this,"onpointerleave")}set onpointerleave(t){w.set(this,"onpointerleave",t)}get onpointermove(){return w.get(this,"onpointermove")}set onpointermove(t){w.set(this,"onpointermove",t)}get onpointerout(){return w.get(this,"onpointerout")}set onpointerout(t){w.set(this,"onpointerout",t)}get onpointerover(){return w.get(this,"onpointerover")}set onpointerover(t){w.set(this,"onpointerover",t)}get onpointerup(){return w.get(this,"onpointerup")}set onpointerup(t){w.set(this,"onpointerup",t)}};var f6="template",Bl=class extends _{constructor(t){super(t,f6);let r=this.ownerDocument.createDocumentFragment();(this[pl]=r)[Et]=this}get content(){if(this.hasChildNodes()&&!this[pl].hasChildNodes())for(let t of this.childNodes)this[pl].appendChild(t.cloneNode(!0));return this[pl]}};je(f6,Bl);var fh=class extends _{constructor(t,r="html"){super(t,r)}};var{toString:ZV}=_.prototype,uo=class extends _{get innerHTML(){return this.textContent}set innerHTML(t){this.textContent=t}toString(){return ZV.call(this.cloneNode()).replace("><",()=>`>${this.textContent}<`)}};var m6="script",Zl=class extends uo{constructor(t,r=m6){super(t,r)}get type(){return D.get(this,"type")}set type(t){D.set(this,"type",t)}get src(){return D.get(this,"src")}set src(t){D.set(this,"src",t)}get defer(){return Me.get(this,"defer")}set defer(t){Me.set(this,"defer",t)}get crossOrigin(){return D.get(this,"crossorigin")}set crossOrigin(t){D.set(this,"crossorigin",t)}get nomodule(){return Me.get(this,"nomodule")}set nomodule(t){Me.set(this,"nomodule",t)}get referrerPolicy(){return D.get(this,"referrerpolicy")}set referrerPolicy(t){D.set(this,"referrerpolicy",t)}get nonce(){return D.get(this,"nonce")}set nonce(t){D.set(this,"nonce",t)}get async(){return Me.get(this,"async")}set async(t){Me.set(this,"async",t)}get text(){return this.textContent}set text(t){this.textContent=t}};je(m6,Zl);var mh=class extends _{constructor(t,r="frame"){super(t,r)}};var h6="iframe",Gl=class extends _{constructor(t,r=h6){super(t,r)}get src(){return D.get(this,"src")}set src(t){D.set(this,"src",t)}get srcdoc(){return D.get(this,"srcdoc")}set srcdoc(t){D.set(this,"srcdoc",t)}get name(){return D.get(this,"name")}set name(t){D.set(this,"name",t)}get allow(){return D.get(this,"allow")}set allow(t){D.set(this,"allow",t)}get allowFullscreen(){return Me.get(this,"allowfullscreen")}set allowFullscreen(t){Me.set(this,"allowfullscreen",t)}get referrerPolicy(){return D.get(this,"referrerpolicy")}set referrerPolicy(t){D.set(this,"referrerpolicy",t)}get loading(){return D.get(this,"loading")}set loading(t){D.set(this,"loading",t)}};je(h6,Gl);var hh=class extends _{constructor(t,r="object"){super(t,r)}};var gh=class extends _{constructor(t,r="head"){super(t,r)}};var vh=class extends _{constructor(t,r="body"){super(t,r)}};var F6=Ut(L6(),1);var z6="style",Wl=class extends uo{constructor(t,r=z6){super(t,r),this[ka]=null}get sheet(){let t=this[ka];return t!==null?t:this[ka]=(0,F6.parse)(this.textContent)}get innerHTML(){return super.innerHTML||""}set innerHTML(t){super.textContent=t,this[ka]=null}get innerText(){return super.innerText||""}set innerText(t){super.textContent=t,this[ka]=null}get textContent(){return super.textContent||""}set textContent(t){super.textContent=t,this[ka]=null}};je(z6,Wl);var ql=class extends _{constructor(t,r="time"){super(t,r)}get dateTime(){return D.get(this,"datetime")}set dateTime(t){D.set(this,"datetime",t)}};je("time",ql);var Th=class extends _{constructor(t,r="fieldset"){super(t,r)}};var Ch=class extends _{constructor(t,r="embed"){super(t,r)}};var $h=class extends _{constructor(t,r="hr"){super(t,r)}};var Nh=class extends _{constructor(t,r="progress"){super(t,r)}};var Rh=class extends _{constructor(t,r="p"){super(t,r)}};var Oh=class extends _{constructor(t,r="table"){super(t,r)}};var Dh=class extends _{constructor(t,r="frameset"){super(t,r)}};var Ph=class extends _{constructor(t,r="li"){super(t,r)}};var Mh=class extends _{constructor(t,r="base"){super(t,r)}};var jh=class extends _{constructor(t,r="datalist"){super(t,r)}};var B6="input",Jl=class extends _{constructor(t,r=B6){super(t,r)}get autofocus(){return Me.get(this,"autofocus")||-1}set autofocus(t){Me.set(this,"autofocus",t)}get disabled(){return Me.get(this,"disabled")}set disabled(t){Me.set(this,"disabled",t)}get name(){return this.getAttribute("name")}set name(t){this.setAttribute("name",t)}get placeholder(){return this.getAttribute("placeholder")}set placeholder(t){this.setAttribute("placeholder",t)}get type(){return this.getAttribute("type")}set type(t){this.setAttribute("type",t)}get value(){return D.get(this,"value")}set value(t){D.set(this,"value",t)}};je(B6,Jl);var Uh=class extends _{constructor(t,r="param"){super(t,r)}};var Lh=class extends _{constructor(t,r="media"){super(t,r)}};var Fh=class extends _{constructor(t,r="audio"){super(t,r)}};var Z6="h1",Kl=class extends _{constructor(t,r=Z6){super(t,r)}};je([Z6,"h2","h3","h4","h5","h6"],Kl);var zh=class extends _{constructor(t,r="dir"){super(t,r)}};var Bh=class extends _{constructor(t,r="quote"){super(t,r)}};var W6=Ut(H6(),1);var{createCanvas:GV}=W6.default,q6="canvas",Ql=class extends _{constructor(t,r=q6){super(t,r),this[Vr]=GV(300,150)}get width(){return this[Vr].width}set width(t){Nn.set(this,"width",t),this[Vr].width=t}get height(){return this[Vr].height}set height(t){Nn.set(this,"height",t),this[Vr].height=t}getContext(t){return this[Vr].getContext(t)}toDataURL(...t){return this[Vr].toDataURL(...t)}};je(q6,Ql);var Zh=class extends _{constructor(t,r="legend"){super(t,r)}};var J6="option",Yl=class extends _{constructor(t,r=J6){super(t,r)}get value(){return D.get(this,"value")}set value(t){D.set(this,"value",t)}get selected(){return Me.get(this,"selected")}set selected(t){let r=this.parentElement?.querySelector("option[selected]");r&&r!==this&&(r.selected=!1),Me.set(this,"selected",t)}};je(J6,Yl);var Gh=class extends _{constructor(t,r="span"){super(t,r)}};var Vh=class extends _{constructor(t,r="meter"){super(t,r)}};var Hh=class extends _{constructor(t,r="video"){super(t,r)}};var Wh=class extends _{constructor(t,r="td"){super(t,r)}};var K6="title",Xl=class extends uo{constructor(t,r=K6){super(t,r)}};je(K6,Xl);var qh=class extends _{constructor(t,r="output"){super(t,r)}};var Jh=class extends _{constructor(t,r="tr"){super(t,r)}};var Kh=class extends _{constructor(t,r="data"){super(t,r)}};var Qh=class extends _{constructor(t,r="menu"){super(t,r)}};var Q6="select",ed=class extends _{constructor(t,r=Q6){super(t,r)}get options(){let t=new Pt,{firstElementChild:r}=this;for(;r;)r.tagName==="OPTGROUP"?t.push(...r.children):t.push(r),r=r.nextElementSibling;return t}get disabled(){return Me.get(this,"disabled")}set disabled(t){Me.set(this,"disabled",t)}get name(){return this.getAttribute("name")}set name(t){this.setAttribute("name",t)}get value(){return this.querySelector("option[selected]")?.value}};je(Q6,ed);var Yh=class extends _{constructor(t,r="br"){super(t,r)}};var Y6="button",td=class extends _{constructor(t,r=Y6){super(t,r)}get disabled(){return Me.get(this,"disabled")}set disabled(t){Me.set(this,"disabled",t)}get name(){return this.getAttribute("name")}set name(t){this.setAttribute("name",t)}get type(){return this.getAttribute("type")}set type(t){this.setAttribute("type",t)}};je(Y6,td);var Xh=class extends _{constructor(t,r="map"){super(t,r)}};var eg=class extends _{constructor(t,r="optgroup"){super(t,r)}};var tg=class extends _{constructor(t,r="dl"){super(t,r)}};var X6="textarea",rd=class extends uo{constructor(t,r=X6){super(t,r)}get disabled(){return Me.get(this,"disabled")}set disabled(t){Me.set(this,"disabled",t)}get name(){return this.getAttribute("name")}set name(t){this.setAttribute("name",t)}get placeholder(){return this.getAttribute("placeholder")}set placeholder(t){this.setAttribute("placeholder",t)}get type(){return this.getAttribute("type")}set type(t){this.setAttribute("type",t)}get value(){return this.textContent}set value(t){this.textContent=t}};je(X6,rd);var rg=class extends _{constructor(t,r="font"){super(t,r)}};var ng=class extends _{constructor(t,r="div"){super(t,r)}};var e3="link",nd=class extends _{constructor(t,r=e3){super(t,r)}get disabled(){return Me.get(this,"disabled")}set disabled(t){Me.set(this,"disabled",t)}get href(){return D.get(this,"href").trim()}set href(t){D.set(this,"href",t)}get hreflang(){return D.get(this,"hreflang")}set hreflang(t){D.set(this,"hreflang",t)}get media(){return D.get(this,"media")}set media(t){D.set(this,"media",t)}get rel(){return D.get(this,"rel")}set rel(t){D.set(this,"rel",t)}get type(){return D.get(this,"type")}set type(t){D.set(this,"type",t)}};je(e3,nd);var t3="slot",od=class extends _{constructor(t,r=t3){super(t,r)}get name(){return this.getAttribute("name")}set name(t){this.setAttribute("name",t)}assign(){}assignedNodes(t){let r=!!this.name,o=this.getRootNode().host?.childNodes??[],n;if(r?n=[...o].filter(i=>i.slot===this.name):n=[...o].filter(i=>!i.slot),t?.flatten){let i=[];for(let a of n)a.localName==="slot"?i.push(...a.assignedNodes({flatten:!0})):i.push(a);n=i}return n.length?n:[...this.childNodes]}assignedElements(t){let r=this.assignedNodes(t).filter(o=>o.nodeType===1);return r.length?r:[...this.children]}};je(t3,od);var og=class extends _{constructor(t,r="form"){super(t,r)}};var r3="img",Fa=class extends _{constructor(t,r=r3){super(t,r)}get alt(){return D.get(this,"alt")}set alt(t){D.set(this,"alt",t)}get sizes(){return D.get(this,"sizes")}set sizes(t){D.set(this,"sizes",t)}get src(){return D.get(this,"src")}set src(t){D.set(this,"src",t)}get srcset(){return D.get(this,"srcset")}set srcset(t){D.set(this,"srcset",t)}get title(){return D.get(this,"title")}set title(t){D.set(this,"title",t)}get width(){return Nn.get(this,"width")}set width(t){Nn.set(this,"width",t)}get height(){return Nn.get(this,"height")}set height(t){Nn.set(this,"height",t)}};je(r3,Fa);var ig=class extends _{constructor(t,r="pre"){super(t,r)}};var ag=class extends _{constructor(t,r="ul"){super(t,r)}};var n3="meta",id=class extends _{constructor(t,r=n3){super(t,r)}get name(){return D.get(this,"name")}set name(t){D.set(this,"name",t)}get httpEquiv(){return D.get(this,"http-equiv")}set httpEquiv(t){D.set(this,"http-equiv",t)}get content(){return D.get(this,"content")}set content(t){D.set(this,"content",t)}get charset(){return D.get(this,"charset")}set charset(t){D.set(this,"charset",t)}get media(){return D.get(this,"media")}set media(t){D.set(this,"media",t)}};je(n3,id);var sg=class extends _{constructor(t,r="picture"){super(t,r)}};var ug=class extends _{constructor(t,r="area"){super(t,r)}};var cg=class extends _{constructor(t,r="ol"){super(t,r)}};var lg=class extends _{constructor(t,r="caption"){super(t,r)}};var o3="a",ad=class extends _{constructor(t,r=o3){super(t,r)}get href(){return encodeURI(decodeURI(D.get(this,"href"))).trim()}set href(t){D.set(this,"href",decodeURI(t))}get download(){return encodeURI(decodeURI(D.get(this,"download")))}set download(t){D.set(this,"download",decodeURI(t))}get target(){return D.get(this,"target")}set target(t){D.set(this,"target",t)}get type(){return D.get(this,"type")}set type(t){D.set(this,"type",t)}get rel(){return D.get(this,"rel")}set rel(t){D.set(this,"rel",t)}};je(o3,ad);var dg=class extends _{constructor(t,r="label"){super(t,r)}};var pg=class extends _{constructor(t,r="unknown"){super(t,r)}};var fg=class extends _{constructor(t,r="mod"){super(t,r)}};var mg=class extends _{constructor(t,r="details"){super(t,r)}};var i3="source",sd=class extends _{constructor(t,r=i3){super(t,r)}get src(){return D.get(this,"src")}set src(t){D.set(this,"src",t)}get srcset(){return D.get(this,"srcset")}set srcset(t){D.set(this,"srcset",t)}get sizes(){return D.get(this,"sizes")}set sizes(t){D.set(this,"sizes",t)}get type(){return D.get(this,"type")}set type(t){D.set(this,"type",t)}};je(i3,sd);var hg=class extends _{constructor(t,r="track"){super(t,r)}};var gg=class extends _{constructor(t,r="marquee"){super(t,r)}};var a3={HTMLElement:_,HTMLTemplateElement:Bl,HTMLHtmlElement:fh,HTMLScriptElement:Zl,HTMLFrameElement:mh,HTMLIFrameElement:Gl,HTMLObjectElement:hh,HTMLHeadElement:gh,HTMLBodyElement:vh,HTMLStyleElement:Wl,HTMLTimeElement:ql,HTMLFieldSetElement:Th,HTMLEmbedElement:Ch,HTMLHRElement:$h,HTMLProgressElement:Nh,HTMLParagraphElement:Rh,HTMLTableElement:Oh,HTMLFrameSetElement:Dh,HTMLLIElement:Ph,HTMLBaseElement:Mh,HTMLDataListElement:jh,HTMLInputElement:Jl,HTMLParamElement:Uh,HTMLMediaElement:Lh,HTMLAudioElement:Fh,HTMLHeadingElement:Kl,HTMLDirectoryElement:zh,HTMLQuoteElement:Bh,HTMLCanvasElement:Ql,HTMLLegendElement:Zh,HTMLOptionElement:Yl,HTMLSpanElement:Gh,HTMLMeterElement:Vh,HTMLVideoElement:Hh,HTMLTableCellElement:Wh,HTMLTitleElement:Xl,HTMLOutputElement:qh,HTMLTableRowElement:Jh,HTMLDataElement:Kh,HTMLMenuElement:Qh,HTMLSelectElement:ed,HTMLBRElement:Yh,HTMLButtonElement:td,HTMLMapElement:Xh,HTMLOptGroupElement:eg,HTMLDListElement:tg,HTMLTextAreaElement:rd,HTMLFontElement:rg,HTMLDivElement:ng,HTMLLinkElement:nd,HTMLSlotElement:od,HTMLFormElement:og,HTMLImageElement:Fa,HTMLPreElement:ig,HTMLUListElement:ag,HTMLMetaElement:id,HTMLPictureElement:sg,HTMLAreaElement:ug,HTMLOListElement:cg,HTMLTableCaptionElement:lg,HTMLAnchorElement:ad,HTMLLabelElement:dg,HTMLUnknownElement:pg,HTMLModElement:fg,HTMLDetailsElement:mg,HTMLSourceElement:sd,HTMLTrackElement:hg,HTMLMarqueeElement:gg};var vg={test:()=>!0},s3={"text/html":{docType:"<!DOCTYPE html>",ignoreCase:!0,voidElements:/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i},"image/svg+xml":{docType:'<?xml version="1.0" encoding="utf-8"?>',ignoreCase:!1,voidElements:vg},"text/xml":{docType:'<?xml version="1.0" encoding="utf-8"?>',ignoreCase:!1,voidElements:vg},"application/xml":{docType:'<?xml version="1.0" encoding="utf-8"?>',ignoreCase:!1,voidElements:vg},"application/xhtml+xml":{docType:'<?xml version="1.0" encoding="utf-8"?>',ignoreCase:!1,voidElements:vg}};var Ru=class extends _r{constructor(t,r={}){super(t,r),this.detail=r.detail}};var ud=class extends _r{constructor(t,r={}){super(t,r),this.inputType=r.inputType,this.data=r.data,this.dataTransfer=r.dataTransfer,this.isComposing=r.isComposing||!1,this.ranges=r.ranges}};var u3=e=>class extends Fa{constructor(r,o){switch(super(e),arguments.length){case 1:this.height=r,this.width=r;break;case 2:this.height=o,this.width=r;break}}};var c3=({[Lt]:e,[ce]:t},r=null)=>{Lm(e[Ye],t[H]);do{let o=Dt(e),n=o===t?o:o[H];r?r.insertBefore(e,r[ce]):e.remove(),e=n}while(e!==t)},yg=class e{constructor(){this[Lt]=null,this[ce]=null,this.commonAncestorContainer=null}insertNode(t){this[ce].parentNode.insertBefore(t,this[Lt])}selectNode(t){this[Lt]=t,this[ce]=Dt(t)}selectNodeContents(t){this.selectNode(t),this.commonAncestorContainer=t}surroundContents(t){t.replaceChildren(this.extractContents())}setStartBefore(t){this[Lt]=t}setStartAfter(t){this[Lt]=t.nextSibling}setEndBefore(t){this[ce]=Dt(t.previousSibling)}setEndAfter(t){this[ce]=Dt(t)}cloneContents(){let{[Lt]:t,[ce]:r}=this,o=t.ownerDocument.createDocumentFragment();for(;t!==r;)o.insertBefore(t.cloneNode(!0),o[ce]),t=Dt(t),t!==r&&(t=t[H]);return o}deleteContents(){c3(this)}extractContents(){let t=this[Lt].ownerDocument.createDocumentFragment();return c3(this,t),t}createContextualFragment(t){let{commonAncestorContainer:r}=this,o="ownerSVGElement"in r,n=o?r.ownerDocument:r,i=Fm(n,t);if(o){let a=[...i.childNodes];i=n.createDocumentFragment(),Object.setPrototypeOf(i,jn.prototype),i.ownerSVGElement=n;for(let s of a)Object.setPrototypeOf(s,jn.prototype),s.ownerSVGElement=n,i.appendChild(s)}else this.selectNode(i);return i}cloneRange(){let t=new e;return t[Lt]=this[Lt],t[ce]=this[ce],t}};var VV=({nodeType:e},t)=>{switch(e){case 1:return t&xS;case 3:return t&wS;case 8:return t&_S;case 4:return t&SS}return 0},Ag=class{constructor(t,r=bS){this.root=t,this.currentNode=t,this.whatToShow=r;let{[H]:o,[ce]:n}=t;if(t.nodeType===9){let{documentElement:a}=t;o=a,n=a[ce]}let i=[];for(;o&&o!==n;)VV(o,r)&&i.push(o),o=o[H];this[Et]={i:0,nodes:i}}nextNode(){let t=this[Et];return this.currentNode=t.i<t.nodes.length?t.nodes[t.i++]:null,this.currentNode}};var l3=(e,t,r)=>{let{[H]:o,[ce]:n}=t;return e.call({ownerDocument:t,[H]:o,[ce]:n},r)},d3=fR({},p6,a3,{CustomEvent:Ru,Event:_r,EventTarget:qi,InputEvent:ud,NamedNodeMap:Cu,NodeList:Pt}),bg=new WeakMap,Jr=class extends Qi{constructor(t){super(null,"#document",9),this[wr]={active:!1,registry:null},this[no]={active:!1,class:null},this[Tn]=s3[t],this[Bi]=null,this[fl]=null,this[pu]=null,this[Vr]=null,this[Zi]=null}get defaultView(){return bg.has(this)||bg.set(this,new Proxy(globalThis,{set:(t,r,o)=>{switch(r){case"addEventListener":case"removeEventListener":case"dispatchEvent":this[du][r]=o;break;default:t[r]=o;break}return!0},get:(t,r)=>{switch(r){case"addEventListener":case"removeEventListener":case"dispatchEvent":if(!this[du]){let o=this[du]=new qi;o.dispatchEvent=o.dispatchEvent.bind(o),o.addEventListener=o.addEventListener.bind(o),o.removeEventListener=o.removeEventListener.bind(o)}return this[du][r];case"document":return this;case"navigator":return{userAgent:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36"};case"window":return bg.get(this);case"customElements":return this[wr].registry||(this[wr]=new zm(this)),this[wr];case"performance":return t.performance;case"DOMParser":return this[fl];case"Image":return this[Vr]||(this[Vr]=u3(this)),this[Vr];case"MutationObserver":return this[no].class||(this[no]=new Gm(this)),this[no].class}return this[pu]&&this[pu][r]||d3[r]||t[r]}})),bg.get(this)}get doctype(){let t=this[Bi];if(t)return t;let{firstChild:r}=this;return r&&r.nodeType===10?this[Bi]=r:null}set doctype(t){if(/^([a-z:]+)(\s+system|\s+public(\s+"([^"]+)")?)?(\s+"([^"]+)")?/i.test(t)){let{$1:r,$4:o,$6:n}=RegExp;this[Bi]=new ti(this,r,o,n),Ko(this,this[Bi],this[H])}}get documentElement(){return this.firstElementChild}get isConnected(){return!0}_getParent(){return this[du]}createAttribute(t){return new ln(this,t)}createCDATASection(t){return new Ji(this,t)}createComment(t){return new Ki(this,t)}createDocumentFragment(){return new Ma(this)}createDocumentType(t,r,o){return new ti(this,t,r,o)}createElement(t){return new Mn(this,t)}createRange(){let t=new yg;return t.commonAncestorContainer=this,t}createTextNode(t){return new fn(this,t)}createTreeWalker(t,r=-1){return new Ag(t,r)}createNodeIterator(t,r=-1){return this.createTreeWalker(t,r)}createEvent(t){let r=mR(t==="Event"?new _r(""):new Ru(""));return r.initEvent=r.initCustomEvent=(o,n=!1,i=!1,a)=>{r.bubbles=!!n,hR(r,{type:{value:o},canBubble:{value:n},cancelable:{value:i},detail:{value:a}})},r}cloneNode(t=!1){let{constructor:r,[wr]:o,[Bi]:n}=this,i=new r;if(i[wr]=o,t){let a=i[ce],{childNodes:s}=this;for(let{length:c}=s,l=0;l<c;l++)i.insertBefore(s[l].cloneNode(!0),a);n&&(i[Bi]=s[0])}return i}importNode(t){let r=1<arguments.length&&!!arguments[1],o=t.cloneNode(r),{[wr]:n}=this,{active:i}=n,a=s=>{let{ownerDocument:c,nodeType:l}=s;s.ownerDocument=this,i&&c!==this&&l===1&&n.upgrade(s)};if(a(o),r)switch(o.nodeType){case 1:case 11:{let{[H]:s,[ce]:c}=o;for(;s!==c;)s.nodeType===1&&a(s),s=s[H];break}}return o}toString(){return this.childNodes.join("")}querySelector(t){return l3(super.querySelector,this,t)}querySelectorAll(t){return l3(super.querySelectorAll,this,t)}getElementsByTagNameNS(t,r){return this.getElementsByTagName(r)}createAttributeNS(t,r){return this.createAttribute(r)}createElementNS(t,r,o){return t===$a?new jn(this,r,null):this.createElement(r,o)}};Tt(d3.Document=function(){Ir()},Jr).prototype=Jr.prototype;var HV=(e,t,r,o)=>{if(!t&&Au.has(r)){let a=Au.get(r);return new a(e,r)}let{[wr]:{active:n,registry:i}}=e;if(n){let a=t?o.is:r;if(i.has(a)){let{Class:s}=i.get(a),c=new s(e,r);return Qo.set(c,{connected:!1}),c}}return new _(e,r)},cd=class extends Jr{constructor(){super("text/html")}get all(){let t=new Pt,{[H]:r,[ce]:o}=this;for(;r!==o;){switch(r.nodeType){case 1:t.push(r);break}r=r[H]}return t}get head(){let{documentElement:t}=this,{firstElementChild:r}=t;return(!r||r.tagName!=="HEAD")&&(r=this.createElement("head"),t.prepend(r)),r}get body(){let{head:t}=this,{nextElementSibling:r}=t;return(!r||r.tagName!=="BODY")&&(r=this.createElement("body"),t.after(r)),r}get title(){let{head:t}=this;return t.getElementsByTagName("title").at(0)?.textContent||""}set title(t){let{head:r}=this,o=r.getElementsByTagName("title").at(0);o?o.textContent=t:r.insertBefore(this.createElement("title"),r.firstChild).textContent=t}createElement(t,r){let o=!!(r&&r.is),n=HV(this,o,t,r);return o&&n.setAttribute("is",r.is),n}};var xg=class extends Jr{constructor(){super("image/svg+xml")}toString(){return this[Tn].docType+super.toString()}};var wg=class extends Jr{constructor(){super("text/xml")}toString(){return this[Tn].docType+super.toString()}};var Sg=class e{parseFromString(t,r,o=null){let n=!1,i;return r==="text/html"?(n=!0,i=new cd):r==="image/svg+xml"?i=new xg:i=new wg,i[fl]=e,o&&(i[pu]=o),n&&t==="..."&&(t="<!doctype html><html><head></head><body></body></html>"),t?Zm(i,n,t):i}};var{parse:hhe}=JSON;var p3=(e,t=null)=>new Sg().parseFromString(e,"text/html",t).defaultView;function WV(){Ir()}Tt(WV,Jr).prototype=Jr.prototype;async function qV(e){try{let t=await fetch(`https://r.jina.ai/${e}`,{signal:AbortSignal.timeout(3e4),headers:{Accept:"text/plain"}});if(t.ok){let r=await t.text();if(r.length>100)return{content:r.slice(0,2e4)}}}catch{return null}return null}async function JV(e){try{let t=await fetch(e,{signal:AbortSignal.timeout(3e4),headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,text/plain;q=0.8"},redirect:"follow"});if(!t.ok)return null;let r=t.headers.get("content-type")||"",o=await t.text();if(r.includes("application/json"))try{return{content:JSON.stringify(JSON.parse(o),null,2).slice(0,2e4),type:"json"}}catch{return{content:o.slice(0,2e4),type:"json"}}if(r.includes("text/plain")||r.includes("text/markdown"))return{content:o.slice(0,2e4),type:"text"};let{document:n}=p3(o),a=new f3.Readability(n).parse();if(a?.textContent){let s={};return a.title&&(s.title=a.title),a.byline&&(s.author=a.byline),s.content=a.textContent.slice(0,2e4),s}}catch{return null}return null}function KV(e){let t=e.trim();return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`https://${t}`),t}var ld={description:"Fetch and read content from a URL. Use for reading webpages, documentation, articles.",inputSchema:u.object({url:u.string().describe("The URL to fetch")}),execute:async({url:e})=>{try{let t=KV(e),r=await qV(t);if(r?.content)return r;let o=await JV(t);return o?.content?o:{error:"fetch failed"}}catch{return{error:"fetch failed"}}}};import*as _g from"node:fs";import*as m3 from"node:path";function QV(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`}var w_={description:"Get information about a file or directory (size, modified date, type).",inputSchema:u.object({filePath:u.string().describe("Absolute or relative path")}),execute:async({filePath:e})=>{try{let t=st(e);if(!t){if(!await He(`get info for path outside project: ${e}`,{tool:"fileInfo",noAlways:!0}))return{error:"User denied access to path outside project."};t=ut(e)}if(!_g.existsSync(t))return{error:`not found: ${e}`};let r=_g.statSync(t),o=m3.extname(e).slice(1)||"none";return{path:e,type:r.isDirectory()?"directory":"file",size:QV(r.size),sizeBytes:r.size,extension:r.isDirectory()?null:o,modified:r.mtime.toISOString(),created:r.birthtime.toISOString()}}catch{return{error:`info failed: ${e}`}}}};import{execFileSync as YV,execSync as XV}from"node:child_process";import*as h3 from"node:fs";import*as Ig from"node:path";var e7=1e4,t7=1024*1024;function r7(){try{return XV("rg --version",{stdio:"pipe",timeout:2e3}),!0}catch{return!1}}var S_=null;function n7(){return S_===null&&(S_=r7()),S_}function g3(e){let t="";for(let r of e)r==="*"?t+=".*":r==="?"?t+=".":".+^${}()|[]\\".includes(r)?t+=`\\${r}`:t+=r;return t}function o7(e,t,r){if(!n7())return null;try{let o=g3(e),n=YV("rg",["--files"],{cwd:t,encoding:"utf-8",timeout:e7,stdio:["pipe","pipe","pipe"],maxBuffer:t7}),i=[];for(let a of n.split(`
130
- `)){if(!a)continue;let s=a.includes("/")?a.split("/").pop()??a:a;if(new RegExp(`^${o}$`,"i").test(s)&&(i.push(a),i.length>=r))break}return i}catch{return null}}var i7=["node_modules",".git","dist","build",".next","coverage",".cache"];function a7(e,t){let r=g3(t);return new RegExp(`^${r}$`,"i").test(e)}function v3(e,t,r,o,n){if(o.length>=n)return;let i;try{i=h3.readdirSync(e,{withFileTypes:!0})}catch{return}for(let a of i){if(o.length>=n)return;if(a.name.startsWith(".")||i7.includes(a.name))continue;let s=Ig.join(e,a.name);a7(a.name,r)&&o.push(Ig.relative(t,s)),a.isDirectory()&&v3(s,t,r,o,n)}}var __={description:"Find files by name pattern (supports * and ? wildcards). Use this to locate files when the project file tree is not enough.",inputSchema:u.object({pattern:u.string().describe('File name pattern (e.g. "*.ts", "test_?.js")'),directory:u.string().optional().describe("Absolute or relative directory to search in")}),execute:async({pattern:e,directory:t})=>{try{let r=st(t||".");if(!r){if(!await He(`find files outside project: ${t||"."}`,{tool:"findFiles",noAlways:!0}))return{error:"User denied access to directory outside project."};r=ut(t||".")}let o=100,n=o7(e,r,o);if(n!==null)return n.length===0?{files:[],message:"No files found",silent:!0}:{files:n,total:n.length};let i=[];return v3(r,r,e,i,o),i.length===0?{files:[],message:"No files found",silent:!0}:{files:i,total:i.length}}catch{return{error:`find failed: ${e}`}}}};import{spawn as s7}from"node:child_process";var u7=100,Fn=new Map;function y3(e){let t=s7(e,[],{shell:!0,cwd:process.cwd(),stdio:["ignore","pipe","pipe"]}),o={pid:t.pid??0,command:e,startedAt:Date.now(),process:t,logs:[],urls:[],exitCode:null,exitedAt:null},n=i=>{let a=i.toString().split(`
131
- `).filter(Boolean);for(let s of a)o.logs.push(s),o.logs.length>u7&&o.logs.shift()};return t.stdout?.on("data",n),t.stderr?.on("data",n),t.on("exit",i=>{o.exitCode=i??1,o.exitedAt=Date.now()}),Fn.set(o.pid,o),o}function Ou(e){return e.exitCode===null}function Eg(){return Array.from(Fn.values())}function kg(){return Array.from(Fn.values()).filter(Ou)}function A3(e,t){let r=Fn.get(e);r&&(r.urls=t)}function dd(e){let t=Fn.get(e);return t?(t.process.kill(),Fn.delete(e),!0):!1}function b3(){for(let e of Fn.values())Ou(e)&&e.process.kill();Fn.clear()}function I_(){for(let[e,t]of Fn.entries())Ou(t)||Fn.delete(e)}function za(e,t=50){let r=Fn.get(e);return r?r.logs.slice(-t):[]}var Tg={description:"Kill a background process. Do not say anything - the tool handles output.",inputSchema:u.object({pid:u.number().optional().describe("Process ID to kill. If not provided, kills most recent process")}),execute:async({pid:e})=>{let t=e;if(!t){let o=kg();if(o.length===0)return{error:"No background processes running"};t=o[o.length-1].pid}return dd(t)?{message:`killed process ${t}`,pid:t,silent:!0}:{error:`Process ${t} not found`}}};import*as Du from"node:fs";import*as pd from"node:path";function c7(e){let t=new Set,r=pd.join(e,".gitignore");try{if(Du.existsSync(r)){let o=Du.readFileSync(r,"utf-8");for(let n of o.split(`
132
- `)){let i=n.trim();if(i&&!i.startsWith("#")){let a=i.replace(/^\//,"").replace(/\/$/,"");t.add(a)}}}}catch{}return t}function x3(e,t,r="",o=0,n=3){if(o>=n)return[];let a=Du.readdirSync(e,{withFileTypes:!0}).filter(c=>!c.name.startsWith(".")&&!t.has(c.name)).sort((c,l)=>c.isDirectory()!==l.isDirectory()?c.isDirectory()?-1:1:c.name.localeCompare(l.name)),s=[];for(let c=0;c<a.length;c++){let l=a[c],d=c===a.length-1,f=d?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",p=l.isDirectory()?`${l.name}/`:l.name;if(s.push(`${r}${f}${p}`),l.isDirectory()){let m=r+(d?" ":"\u2502 "),v=pd.join(e,l.name);s.push(...x3(v,t,m,o+1,n))}}return s}var E_={description:"List files and directories as a tree. Only use when the project file tree in the system prompt is insufficient (e.g. a directory was collapsed). Prefer readFile, searchInFiles, or findFiles instead.",inputSchema:u.object({dirPath:u.string().optional().describe("Absolute or relative path, defaults to ."),depth:u.number().optional().describe("Max depth to recurse (default 3, max 5)")}),execute:async({dirPath:e=".",depth:t=3})=>{try{let r=st(e);if(!r){if(!await He(`list directory outside project: ${e}`,{tool:"listDirectory",noAlways:!0}))return{error:"User denied access to directory outside project."};r=ut(e)}let o=c7(r),n=Math.min(t,5),i=x3(r,o,"",0,n);return{tree:`${pd.basename(r)||r}/
133
- ${i.join(`
134
- `)}`,path:r}}catch{return{error:`list failed: ${e}`}}}};import*as ai from"node:fs";xr();xr();import*as ho from"node:fs";import*as w3 from"node:os";import*as S3 from"node:path";var k_=S3.join(w3.homedir(),".ai-memories");function Cg(){if(ho.existsSync(k_))try{let e=ho.readFileSync(k_,"utf-8").split(`
135
- `).filter(Boolean);if(e.length>0){nr();let t=[];try{if(ho.existsSync(br)){let o=JSON.parse(ho.readFileSync(br,"utf-8"));t=Array.isArray(o)?o:[]}}catch{}let r=[...new Set([...t,...e])];ho.writeFileSync(br,JSON.stringify(r,null,2),"utf-8")}ho.unlinkSync(k_)}catch{}}function l7(){Cg();try{if(ai.existsSync(br)){let e=JSON.parse(ai.readFileSync(br,"utf-8"));return Array.isArray(e)?e:[]}}catch{}return[]}function d7(e){nr(),ai.writeFileSync(br,JSON.stringify(e,null,2),"utf-8")}var _3={description:'Save or recall user preferences for future sessions. ONLY use when user explicitly says "remember this" or "save this". Do NOT use for questions like "what time is it" - use runCommand instead.',inputSchema:u.object({action:u.enum(["save","list","clear"]).describe("Action to perform"),fact:u.string().optional().describe("Fact to save (required for save)")}),execute:async({action:e,fact:t})=>{let r=l7();if(e==="save"){if(!t)return{error:"No fact provided"};let o=t.trim().replace(/^-\s*/,"");return r.includes(o)?{message:"remembered",silent:!0}:(r.push(o),d7(r),{message:"remembered",silent:!0})}return e==="list"?r.length===0?{memories:[],output:"No saved memories"}:{memories:r,output:r.map(o=>`- ${o}`).join(`
136
- `)}:e==="clear"?(ai.existsSync(br)&&ai.unlinkSync(br),{message:"memories cleared",silent:!0}):{error:"Unknown action"}}};import*as $g from"node:fs";var p7=["sk-","pk-","sk_","pk_","ghp_","gho_","ghu_","ghs_","ghr_","xoxb-","xoxp-","xoxa-","xoxr-","eyJ","Bearer ","AKIA","ABIA","ACCA","AGPA","AIDA","AIPA","ANPA","ANVA","AROA","APKA","ASCA","ASIA","npm_","pypi-","glpat-","glsa-","vck_","vcka_"],f7=[/([A-Z_]*(?:KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL|AUTH|PRIVATE)[A-Z_]*)[=:]["']?([^"'\s\n]{8,})["']?/gi,/([a-z_]*(?:key|secret|token|password|credential|auth|private)[a-z_]*)[=:]["']?([^"'\s\n]{8,})["']?/gi,/(bearer)\s+([^\s\n]{10,})/gi,/(authorization)[=:\s]["']?([^\s"'\n]{10,})["']?/gi];function I3(e){return e.length<=4?"****":e.slice(0,4)+"*".repeat(Math.min(e.length-4,16))}function si(e){let t=e;for(let r of f7)t=t.replace(r,(o,n,i)=>o.replace(i,I3(i)));for(let r of p7){let o=new RegExp(`(${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})([A-Za-z0-9_-]{8,})`,"g");t=t.replace(o,(n,i,a)=>i+I3(a))}return t}var m7=500,h7=1e4,fd={description:"Read the contents of a file. When showing file contents to the user, use plain text with code blocks only for actual code.",inputSchema:u.object({filePath:u.string().describe("Absolute or relative path to the file")}),execute:async({filePath:e})=>{try{let t=st(e);if(!t){if(!await He(`read file outside project: ${e}`,{tool:"readFile",noAlways:!0}))return{error:"User denied access to file outside project."};t=ut(e)}if(!$g.existsSync(t))return{error:`file not found: ${e}. Check <project-files> for the correct path.`};let r=si($g.readFileSync(t,"utf-8")),o=r.split(`
137
- `).length;return o>m7?{content:r.slice(0,h7),truncated:!0,totalLines:o}:{content:r,truncated:!1,totalLines:o}}catch{return{error:`read failed: ${e}`}}}};var Ng={description:"Read recent logs/output from a background process. Use this to check for errors or see what a dev server is outputting. Do NOT call repeatedly \u2014 call once and move on. If there is no output yet, tell the user instead of retrying.",inputSchema:u.object({pid:u.number().optional().describe("Process ID. If not provided, returns logs from most recent process"),lines:u.number().optional().describe("Number of lines to return (default: 50)")}),execute:async({pid:e,lines:t=50})=>{let r=e;if(!r){let o=Eg();if(o.length===0)return{error:"No background processes running"};r=o[o.length-1].pid}for(let o=0;o<10;o++){let n=za(r,t);if(n.length>0)return{pid:r,logs:n,lineCount:n.length};await new Promise(i=>setTimeout(i,500))}return{pid:r,logs:[],message:"No output yet",silent:!0}}};import*as Ba from"node:fs";import*as E3 from"node:path";var k3={description:"Rename or move a file.",inputSchema:u.object({oldPath:u.string().describe("Absolute or relative current path"),newPath:u.string().describe("Absolute or relative new path")}),execute:async({oldPath:e,newPath:t})=>{try{let r=st(e);if(!r){if(!await He(`rename from outside project: ${e}`,{tool:"renameFile",noAlways:!0}))return{error:"User denied access to path outside project."};r=ut(e)}let o=st(t);if(!o){if(!await He(`rename to outside project: ${t}`,{tool:"renameFile",noAlways:!0}))return{error:"User denied access to path outside project."};o=ut(t)}if(!Ba.existsSync(r))return{error:`not found: ${e}`};let n=E3.dirname(o);return Ba.existsSync(n)||Ba.mkdirSync(n,{recursive:!0}),h4(e,t),Ba.renameSync(r,o),{message:`Renamed to ${t}`,silent:!0}}catch{return{error:`rename failed: ${e}`}}}};import{spawn as g7}from"node:child_process";var v7=process.cwd(),y7=6e4,A7=3e4,Rg=null,Og=null;function T_(){let e=Rg,t=Og;if(Rg=null,Og=null,e?.pid)try{process.kill(-e.pid,"SIGTERM")}catch{try{e.kill("SIGKILL")}catch{}}t&&t({error:"Command cancelled by user. Do not retry."})}var Dg={description:"Run shell commands. Use for: date, pwd, ls, git, package manager commands, build, test, etc. ALWAYS use the project package manager from the system prompt (pnpm/bun/yarn) \u2014 NEVER default to npm. NEVER use for dev/start/watch/serve - those need startProcess.",inputSchema:u.object({command:u.string().describe("The shell command to execute")}),execute:async({command:e})=>{let t=e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'"),r=t.toLowerCase();return["dev","start","serve","watch","preview"].some(i=>new RegExp(`\\b${i}\\b`).test(r))?{error:"use startProcess for long-running commands"}:await He(`Run: ${t}?`,{tool:"runCommand",command:t})?(Re(`runCommand: ${t}`),new Promise(i=>{let a=[],s=Date.now(),c=!1,l=!1,d=y=>{l||(l=!0,Rg=null,Og=null,i(y))},f=g7(t,{cwd:v7,shell:!0,detached:!0,stdio:["ignore","pipe","pipe"]});Rg=f,Og=d,f.unref();let p=()=>{let y=f.pid;if(y)try{process.kill(-y,"SIGTERM")}catch{f.kill("SIGTERM")}else f.kill("SIGTERM")},m=setInterval(()=>{Date.now()-s>A7&&(c=!0,p(),clearInterval(m))},5e3),v=setTimeout(()=>{c=!0,p()},y7),g=y=>{s=Date.now(),a.push(y.toString())};f.stdout?.on("data",g),f.stderr?.on("data",g),f.on("close",y=>{clearInterval(m),clearTimeout(v);let E=si(a.join("").trim()),I=E?`$ ${t}
138
- ${E}`:`$ ${t}`;d(c?{error:"Command cancelled",output:I}:y===0?{output:I,silent:!0}:{output:I,exitCode:y})}),f.on("error",y=>{clearInterval(m),clearTimeout(v),d({error:y.message,output:`$ ${t}`})})})):{error:"User denied this action. Do not retry."}}};import*as Qt from"node:fs";import*as C3 from"node:os";import*as $_ from"node:path";Di();xr();var b7=u.object({enabled:u.boolean().optional(),maxIterations:u.number().int().min(1).max(10).optional()}).optional(),T3=u.object({apiKey:u.string().optional(),model:u.string().optional(),aliases:u.record(u.string(),u.string()).optional(),spacing:u.number().int().min(0).max(4).optional(),markdown:u.boolean().optional(),search:u.enum(["perplexity","parallel"]).optional(),review:b7}).strip(),C_={spacing:1,markdown:!0,search:"perplexity"},Pu=null,md=null;function x7(){try{let e=Qt.statSync(to).mtimeMs;return{changed:e!==md,mtimeMs:e}}catch{return{changed:!0,mtimeMs:null}}}function w7(){let e=C3.homedir(),t=$_.join(e,".airc"),r=$_.join(e,".ai-settings"),o={};try{if(Qt.existsSync(t)){let n=Qt.readFileSync(t,"utf-8"),i=n.match(/AI_GATEWAY_API_KEY=(.+)/);i&&(o.apiKey=i[1].trim());let a=n.match(/model=(.+)/);a&&(o.model=a[1].trim()),Qt.unlinkSync(t)}}catch(n){Nt(n)}try{if(Qt.existsSync(r)){let n=JSON.parse(Qt.readFileSync(r,"utf-8"));o={...o,...n},Qt.unlinkSync(r)}}catch(n){Nt(n)}return Object.keys(o).length>0?o:null}function ui(){let e=x7();if(Pu&&!e.changed)return Pu;nr();let t;try{if(Qt.existsSync(to)){let o=JSON.parse(Qt.readFileSync(to,"utf-8"));if("steps"in o){delete o.steps;try{Qt.writeFileSync(to,JSON.stringify(o,null,2),"utf-8")}catch{}}let n=T3.safeParse(o);return t={...C_,...n.success?n.data:o},Pu=t,md=e.mtimeMs,t}let r=w7();if(r){let o=T3.safeParse(r);return t={...C_,...o.success?o.data:r},Qt.writeFileSync(to,JSON.stringify(t,null,2),"utf-8"),Pu=t,md=e.mtimeMs,t}}catch(r){Nt(r)}return t={...C_},Pu=t,md=null,t}function Za(e){nr();let r={...ui(),...e};Qt.writeFileSync(to,JSON.stringify(r,null,2),"utf-8"),Pu=null,md=null}function Yi(){return ui().aliases||{}}function $3(e,t){let r=Yi();r[e]=t,Za({aliases:r})}function N3(e){let t=Yi();return t[e]?(delete t[e],Za({aliases:t}),!0):!1}function hd(){return process.env.AI_GATEWAY_API_KEY||ui().apiKey||null}function R3(e){Za({apiKey:e})}function O3(){return ui().model||null}function Pg(e){Za({model:e})}var Mu=null;function N_(){if(Mu)return Mu;let e=ui();return Mu={spacing:e.spacing??1,markdown:e.markdown??!0,model:e.model??"",search:e.search??"perplexity"},Mu}function go(e){return N_()[e]}function ju(e,t){Za({[e]:t}),Mu=null}function Uu(){return ui().review?.enabled??!0}function R_(e){let t=ui();Za({review:{...t.review,enabled:e}}),Mu=null}function Lu(){return ui().review?.maxIterations??3}function O_(){return(go("search")||"perplexity")==="parallel"?{parallel_search:Ni.tools.parallelSearch()}:{perplexity_search:Ni.tools.perplexitySearch()}}import{execFileSync as S7,execSync as _7}from"node:child_process";import*as Ga from"node:fs";import*as ci from"node:path";var I7=1e4,E7=1024*1024;function k7(){try{return _7("rg --version",{stdio:"pipe",timeout:2e3}),!0}catch{return!1}}var D_=null;function T7(){return D_===null&&(D_=k7()),D_}function D3(e,t,r,o){if(!T7())return null;try{let n=["-n","-i","-F","--no-heading","-M","200","--max-count",String(r),"--",e];o&&n.push(o);let i=S7("rg",n,{cwd:t,encoding:"utf-8",timeout:I7,stdio:["pipe","pipe","pipe"],maxBuffer:E7}),a=[];for(let s of i.split(`
139
- `)){if(!s||a.length>=r)break;let c=o?s.match(/^(\d+):(.*)$/):s.match(/^(.+?):(\d+):(.*)$/);c&&(o?a.push({file:o,line:Number.parseInt(c[1],10),content:c[2].trim().slice(0,100)}):a.push({file:c[1],line:Number.parseInt(c[2],10),content:c[3].trim().slice(0,100)}))}return a}catch(n){return n&&typeof n=="object"&&"status"in n&&n.status===1?[]:null}}var C7=["node_modules",".git","dist","build",".next","coverage",".cache"];function P3(e,t,r,o,n){if(o.length>=n)return;let i;try{i=Ga.readdirSync(e,{withFileTypes:!0})}catch{return}for(let a of i){if(o.length>=n)return;if(a.name.startsWith(".")||C7.includes(a.name))continue;let s=ci.join(e,a.name);if(a.isDirectory())P3(s,t,r,o,n);else if(a.isFile())try{let l=Ga.readFileSync(s,"utf-8").split(`
140
- `);for(let d=0;d<l.length&&o.length<n;d++)r.test(l[d])&&o.push({file:ci.relative(t,s),line:d+1,content:l[d].trim().slice(0,100)})}catch{}}}function $7(e,t,r,o,n){try{let a=Ga.readFileSync(e,"utf-8").split(`
141
- `);for(let s=0;s<a.length&&o.length<n;s++)r.test(a[s])&&o.push({file:ci.relative(t,e),line:s+1,content:a[s].trim().slice(0,100)})}catch{}}var gd={description:"Search for text or patterns across files. Use this to find code by content (e.g. function names, imports, strings). Preferred over listDirectory for locating code.",inputSchema:u.object({query:u.string().describe("Text or regex pattern to search for"),directory:u.string().optional().describe("Absolute or relative directory to search in")}),execute:async({query:e,directory:t})=>{try{let r=st(t||".");if(!r){if(!await He(`search files outside project: ${t||"."}`,{tool:"searchInFiles",noAlways:!0}))return{error:"User denied access to directory outside project."};r=ut(t||".")}let o=50,n=null;try{Ga.statSync(r).isFile()&&(n=r,r=ci.dirname(r))}catch{}let i=n?D3(e,r,o,ci.basename(n)):D3(e,r,o);if(i!==null)return i.length===0?{matches:[],message:"No matches found"}:{matches:i,total:i.length};let a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(a,"i"),c=[];return n?$7(n,r,s,c,o):P3(r,r,s,c,o),c.length===0?{matches:[],message:"No matches found"}:{matches:c,total:c.length}}catch{return{error:`search failed: ${e}`}}}};import{execFileSync as M7}from"node:child_process";import*as Ad from"node:fs";import*as bd from"node:path";var zn={"HTTP-Referer":"https://www.npmjs.com/package/ai-cli","X-Title":"ai-cli"},Fu="anthropic/claude-sonnet-4.5";var Xi="https://ai-gateway.vercel.sh",Mg=null,M3=0,N7=300*1e3,j3=new Map;async function Va(e=!1){if(!e&&Mg&&Date.now()-M3<N7)return Mg;let{models:t}=await Ni.getAvailableModels();return Mg=t,M3=Date.now(),Mg}function vd(e,t){let r=e.toLowerCase(),o=t.toLowerCase(),n=r.replace(/[-_.]/g,""),i=o.replace(/[-_.]/g,"");if(r===o)return 1e3;if(n.endsWith(`/${i}`))return 950;if(n.includes(i))return 900;if(r.endsWith(`/${o}`))return 850;if(r.includes(`/${o}`))return 800;let a=o.split(/[-/]/),s=0;for(let l of a)l&&r.includes(l)&&(s+=100);let c=r.indexOf(o);return c!==-1&&(s+=200-c),s>0&&(s+=Math.max(0,50-e.length)),s}async function U3(e){let t=await Va(),r=t.find(n=>n.id.toLowerCase()===e.toLowerCase());if(r)return r.id;let o=t.map(n=>({model:n,score:vd(n.id,e)})).filter(n=>n.score>0).sort((n,i)=>i.score-n.score);if(o.length>0)return o[0].model.id;throw new Error(`no model found for "${e}"`)}var R7=/\bo[134]\b|\bthinking\b|\breason/;async function jg(e){let t=j3.get(e);if(t)return t;let r=e.toLowerCase(),o={vision:!0,tools:!0,reasoning:R7.test(r)};return j3.set(e,o),o}var O7="openai/text-embedding-3-small";async function P_(e){if(e.length===0)return[];let t=await fetch(`${Xi}/v1/embeddings`,{method:"POST",headers:{"Content-Type":"application/json",...zn},body:JSON.stringify({model:O7,input:e}),signal:AbortSignal.timeout(3e4)});if(!t.ok)throw new Error(`embedding request failed: ${t.status} ${t.statusText}`);let r=await t.json();if(!r?.data||!Array.isArray(r.data))throw new Error("unexpected embedding response format");return r.data.sort((n,i)=>n.index-i.index).map(n=>n.embedding)}function L3(e,t){if(e.length!==t.length)return 0;let r=0,o=0,n=0;for(let a=0;a<e.length;a++)r+=e[a]*t[a],o+=e[a]*e[a],n+=t[a]*t[a];let i=Math.sqrt(o)*Math.sqrt(n);return i===0?0:r/i}xr();Di();import*as F3 from"node:crypto";import*as Bn from"node:fs";import*as yd from"node:path";var j_=yd.join(an,"indexes");function z3(e){return yd.join(j_,`${e}.json`)}function D7(e){return F3.createHash("sha256").update(e).digest("hex").slice(0,16)}function U_(e){return D7(e||process.cwd())}function B3(e){let t=U_(e),r=z3(t);try{return Bn.existsSync(r)?JSON.parse(Bn.readFileSync(r,"utf-8")):null}catch(o){return Nt(o),null}}function Z3(e){nr(),Bn.existsSync(j_)||Bn.mkdirSync(j_,{recursive:!0});let t=z3(e.projectHash);Bn.writeFileSync(t,JSON.stringify(e),"utf-8")}function G3(e,t,r){if(!t)return e;let o=[];for(let n of e){let i=yd.resolve(r,n);try{let s=Bn.statSync(i).mtimeMs;(!t.fileMtimes[n]||t.fileMtimes[n]!==s)&&o.push(n)}catch{o.push(n)}}return o}var M_=40,P7=5;function V3(e,t){let r=t.split(`
142
- `);if(r.length<=M_)return[{file:e,startLine:1,endLine:r.length,text:t.slice(0,2e3)}];let o=[];for(let n=0;n<r.length;n+=M_-P7){let i=Math.min(n+M_,r.length),a=r.slice(n,i);if(o.push({file:e,startLine:n+1,endLine:i,text:`${e}:${n+1}-${i}
143
- ${a.join(`
144
- `).slice(0,2e3)}`}),i>=r.length)break}return o}var j7=new Set([".ts",".tsx",".js",".jsx",".mts",".mjs",".py",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".rb",".php",".swift",".kt",".scala",".vue",".svelte",".css",".scss",".html",".json",".yaml",".yml",".toml",".md",".mdx",".sql",".sh",".bash",".zsh"]),U7=5e4,H3=50;function L7(e){try{return M7("git",["ls-files"],{cwd:e,encoding:"utf-8",timeout:3e3,stdio:["pipe","pipe","pipe"]}).trim().split(`
145
- `).filter(r=>{if(!r)return!1;let o=bd.extname(r).toLowerCase();return j7.has(o)})}catch{return[]}}async function F7(e){let t=L7(e),r=B3(e),o=G3(t,r,e);Re(`semantic-search: ${t.length} files, ${o.length} stale`);let n=new Set(o),i=r?r.chunks.filter(p=>!n.has(p.file)):[],a=new Set(t),s=i.filter(p=>a.has(p.file)),c=[];for(let p of o){let m=bd.resolve(e,p);try{if(Ad.statSync(m).size>U7)continue;let g=Ad.readFileSync(m,"utf-8");c.push(...V3(p,g))}catch{}}let l=[];for(let p=0;p<c.length;p+=H3){let m=c.slice(p,p+H3),v=m.map(g=>g.text);try{let g=await P_(v);for(let y=0;y<m.length;y++)l.push({file:m[y].file,startLine:m[y].startLine,endLine:m[y].endLine,text:m[y].text,embedding:g[y]})}catch(g){Re(`semantic-search: embedding batch failed: ${g}`)}}let d={};for(let p of t)try{let m=Ad.statSync(bd.resolve(e,p));d[p]=m.mtimeMs}catch{}let f={projectHash:U_(e),projectPath:e,fileMtimes:d,chunks:[...s,...l]};return Z3(f),f}var L_={description:'Search the codebase by meaning using semantic similarity. Use when you need to find code by intent rather than exact text (e.g. "authentication logic", "database connection handling"). Indexes the project on first use.',inputSchema:u.object({query:u.string().describe("Natural language description of what you are looking for"),topK:u.number().optional().describe("Number of results to return (default 10)")}),execute:async({query:e,topK:t=10})=>{try{let r=Math.min(Math.max(t,1),100),o=process.cwd(),n=await F7(o);if(n.chunks.length===0)return{results:[],message:"No indexed code found"};let[i]=await P_([e]),a=n.chunks.map(d=>({file:d.file,startLine:d.startLine,endLine:d.endLine,score:L3(i,d.embedding),preview:d.text.slice(0,200)}));a.sort((d,f)=>f.score-d.score);let s=a.slice(0,r),c=new Set,l=s.filter(d=>c.has(`${d.file}:${d.startLine}`)?!1:(c.add(`${d.file}:${d.startLine}`),!0));return{results:l.map(d=>({file:d.file,lines:`${d.startLine}-${d.endLine}`,score:Math.round(d.score*1e3)/1e3,preview:d.preview})),total:l.length,indexedChunks:n.chunks.length}}catch(r){return Re(`semantic-search error: ${r}`),{error:`semantic search failed: ${r}`}}}};var z7=/https?:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0):\d+/gi;async function B7(e,t=15e3){let r=new Set,o=0,n=Date.now();for(;Date.now()-n<t;){let i=za(e,100);for(let a of i){let s=a.match(z7);if(s)for(let c of s)r.has(c)||(r.add(c),o=Date.now())}if(r.size>0&&Date.now()-o>3e3)break;await new Promise(a=>setTimeout(a,500))}return{urls:[...r],logs:za(e,50)}}var Ug={description:"Start long-running background process. USE THIS for: dev, start, serve, watch, preview. Waits up to 15 s for server URLs to appear. Returns all detected URLs and recent output. ALWAYS report every URL back to the user. If no URLs are found, share the recent logs so the user knows what happened.",inputSchema:u.object({command:u.string().describe("Command to run")}),execute:async({command:e})=>{let t=e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'");Re(`startProcess: ${t}`);let r=y3(t),{urls:o,logs:n}=await B7(r.pid);o.length>0&&A3(r.pid,o);let i=[`${t} (pid: ${r.pid})`];return o.length>0?i.push(`
146
- Servers ready:
147
- ${o.map(s=>` ${s}`).join(`
148
- `)}`):n.length>0?(i.push(`
149
- Recent output:`),i.push(n.slice(-20).join(`
150
- `))):i.push(`
151
- No output yet \u2014 the process may still be starting.`),{message:i.join(""),pid:r.pid,urls:o,logs:n.slice(-20),silent:!0}}};var Z7=1e4,W3={description:"Get current weather for a location",inputSchema:u.object({location:u.string().describe("City name or location")}),execute:async({location:e})=>{try{let t=await fetch(`https://wttr.in/${encodeURIComponent(e)}?format=j1`,{signal:AbortSignal.timeout(Z7)});if(!t.ok)return{error:"failed to fetch weather"};let r=await t.json(),o=r.current_condition?.[0];return o?{location:r.nearest_area?.[0]?.areaName?.[0]?.value||e,condition:o.weatherDesc?.[0]?.value||"unknown",temperature:`${o.temp_C}\xB0C / ${o.temp_F}\xB0F`,feelsLike:`${o.FeelsLikeC}\xB0C / ${o.FeelsLikeF}\xB0F`,humidity:`${o.humidity}%`,wind:`${o.windspeedKmph} km/h ${o.winddir16Point}`}:{error:"no weather data"}}catch{return{error:"weather service unavailable"}}}};import*as li from"node:fs";import*as Lg from"node:path";function G7(e,t){let o=[];if(e!==null){let n=e.split(`
152
- `).slice(0,5),i=t.split(`
153
- `).slice(0,5);for(let s of n)o.push(au(`- ${s}`));for(let s of i)o.push(Sa(`+ ${s}`));let a=Math.max(e.split(`
154
- `).length,t.split(`
155
- `).length)-5;a>0&&o.push(` ... ${a} more lines`)}else{let n=t.split(`
156
- `).slice(0,5);for(let a of n)o.push(Sa(`+ ${a}`));let i=t.split(`
157
- `).length-5;i>0&&o.push(` ... ${i} more lines`)}return o.join(`
158
- `)}var Fg={description:"Write or create a file with the given content. Use this to help users create or modify files.",inputSchema:u.object({filePath:u.string().describe("Absolute or relative path to the file"),content:u.string().describe("Content to write to the file")}),execute:async({filePath:e,content:t})=>{Re(`writeFile: ${e} (${t.length} chars)`);try{let r=st(e);if(!r){if(!await He(`write file outside project: ${e}`,{tool:"writeFile",noAlways:!0}))return{error:"User denied access to file outside project."};r=ut(e)}let o=li.existsSync(r),n=o?"Update":"Create",i=o?li.readFileSync(r,"utf-8"):null,a=G7(i,t);if(!await He(`${n} ${Lg.basename(e)}?
159
- ${a}`,{tool:"writeFile"}))return{error:"User denied this action. Do not retry."};ym(r);let c=Lg.dirname(r);return li.existsSync(c)||li.mkdirSync(c,{recursive:!0}),li.writeFileSync(r,t,"utf-8"),{message:`${n}d ${e}`,silent:!0}}catch{return{error:`write failed: ${e}`}}}};var zg=null;async function q3(){return zg||(zg=await KN()),zg}function Bg(){zg=null}function Zg(e){let t=O_();return{weather:W3,fetchUrl:ld,readFile:fd,writeFile:Fg,editFile:xm,createFolder:f4,copyFile:p4,renameFile:k3,deleteFile:w4,listDirectory:E_,findFiles:__,searchInFiles:gd,codeOutline:zw,semanticSearch:L_,fileInfo:w_,runCommand:Dg,startProcess:Ug,readProcessLogs:Ng,killProcess:Tg,memory:_3,...t,...e||{}}}function J3(e){let t=O_();return{readFile:fd,listDirectory:E_,findFiles:__,searchInFiles:gd,codeOutline:zw,semanticSearch:L_,fileInfo:w_,fetchUrl:ld,...t,...e||{}}}Di();function V7(e){let t=[];e.message&&t.push(e.message.toLowerCase()),e.data?.error?.message&&t.push(e.data.error.message.toLowerCase());let r=e.cause;for(;r;)r.message&&t.push(r.message.toLowerCase()),r.data?.error?.message&&t.push(r.data.error.message.toLowerCase()),r=r.cause;return t.join(" ")}function ea(e){if(Nt(e),!(e instanceof Error)){let n=typeof e=="string"?e:String(e);return n?`error: ${n.slice(0,200)}`:"error. try again"}let t=e,r=V7(t);if(r.includes("authentication")||t.statusCode===401)return"invalid key. run: ai init";if(t.statusCode===402||r.includes("credit")||r.includes("balance")||r.includes("payment")||r.includes("insufficient"))return"out of credits. top up at vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai";if(t.statusCode===429||r.includes("rate limit"))return"rate limited. try again later";if(t.statusCode===404||r.includes("was not found")||r.includes("does not have access")||r.includes("model not found"))return"model not available. try /model to switch";if(r.includes("doesn't support")||r.includes("does not support")||r.includes("not supported"))return"model does not support this feature. try /model to switch";if(r.includes("unsupported")){let n=t.message?.match(/unsupported[^:]*:\s*([^,]+)/i);return n?`unsupported: ${n[1]}`:"unsupported operation"}if(t.statusCode===400)return"bad request. check your input";if(t.statusCode===403)return"forbidden. check api key permissions";if(t.statusCode===500||t.statusCode===502||t.statusCode===503)return"server error. try again later";if(r.includes("timeout")||r.includes("timed out"))return"request timed out. try again";if(r.includes("network")||r.includes("econnrefused"))return"network error. check connection";if(r.includes("content filter")||r.includes("content_filter"))return"blocked by content filter. rephrase and try again";if(r.includes("context length")||r.includes("too long"))return"message too long. try /compress or shorten your input";if(r.includes("tool failed"))return"tool failed. try again or /model to switch";if(r.includes("type validation failed")||t.name==="AI_TypeValidationError")return"provider returned unexpected data. try again or /model to switch";let o=t.message?.slice(0,200);return o?`error: ${o}`:"error. try again"}import*as Gg from"node:fs";import*as Vg from"node:path";var H7={".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".webp":"image/webp"};function Hg(e){let t=Vg.resolve(e);if(!Gg.existsSync(t))throw new Error(`image not found: ${e}`);let r=Vg.extname(t).toLowerCase(),o=H7[r];if(!o)throw new Error("unsupported format. use: png, jpg, gif, webp");return{data:Gg.readFileSync(t).toString("base64"),mimeType:o}}var z_=8,F_=243,W7=255,q7=6;function J7(e,t){let r=Math.abs(e-t);if(r>=z_)return F_;let o=(1+Math.cos(r/z_*Math.PI))/2;return Math.round(F_+(W7-F_)*o)}function xd(e,t){if(!Go()||e.length===0)return e;let r="",o=-1;for(let n=0;n<e.length;n++){let i=J7(n,t);i!==o&&(r+=`\x1B[38;5;${i}m`,o=i),r+=e[n]}return r+="\x1B[0m",r}var Ha=z_;function Wg(e,t){let r=e+1;return r>t+Ha+q7?-Ha:r}function K7(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let r=Math.floor(t/60),o=t%60;return`${r}m ${o}s`}function zu(e=process.stdout){let t=-Ha,r="",o=null,n=!1,i=0,a=()=>e.columns??process.stderr.columns??process.stdout.columns??80,s=()=>{if(!n)return;let c=K7(Date.now()-i),l=a(),d=` ${c}`,f=l-1-d.length,m=`${r.length>f?r.slice(-f):r}${d}`;Go()?e.write(`\r${xd(m,t)}\x1B[K`):e.write(`\r${m}\x1B[K`),t=Wg(t,m.length)};return{start(c=""){n||(r=c,i=Date.now(),t=-Ha,n=!0,s(),o=setInterval(s,50))},update(c){r=c.replace(/\s+/g," ").trim()},stop(){n&&(n=!1,o&&(clearInterval(o),o=null),e.write("\r\x1B[K"))}}}async function K3(e){let{message:t,model:r=Fu,image:o,isPiped:n,version:i}=e;n||console.log(su(`ai ${i} [${r}]`));let a=null;if(o)try{let d=Hg(o);a={type:"image",image:d.data,mimeType:d.mimeType}}catch(d){console.error(d instanceof Error?d.message:String(d)),process.exit(1)}let s=n?null:zu(),c=!1,l="";try{s?.start("thinking...");let d=[{type:"text",text:t}];a&&d.unshift(a);let f=xa({model:r,system:"You are a helpful CLI assistant. Output plain text only - no markdown formatting, no emojis. Be concise. Always use TypeScript (not JavaScript) unless told otherwise.",messages:[{role:"user",content:d}],tools:Zg(),stopWhen:tu(5),providerOptions:{openai:{reasoningEffort:"high",reasoningSummary:"detailed"}},headers:zn,onError:()=>{}});for await(let p of f.fullStream)p.type==="reasoning-delta"&&p.text?(l+=p.text,s?.update(l)):p.type==="tool-call"?s?.update(`${p.toolName}...`):p.type==="text-delta"&&(c||(c=!0,s?.stop()),process.stdout.write(p.text));c||s?.stop(),n||console.log()}catch(d){s?.stop(),console.error(ea(d)),process.exit(1)}}var Q3=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];async function Q7(e){try{return(await fetch(`${Xi}/v1/credits`,{headers:{Authorization:`Bearer ${e}`}})).ok}catch{return!1}}function Y7(e){return new Promise(t=>{process.stdout.write(e);let r=process.stdin;r.setRawMode?.(!0),r.resume(),r.setEncoding("utf8");let o="",n=i=>{switch(i){case`
160
- `:case"\r":case"":r.setRawMode?.(!1),r.pause(),r.removeListener("data",n),process.stdout.write(`
161
- `),t(o);break;case"":r.setRawMode?.(!1),process.stdout.write(`
162
- `),process.exit(1);break;case"\x7F":case"\b":o.length>0&&(o=o.slice(0,-1),process.stdout.write("\b \b"));break;default:for(let a of i)a>=" "&&a<="~"&&(o+=a,process.stdout.write("*"));break}};r.on("data",n)})}var X7="https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys&title=Go+to+AI+Gateway",eH=(e,t)=>`\x1B]8;;${t}\x1B\\${e}\x1B]8;;\x1B\\`;async function Y3(){console.log(q(`get key \u2192 ${eH("vercel.com/ai",X7)}
163
- `));let e=await Y7(q("\u203A api key: "));e||(console.error("key required"),process.exit(1));let t=0,r=setInterval(()=>{process.stdout.write(`\r${q(Q3[t])} ${q("validating...")}`),t=(t+1)%Q3.length},80),o=await Q7(e);clearInterval(r),process.stdout.write("\r\x1B[K"),o||(console.error("invalid key"),process.exit(1));try{R3(e),console.log(q("saved"))}catch{console.error("failed to save"),process.exit(1)}}import{spawnSync as sD}from"node:child_process";import*as h0 from"node:readline";import{PassThrough as oW}from"node:stream";var ie={};lr(ie,{ConEmu:()=>aO,beep:()=>$H,beginSynchronizedOutput:()=>nO,clearScreen:()=>SH,clearTerminal:()=>EH,clearViewport:()=>_H,cursorBackward:()=>uH,cursorDown:()=>aH,cursorForward:()=>sH,cursorGetPosition:()=>dH,cursorHide:()=>mH,cursorLeft:()=>tO,cursorMove:()=>iH,cursorNextLine:()=>pH,cursorPrevLine:()=>fH,cursorRestorePosition:()=>lH,cursorSavePosition:()=>cH,cursorShow:()=>hH,cursorTo:()=>oH,cursorUp:()=>eO,endSynchronizedOutput:()=>oO,enterAlternativeScreen:()=>kH,eraseDown:()=>AH,eraseEndLine:()=>vH,eraseLine:()=>rO,eraseLines:()=>gH,eraseScreen:()=>qg,eraseStartLine:()=>yH,eraseUp:()=>bH,exitAlternativeScreen:()=>TH,iTerm:()=>iO,image:()=>RH,link:()=>NH,scrollDown:()=>wH,scrollUp:()=>xH,setCwd:()=>OH,synchronizedOutput:()=>CH});import Zu from"node:process";import tH from"node:os";var Bu=globalThis.window?.document!==void 0,ave=globalThis.process?.versions?.node!==void 0,sve=globalThis.process?.versions?.bun!==void 0,uve=globalThis.Deno?.version?.deno!==void 0,cve=globalThis.process?.versions?.electron!==void 0,lve=globalThis.navigator?.userAgent?.includes("jsdom")===!0,dve=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,pve=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,fve=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,mve=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,wd=globalThis.navigator?.userAgentData?.platform,hve=wd==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",gve=wd==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",vve=wd==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",yve=wd==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),Ave=wd==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var Be="\x1B[",Gu="\x1B]",Wa="\x07",Sd=";",X3=!Bu&&Zu.env.TERM_PROGRAM==="Apple_Terminal",rH=!Bu&&Zu.platform==="win32",nH=!Bu&&(Zu.env.TERM?.startsWith("screen")||Zu.env.TERM?.startsWith("tmux")||Zu.env.TMUX!==void 0),B_=Bu?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:Zu.cwd,Vu=e=>nH?"\x1BPtmux;"+e.replaceAll("\x1B","\x1B\x1B")+"\x1B\\":e,oH=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?Be+(e+1)+"G":Be+(t+1)+Sd+(e+1)+"H"},iH=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=Be+-e+"D":e>0&&(r+=Be+e+"C"),t<0?r+=Be+-t+"A":t>0&&(r+=Be+t+"B"),r},eO=(e=1)=>Be+e+"A",aH=(e=1)=>Be+e+"B",sH=(e=1)=>Be+e+"C",uH=(e=1)=>Be+e+"D",tO=Be+"G",cH=X3?"\x1B7":Be+"s",lH=X3?"\x1B8":Be+"u",dH=Be+"6n",pH=Be+"E",fH=Be+"F",mH=Be+"?25l",hH=Be+"?25h",gH=e=>{let t="";for(let r=0;r<e;r++)t+=rO+(r<e-1?eO():"");return e&&(t+=tO),t},vH=Be+"K",yH=Be+"1K",rO=Be+"2K",AH=Be+"J",bH=Be+"1J",qg=Be+"2J",xH=Be+"S",wH=Be+"T",SH="\x1Bc",_H=`${qg}${Be}H`,IH=()=>{if(Bu||!rH)return!1;let e=tH.release().split("."),t=Number(e[0]),r=Number(e[2]??0);return t<10||t===10&&r<10586},EH=IH()?`${qg}${Be}0f`:`${qg}${Be}3J${Be}H`,kH=Be+"?1049h",TH=Be+"?1049l",nO=Be+"?2026h",oO=Be+"?2026l",CH=e=>nO+e+oO,$H=Wa,NH=(e,t)=>{let r=Vu(`${Gu}8${Sd}${Sd}${t}${Wa}`),o=Vu(`${Gu}8${Sd}${Sd}${Wa}`);return r+e+o},RH=(e,t={})=>{let r=`${Gu}1337;File=inline=1`;t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0");let o=Buffer.from(e);return Vu(r+`;size=${o.byteLength}:`+o.toString("base64")+Wa)},iO={setCwd:(e=B_())=>Vu(`${Gu}50;CurrentDir=${e}${Wa}`),annotation(e,t={}){let r=`${Gu}1337;`,o=t.x!==void 0,n=t.y!==void 0;if((o||n)&&!(o&&n&&t.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(o?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,Vu(r+Wa)}},aO={setCwd:(e=B_())=>Vu(`${Gu}9;9;${e}${Wa}`)},OH=(e=B_())=>iO.setCwd(e)+aO.setCwd(e);var sO=(e,t)=>{let r=Yi(),o=t?.trim();if(!o){if(Object.keys(r).length===0)return{output:`no aliases set
164
- usage: /alias <shortcut> <command>`};let s=["aliases:"];for(let[c,l]of Object.entries(r))s.push(` /${c} \u2192 /${l}`);return s.push(`
165
- /alias <shortcut> <command> to add`),s.push("/alias -d <shortcut> to remove"),{output:s.join(`
166
- `)}}if(o.startsWith("-d ")){let s=o.slice(3).trim();return N3(s)?{output:`removed /${s}`}:{output:`alias /${s} not found`}}let n=o.split(/\s+/);if(n.length<2)return{output:"usage: /alias <shortcut> <command>"};let i=n[0].replace(/^\//,""),a=n[1].replace(/^\//,"");return $3(i,a),{output:`/${i} \u2192 /${a}`}};K_();fi();var dO=e=>({chat:pi(e.model),tokens:0,cost:0,clearHistory:!0,clearScreen:!0});fi();import{execSync as DH}from"node:child_process";import*as qa from"node:fs";import*as Ed from"node:path";xr();Di();function pO(e,t){if(!qa.existsSync(e))return null;try{let r=qa.readFileSync(e,"utf-8").trim();if(r)return{path:e,content:r,type:t}}catch(r){Nt(r)}return null}function Xg(e){let t=[],r=e||process.cwd(),o=pO(kn,"global");o&&t.push(o);let n=pO(Ed.join(r,"AGENTS.md"),"project");return n&&t.push(n),t}function fO(e){if(e.length===0)return"";let t=[];for(let r of e){let o=r.type==="global"?"global-rules":"project-rules";t.push(`<${o}>
167
- ${r.content}
168
- </${o}>`)}return t.join(`
169
-
170
- `)}var Qg=500;function PH(e){try{return DH("git ls-files",{cwd:e,encoding:"utf-8",timeout:3e3,stdio:["pipe","pipe","pipe"]}).trim().split(`
171
- `).filter(Boolean)}catch{return null}}function mO(e,t,r,o){if(r.length>=o)return;let n=new Set(["node_modules",".git","dist","build",".next","coverage",".cache","__pycache__",".venv","venv"]),i;try{i=qa.readdirSync(e,{withFileTypes:!0})}catch{return}for(let a of i){if(r.length>=o)return;if(a.name.startsWith(".")||n.has(a.name))continue;let s=Ed.join(e,a.name);a.isDirectory()?mO(s,t,r,o):r.push(Ed.relative(t,s))}}function hO(e){let t=e||process.cwd(),r=PH(t);if(!r||r.length===0){let i=[];mO(t,t,i,Qg+100),r=i}if(r.length===0)return"";let o=new Set(r.filter(i=>i.includes("/")).map(i=>i.split("/")[0]));try{let i=qa.readdirSync(t,{withFileTypes:!0});for(let a of i)a.isDirectory()&&!a.name.startsWith(".")&&!o.has(a.name)&&r.push(`${a.name}/`)}catch{}if(r.length<=Qg)return r.join(`
172
- `);let n=r.slice(0,Qg);return n.push(`... and ${r.length-Qg} more files`),n.join(`
173
- `)}var Yg=new Map;async function e0(e){if(Yg.has(e))return Yg.get(e)?.context_window||128e3;try{let t=await fetch(`${Xi}/v1/models`,{signal:AbortSignal.timeout(3e3)}),{data:r}=await t.json();for(let o of r)Yg.set(o.id,o);return Yg.get(e)?.context_window||128e3}catch{return 128e3}}var MH=.75;function gO(e,t){return e>t*MH}async function t0(e){if(e.length<2)return"";let t=e.map(r=>r.role==="user"?`User: ${typeof r.content=="string"?r.content:JSON.stringify(r.content)}`:r.role==="assistant"?`Assistant: ${Array.isArray(r.content)?r.content.filter(n=>n.type==="text").map(n=>n.text).join(""):String(r.content)}`:r.role==="tool"?`Tool result: ${typeof r.content=="string"?r.content:JSON.stringify(r.content)}`:"").filter(Boolean).join(`
174
-
175
- `);try{return(await z$({model:"google/gemini-2.5-flash-lite",system:`Summarize this session. Extract and preserve:
176
- - Files read, created, or modified
177
- - Key decisions and their reasoning
178
- - Problems encountered and solutions
179
- - Current state of the work
180
- - Important context for continuing
181
-
182
- Output plain text only. No markdown, no ** or ##, no formatting. Use simple dashes for lists. Be thorough but concise.`,prompt:t,headers:zn})).text}catch(r){return Nt(r),""}}var vO=async e=>{if(!e.chat)return{output:"no active chat"};if(e.history.length<3)return{output:"not enough history to compress"};let t=await t0(e.history);if(!t)return{output:"compression failed"};e.history.length=0;let r=Math.round(t.length/4);return e.chat.summary=t,e.chat.messages=[],e.chat.tokens=r,jr(e.chat),{output:`compressed to ~${r.toLocaleString()} tokens
183
- type /summary to view`,tokens:r,cost:e.cost,summary:t}};import{spawn as Q_}from"node:child_process";function jH(e){return new Promise(t=>{let r=process.platform==="darwin"?Q_("pbcopy"):process.platform==="win32"?Q_("clip"):Q_("xclip",["-selection","clipboard"]);r.stdin?.write(e),r.stdin?.end(),r.on("close",o=>t(o===0)),r.on("error",()=>t(!1))})}var yO=async e=>{if(!e.chat||e.chat.messages.length===0)return{output:"no messages to copy"};let t=[...e.chat.messages].reverse().find(o=>o.role==="assistant");return t?{output:await jH(t.content)?"copied to clipboard":"failed to copy"}:{output:"no assistant response to copy"}};var AO={chat:`/chat
184
- /chat list saved chats
185
- /chat <n> load chat by number
186
- /chat <search> search and load chat
187
- /chat new start new chat
188
- /chat delete delete current chat
189
- /chat delete all delete all chats`,clear:`/clear
190
- clears current chat history without deleting it`,copy:`/copy
191
- copies last AI response to clipboard`,rollback:`/rollback
192
- /rollback list recent file changes
193
- /rollback <n> undo change by number`,compress:`/compress
194
- compresses chat history to save context space
195
- auto-triggers at 75% context usage`,usage:`/usage
196
- shows chat stats, context window usage, and cost
197
- also shows loaded rules files`,processes:`/processes
198
- /processes list background processes (with URLs and exit status)
199
- /processes <pid> kill process by id
200
- /processes logs show recent output from last process
201
- /processes logs <pid> show recent output from specific process
202
- /processes killall kill all running, clear exited
203
- /processes clear remove exited processes from list`,memory:`/memory
204
- /memory list saved memories
205
- /memory clear clear all memories
206
- use "remember X" to save facts`,settings:`/settings
207
- /settings show all settings
208
- /settings model <name> default model
209
- /settings spacing <0-4> line spacing
210
- /settings markdown on|off render markdown
211
- /settings search parallel|perplexity`,skills:`/skills
212
- /skills list installed skills
213
- /skills add <url> install skill
214
- /skills remove <n> uninstall skill
215
- /skills show <n> view skill content
216
- /skills create <n> create new skill
217
- /skills path show skills directory`,rules:`/rules
218
- /rules show global rules
219
- /rules edit open in editor
220
- /rules clear remove rules
221
- /rules path show rules file path`,model:`/model
222
- /model interactive model selector
223
- /model <search> search and switch model`,alias:`/alias
224
- /alias list aliases
225
- /alias <name> <cmd> create alias
226
- /alias remove <name> remove alias`,mcp:`/mcp
227
- /mcp list mcp servers
228
- /mcp add <name> <type> <target>
229
- add server (stdio|http|sse)
230
- /mcp remove <name> remove server
231
- /mcp reload reconnect all servers
232
- /mcp get <name> show server config`,permissions:`/permissions
233
- /permissions list permission rules
234
- /permissions remove <n> remove rule by index
235
- /permissions clear clear all rules
236
- use "always" on a confirm prompt to add one`,plan:`/plan
237
- toggles plan mode on/off
238
- when on, the agent outputs a step-by-step plan before executing
239
- you can approve or reject the plan before any changes are made
240
- also available via --plan flag at startup`,review:`/review
241
- /review show review status
242
- /review on enable auto-review after changes
243
- /review off disable auto-review
244
- a separate review agent checks all file changes for
245
- severe/high-priority bugs and fixes them automatically`,info:`/info
246
- shows version, current model, balance, storage, and feedback link`,print:`headless mode (ai -p)
247
- ai -p "message" full agent, output to stdout
248
- ai -p --json "message" structured JSON output
249
- ai -p --force "message" auto-approve all tool actions
250
- ai -p --no-save "message" don't save chat history
251
- ai -p --plan "message" plan mode (read-only tools)
252
- ai -p -r <id> "message" resume a previous session
253
- ai -p --timeout 60 "msg" abort after N seconds
254
- ai -p -q "message" suppress stderr status output
255
- git diff | ai -p "review" pipe input + headless
256
-
257
- --system works in both headless and interactive mode:
258
- ai --system "..." "msg" append custom system prompt
259
- ai --system "..." -p "msg" also works in headless`},bO=(e,t)=>{let r=t?.trim().toLowerCase();if(r&&AO[r])return{output:AO[r]};if(r)return{output:`no help for: ${r}`};let o=["commands:"," /chat chats"," /clear clear chat"," /copy copy response"," /rollback undo changes"," /compress compress history"," /usage stats"," /processes processes"," /memory memories"," /skills skills"," /rules rules"," /mcp mcp servers"," /settings settings"," /permissions permissions rules"," /plan plan before executing"," /review review loop"," /model model"," /alias shortcuts"," /info info"," exit quit","","headless mode:"," ai -p run with full agent, output to stdout","","ctrl+v to paste images","/help <cmd> for details"],n=Yi(),i=Object.keys(n);if(i.length>0){o.push(""),o.push("aliases:");for(let a of i)o.push(` /${a} \u2192 /${n[a]}`)}return{output:o.join(`
260
- `)}};fi();import*as ta from"node:fs";import*as wO from"node:path";xr();function xO(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function SO(e){if(!ta.existsSync(e))return 0;let t=0,r=ta.readdirSync(e,{withFileTypes:!0});for(let o of r){let n=wO.join(e,o.name);o.isDirectory()?t+=SO(n):t+=ta.statSync(n).size}return t}var Y_=async e=>{let t=ta.existsSync(to)?ta.statSync(to).size:0,r=SO(Pi),o=vo().length,n="...";try{let s=await fetch(`${Xi}/v1/credits`,{headers:{Authorization:`Bearer ${hd()}`}});if(s.ok){let c=await s.json();n=`$${Number.parseFloat(c.balance).toFixed(2)}`}}catch{}return{output:[`ai v${e.version}`,`model: ${e.model}`,`balance: ${n}`,"","storage:",` config: ${xO(t)}`,` chats: ${xO(r)} (${o} chats)`,"","feedback: \x1B]8;;https://x.com/nishimiya\x07x.com/nishimiya\x1B]8;;\x07"].join(`
261
- `)}};var _O=()=>({output:'run "ai init" from command line to setup api key'});var IO=async(e,t="")=>{let r=t.split(" ").filter(Boolean),o=r[0]?.toLowerCase();if(!o||o==="list")return ZN().length===0?{output:"no mcp servers configured"}:{output:fm().map(s=>`${s.connected?"\u25CF":"\u25CB"} ${s.name}`).join(`
262
- `)};if(o==="add"){let n=r[1],i=r[2],a=r[3];if(!n||!i||!a)return{output:"usage: /mcp add <name> <stdio|http|sse> <command|url> [args...]"};let s;if(i==="stdio"){let c=r.slice(4);s={type:"stdio",command:a,args:c}}else if(i==="http"||i==="sse")s={type:i,url:a};else return{output:"transport must be stdio, http, or sse"};return zN(n,s),Bg(),await mm(),{output:`added ${n}`}}if(o==="remove"||o==="rm"){let n=r[1];return n?BN(n)?(Bg(),await mm(),{output:`removed ${n}`}):{output:`server ${n} not found`}:{output:"usage: /mcp remove <name>"}}if(o==="reload")return Bg(),await mm(),{output:"reloaded mcp servers"};if(o==="get"){let n=r[1];if(!n)return{output:"usage: /mcp get <name>"};let a=dl()[n];return a?{output:JSON.stringify(a,null,2)}:{output:`server ${n} not found`}}return{output:"commands: list, add, remove, reload, get"}};xr();import*as Ja from"node:fs";function UH(){Cg();try{if(Ja.existsSync(br)){let e=JSON.parse(Ja.readFileSync(br,"utf-8"));return Array.isArray(e)?e:[]}}catch{}return[]}var EO=(e,t)=>{if(t?.trim().toLowerCase()==="clear")return Ja.existsSync(br)?(Ja.unlinkSync(br),{output:"memories cleared"}):{output:"no memories to clear"};let o=UH();if(o.length===0)return{output:`no saved memories
263
- say "remember X" to save facts`};let n=[`memories (${o.length}):`];for(let i of o)n.push(` - ${i}`);return n.push(`
264
- use /memory clear to delete all`),{output:n.join(`
265
- `)}};var kO=async(e,t)=>{let r=t?.trim().toLowerCase();if(!r)return{};let o;try{o=await Va()}catch{return{output:"failed to fetch models"}}let n=o.map(a=>({model:a,score:vd(a.id,r)})).filter(a=>a.score>0).sort((a,s)=>s.score-a.score).slice(0,10);if(n.length===0)return{output:`no models matching "${r}"`};if(n.length===1){let a=n[0].model.id;return Pg(a),{model:a,output:`switched to ${a}`}}let i=[`models matching "${r}":`];for(let{model:a}of n){let s=a.id===e.model?"\u203A ":" ";i.push(`${s}${a.id}`)}return i.push(""),i.push(`current: ${e.model}`),i.push("/model <name> to switch"),{output:i.join(`
266
- `)}};var TO=(e,t)=>{if(!t||t==="list"){let r=n4();return r.length===0?{output:`no permission rules
267
- use "always" on a confirm prompt to add one`}:{output:r.map((n,i)=>{let a=process.env.HOME||"",s=a&&(n.directory===a||n.directory.startsWith(`${a}/`))?`~${n.directory.slice(a.length)}`:n.directory;return n.tool==="runCommand"&&n.command?`${i}: allow "${n.command}" in ${s}`:`${i}: allow ${n.tool} in ${s}`}).join(`
268
- `)}}if(t==="clear")return r4(),{output:"all permission rules cleared"};if(t.startsWith("remove ")){let r=Number.parseInt(t.slice(7).trim(),10);return Number.isNaN(r)?{output:"use: /permissions remove <index>"}:t4(r)?{output:`rule ${r} removed`}:{output:`invalid index: ${r}`}}return{output:"use: /permissions [list|remove <index>|clear]"}};var CO=()=>({planMode:!0});function $O(e){let t=Math.floor(e/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:`${Math.floor(t/3600)}h`}var NO=(e,t)=>{let r=Eg(),o=t?.trim().toLowerCase();if(o==="clear")return I_(),{output:"cleared exited processes"};if(r.length===0)return{output:"no background processes"};if(o==="kill"||o==="killall"){let a=kg();for(let c of a)dd(c.pid);I_();let s=a.length;return{output:s>0?`killed ${s} process(es)`:"no running processes to kill"}}if(o==="logs"||o?.startsWith("logs ")){let a=o.slice(4).trim(),s=r[r.length-1];if(a){let l=Number.parseInt(a,10);if(!Number.isNaN(l)){let d=r.find(f=>f.pid===l);if(!d)return{output:`process ${l} not found`};s=d}}let c=za(s.pid,20);return c.length===0?{output:`no output from process ${s.pid}`}:{output:`logs for ${s.pid} (${s.command}):
269
- ${c.join(`
270
- `)}`}}let n=Number.parseInt(o||"",10);if(!Number.isNaN(n)){let a=r.find(s=>s.pid===n);return a?Ou(a)?(dd(a.pid),{output:`killed process ${n}`}):{output:`process ${n} already exited`}:{output:`process ${n} not found`}}let i=["background processes:"];for(let a of r){if(Ou(a)){let s=$O(Date.now()-a.startedAt);i.push(` ${a.pid} ${a.command} (${s})`)}else{let s=$O(Date.now()-(a.exitedAt??Date.now()));i.push(` ${a.pid} ${a.command} (exited ${a.exitCode}, ${s} ago)`)}for(let s of a.urls)i.push(` ${s}`)}return{output:i.join(`
271
- `)}};var RO=(e,t)=>{let r=t?.trim().toLowerCase();if(r==="on")return R_(!0),{output:"review loop enabled"};if(r==="off")return R_(!1),{output:"review loop disabled"};let o=Uu(),n=Lu();return{output:`review: ${o?"on":"off"}, max ${n} iterations
272
- use /review on or /review off to toggle`}};var OO=(e,t)=>{if(!g4())return{output:"no changes to rollback"};let r=t?.trim();if(!r){let i=b4(),a=["recent changes:"];for(let s of i.slice(0,10))a.push(` ${s.index}. ${s.action} ${s.file} (${s.time})`);return i.length>10&&a.push(` ... and ${i.length-10} more`),a.push(`
273
- /rollback <n> to undo to that point`),a.push("/rollback 1 to undo last change"),{output:a.join(`
274
- `)}}let o=parseInt(r,10);if(Number.isNaN(o)||o<1)return{output:"usage: /rollback <number>"};if(o===1){let i=v4(),a=A4(),s=a>0?` (${a} more)`:"";return{output:i.success?`${i.message}${s}`:`failed: ${i.message}`}}let n=x4(o);return{output:n.success?n.message:`failed: ${n.message}`}};xr();import{spawnSync as LH}from"node:child_process";import*as yo from"node:fs";var DO=(e,t)=>{if(nr(),!t||t==="show")return yo.existsSync(kn)?{output:`~/.ai-cli/AGENTS.md:
275
-
276
- ${yo.readFileSync(kn,"utf-8")}`}:{output:`no global rules
277
- use: /rules edit`};if(t==="edit"){let r=process.env.EDITOR||"nano";return yo.existsSync(kn)||yo.writeFileSync(kn,`# Global Rules
278
-
279
- `,"utf-8"),LH(r,[kn],{stdio:"inherit"}),{output:"rules updated"}}return t==="clear"?(yo.existsSync(kn)&&yo.unlinkSync(kn),{output:"rules cleared"}):t==="path"?{output:kn}:{output:"use: /rules [show|edit|clear|path]"}};var PO=(e,t)=>{let r=N_();if(!t)return{output:`settings:
280
- model: ${r.model||"(default)"}
281
- search: ${r.search||"perplexity"}
282
- spacing: ${r.spacing}
283
- markdown: ${r.markdown?"on":"off"}
284
-
285
- usage:
286
- /settings model <name>
287
- /settings search perplexity|parallel
288
- /settings spacing <0-4>
289
- /settings markdown on|off
290
-
291
- for rules: /rules`};let o=t.split(" "),n=o[0],i=o.slice(1).join(" ");if(n==="model")return i?(ju("model",i),{output:`default model set to ${i}`}):{output:"use: /settings model <name>"};if(n==="search")return i==="perplexity"||i==="parallel"?(ju("search",i),{output:`search provider set to ${i}`}):{output:"use: /settings search perplexity|parallel"};if(n==="spacing"){let a=parseInt(i,10);return Number.isNaN(a)||a<0||a>4?{output:"use: /settings spacing <0-4>"}:(ju("spacing",a),{output:`spacing set to ${a}`})}return n==="markdown"?i==="on"||i==="true"?(ju("markdown",!0),{output:"markdown enabled"}):i==="off"||i==="false"?(ju("markdown",!1),{output:"markdown disabled"}):{output:"use: /settings markdown on|off"}:n==="rules"?{output:"use /rules command instead"}:{output:"unknown setting"}};xr();import{spawnSync as zH}from"node:child_process";import*as Gt from"node:fs";import*as Ao from"node:path";xr();import*as Zn from"node:fs";import*as Ka from"node:path";function FH(e){let t=e.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);if(!t)return{frontmatter:{},body:e};let r=t[1],o=t[2].trim(),n={};for(let i of r.split(`
292
- `)){let a=i.indexOf(":");if(a===-1)continue;let s=i.slice(0,a).trim(),c=i.slice(a+1).trim();if(c.startsWith("[")&&c.endsWith("]")){let l=c.slice(1,-1).split(",").map(d=>d.trim());s==="allowed-tools"&&(n["allowed-tools"]=l)}else s==="name"&&(n.name=c),s==="description"&&(n.description=c)}return{frontmatter:n,body:o}}function MO(e){let t=Ka.join(e,"SKILL.md");if(!Zn.existsSync(t))return null;try{let r=Zn.readFileSync(t,"utf-8"),{frontmatter:o,body:n}=FH(r),i=o.name||Ka.basename(e),a=o.description||"";return{name:i,description:a,allowedTools:o["allowed-tools"],content:n,path:e}}catch{return null}}function jO(){cl();let e=[];try{let t=Zn.readdirSync(Nr,{withFileTypes:!0});for(let r of t){if(!r.isDirectory())continue;let o=MO(Ka.join(Nr,r.name));o&&e.push(o)}}catch{}return e}function UO(e,t){let r=e.toLowerCase();return t.filter(o=>o.description?o.description.toLowerCase().split(/\s+/).some(i=>i.length>3&&r.includes(i)):!1)}function r0(e){let t=Ka.join(Nr,e);return Zn.existsSync(t)?MO(t):null}function LO(){cl();try{return Zn.readdirSync(Nr,{withFileTypes:!0}).filter(t=>t.isDirectory()).map(t=>t.name)}catch{return[]}}function FO(e){let t=Ka.join(Nr,e);if(!Zn.existsSync(t))return!1;try{return Zn.rmSync(t,{recursive:!0}),!0}catch{return!1}}function BH(e){let t=e.match(/github\.com\/([^/]+\/[^/]+)(?:\/tree\/[^/]+\/(.+))?/);if(t){let o=t[1].replace(/\.git$/,""),n=t[2]||"",i=n?Ao.basename(n):o.split("/")[1];return{repo:o,subpath:n,name:i}}let r=e.match(/^([^/]+\/[^/]+)(?:\/(.+))?$/);if(r&&!e.startsWith("/")&&!e.includes(":")){let o=r[1],n=r[2]||"",i=n?Ao.basename(n):o.split("/")[1];return{repo:o,subpath:n,name:i}}return null}function zO(e){return!!(/^@[a-z0-9-]+\/[a-z0-9._-]+$/i.test(e)||/^[a-z0-9._-]+$/i.test(e)&&!e.startsWith("/")&&!e.startsWith("."))}async function ZH(e){try{let t=await fetch(`https://registry.npmjs.org/${e}`,{signal:AbortSignal.timeout(1e4)});if(!t.ok)return null;let r=await t.json(),n=(typeof r.repository=="string"?r.repository:r.repository?.url||"").match(/github\.com[/:]([^/]+\/[^/]+?)(?:\.git)?$/);if(n){let a=n[1],s=e.startsWith("@")?e.split("/")[1]:e;return{repo:a,name:s}}let i=typeof r.repository=="string"?r.repository.match(/^([^/]+\/[^/]+)$/):null;if(i){let a=e.startsWith("@")?e.split("/")[1]:e;return{repo:i[1],name:a}}return null}catch{return null}}async function GH(e,t){let r={},o=process.env.GITHUB_TOKEN;o&&(r.Authorization=`token ${o}`);let n={headers:r,signal:AbortSignal.timeout(1e4)};try{if((await fetch(`https://api.github.com/repos/${e}/contents/SKILL.md`,n)).ok)return""}catch{}try{if((await fetch(`https://api.github.com/repos/${e}/contents/skills/${t}/SKILL.md`,n)).ok)return`skills/${t}`}catch{}try{let i=await fetch(`https://api.github.com/repos/${e}/contents/skills`,n);if(i.ok){let a=await i.json();for(let s of a)if(s.type==="dir")try{if((await fetch(`https://api.github.com/repos/${e}/contents/${s.path}/SKILL.md`,n)).ok)return s.path}catch{}}}catch{}return null}async function n0(e,t,r,o=!0){let n={},i=process.env.GITHUB_TOKEN;i&&(n.Authorization=`token ${i}`);let a=`https://api.github.com/repos/${e}/contents/${t}`,s=await fetch(a,{headers:n,signal:AbortSignal.timeout(15e3)});if(!s.ok)throw new Error(`github api failed (${s.status})`);let c=await s.json();Gt.mkdirSync(r,{recursive:!0});for(let l of c){let d=Ao.join(r,l.name);if(l.type==="file"&&l.download_url){let p=await(await fetch(l.download_url,{signal:AbortSignal.timeout(3e4)})).text();Gt.writeFileSync(d,p)}else l.type==="dir"&&o&&await n0(e,l.path,d,o)}}var BO=async(e,t)=>{if(cl(),!t||t==="list"){let i=LO();return i.length===0?{output:`no skills installed
293
- use: /skills add <git-url>`}:{output:`skills:
294
- ${i.map(s=>{let c=r0(s),l=c?.description?` - ${c.description}`:"";return` ${s}${l}`}).join(`
295
- `)}`}}let r=t.split(" "),o=r[0],n=r.slice(1).join(" ");if(o==="add"&&n){let i=BH(n);if(!i&&zO(n)){let c=await ZH(n);c&&(i={repo:c.repo,subpath:"",name:c.name})}let a=i?.name||Ao.basename(n,".git").replace(/^skill-/,""),s=Ao.join(Nr,a);if(Gt.existsSync(s))return{output:`skill "${a}" already exists`};try{if(i?.subpath)await n0(i.repo,i.subpath,s);else if(i){let l=await GH(i.repo,i.name);if(l===null)return{output:"no SKILL.md found in repository"};l!==""?await n0(i.repo,l,s):await n0(i.repo,"",s,!1)}else if(n.startsWith("http")){let l=zH("git",["clone","--depth","1",n,s],{stdio:"pipe"});if(l.status!==0)throw new Error(l.stderr?.toString().trim()||"git clone failed");let d=Ao.join(s,".git");Gt.existsSync(d)&&Gt.rmSync(d,{recursive:!0})}else if(Gt.existsSync(n))Gt.cpSync(n,s,{recursive:!0});else return zO(n)?{output:`package "${n}" not found on npm or has no github repo`}:{output:"invalid path or url"};return r0(a)?{output:`added skill: ${a}`}:(Gt.rmSync(s,{recursive:!0}),{output:"no SKILL.md found"})}catch(c){return Gt.existsSync(s)&&Gt.rmSync(s,{recursive:!0}),{output:`failed: ${c instanceof Error?c.message:"unknown"}`}}}if(o==="remove"&&n)return FO(n)?{output:`removed: ${n}`}:{output:`skill "${n}" not found`};if(o==="show"&&n){let i=r0(n);return i?{output:`${i.name}
296
- ${i.description}
297
-
298
- ${i.content}`}:{output:`skill "${n}" not found`}}if(o==="path")return{output:Nr};if(o==="create"&&n){let i=Ao.join(Nr,n);if(Gt.existsSync(i))return{output:`skill "${n}" already exists`};Gt.mkdirSync(i,{recursive:!0});let a=`---
299
- name: ${n}
300
- description: Describe when this skill should activate
301
- allowed-tools: [Bash, Read, Write]
302
- ---
303
-
304
- # ${n}
305
-
306
- Instructions for this skill...
307
- `;return Gt.writeFileSync(Ao.join(i,"SKILL.md"),a),{output:`created: ${i}/SKILL.md`}}return{output:"use: /skills [list|add|remove|show|create|path] <name>"}};var ZO=e=>{let t=e.chat?.summary;return t?{output:`--- session summary ---
308
- ${t}
309
- --- end summary ---`}:{output:"no summary. use /compress first"}};function VH(e){return e===0?"$0.0000":e>0&&e<1e-4?"<$0.0001":`$${e.toFixed(4)}`}function kd(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var X_=async e=>{let t=[];if(e.chat){let n=e.chat.messages.filter(a=>a.role==="user").length,i=e.chat.messages.filter(a=>a.role==="assistant").length;t.push(`chat: ${e.chat.title}`),t.push(`messages: ${n} user / ${i} assistant`)}try{let n=await e0(e.model),i=Math.round(e.tokens/n*100),a="\u2588".repeat(Math.floor(i/5))+"\u2591".repeat(20-Math.floor(i/5));t.push(`context: ${e.tokens.toLocaleString()} / ${n.toLocaleString()} [${a}] ${i}%`)}catch{t.push(`tokens: ~${e.tokens.toLocaleString()}`)}let r=e.tokenUsage;(r.inputTokens>0||r.outputTokens>0)&&(t.push(""),t.push(`input: ${kd(r.inputTokens)}`),t.push(`output: ${kd(r.outputTokens)}`),r.cacheReadTokens>0&&t.push(`cached: ${kd(r.cacheReadTokens)}`),r.cacheWriteTokens>0&&t.push(`cache write: ${kd(r.cacheWriteTokens)}`),r.reasoningTokens>0&&t.push(`reasoning: ${kd(r.reasoningTokens)}`)),t.push(`cost: ${VH(e.cost)}`);let o=Xg();if(o.length>0){t.push(""),t.push("rules:");for(let n of o)t.push(` ${n.path}`)}return{output:t.join(`
310
- `)}};var GO=()=>({output:`debug ${qN()?"on":"off"}`});var e1={help:bO,model:kO,clear:dO,chat:J_,info:Y_,version:Y_,processes:NO,init:_O,compress:vO,summary:ZO,usage:X_,context:X_,memory:EO,rollback:OO,copy:yO,settings:PO,permissions:TO,plan:CO,review:RO,rules:DO,skills:BO,mcp:IO,alias:sO,xix:GO};function VO(e){return Yi()[e]||e}function t1(e){if(!e.startsWith("/"))return[[],e];let t=e.slice(1);return t.split(" ").length===1?[Object.keys(e1).filter(i=>!i.includes("-")).filter(i=>i.startsWith(t)).map(i=>`/${i}`),e]:[[],e]}fi();import*as s0 from"node:fs";import*as QO from"node:os";import*as n1 from"node:path";fi();Di();function ra(e,t){let r=`"${t}":"`,o=e.indexOf(r);if(o<0)return null;let n=o+r.length,i="",a=!1,s=!1;for(let c=n;c<e.length;c++){let l=e[c];if(a){switch(l){case"n":i+=`
311
- `;break;case"t":i+=" ";break;case'"':i+='"';break;case"\\":i+="\\";break;case"r":i+="\r";break;case"u":{let d=e.slice(c+1,c+5);d.length===4&&/^[0-9a-fA-F]{4}$/.test(d)?(i+=String.fromCharCode(parseInt(d,16)),c+=4):i+="u";break}default:i+=l}a=!1}else if(l==="\\")a=!0;else if(l==='"'){s=!0;break}else i+=l}return{value:i,complete:s}}import*as HO from"node:os";function WO(e,t,r,o){let n=process.cwd(),i=HO.platform(),a=new Date().toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"}),s=Xg(),c=fO(s),l=jO(),d=r?UO(r,l):[],p=`You are ai-cli, a minimal terminal AI assistant.
312
-
313
- About ai-cli:
314
- - Created by nishimiya (x.com/nishimiya)
315
- - Built with Vercel AI SDK and AI Gateway
316
- - Supports multiple AI providers through gateway routing
317
-
318
- Tool usage:
319
- - BE PROACTIVE: If you can answer with a tool, USE IT immediately
320
- - Never say "I can't" or "I don't have access" if a tool can help
321
- - "what time is it?" -> run \`date\` command
322
- - "what's the weather?" -> use weather tool
323
- - For search tools (perplexity_search, parallel_search): ALWAYS summarize the results in your response
324
- - For fetchUrl: ALWAYS summarize the fetched content in your response
325
- - If a tool call is denied by the user, do NOT retry it or attempt workarounds
326
- - When the user mentions a name that matches a file or directory in <project-files>, treat it as that file/directory. Check <project-files> BEFORE interpreting names semantically.
327
-
328
- Finding files (IMPORTANT - follow this order):
329
- 1. Check <project-files> FIRST. It lists every file in the project. Use it to locate files by path, then readFile or editFile directly.
330
- 2. Need to find code by content? Use searchInFiles (e.g. "export const metadata").
331
- 3. Need to find files by name pattern? Use findFiles (e.g. "*.tsx", "layout.*").
332
- 4. Need a code overview? Use codeOutline to see exports and function signatures without reading entire files.
333
- 5. ONLY use listDirectory if project-files was truncated and you need to explore a collapsed directory.
334
-
335
- Output rules (CRITICAL - MUST FOLLOW):
336
- - NEVER use markdown: no **bold**, no *italic*, no # headers, no \`backticks\`, no bullet points with -
337
- - Plain text only, no formatting whatsoever
338
- - No emojis ever
339
- - Be concise, minimal responses
340
- - After file/memory tools only, output NOTHING (but search/fetch tools MUST have a response)
341
-
342
- Environment:
343
- - Directory: ${n}
344
- - Platform: ${i}
345
- - Date: ${a}
346
- - Package manager: ${e.pm} (ALWAYS use "${e.pm}" for install/add/remove, "${e.run}" to run scripts \u2014 NEVER use npm unless it is the detected package manager)
347
- - If you clone a repo or cd into a subdirectory, CHECK its lock file (pnpm-lock.yaml, yarn.lock, bun.lockb, package-lock.json) and use THAT package manager for commands inside it, even if the parent directory uses something different.
348
-
349
- Editing files (IMPORTANT):
350
- - If editFile returns "text not found", do NOT retry with the same oldText. Read the file first to see the actual content.
351
- - Include 2-3 lines of surrounding context in oldText to ensure a unique match.
352
- - NEVER output HTML entities in tool arguments \u2014 use raw characters: & not &amp;, < not &lt;, > not &gt;
353
-
354
- Preferences:
355
- - Always use TypeScript unless told otherwise
356
- - For Next.js: use --ts flag, App Router, src directory
357
-
358
- Git commits:
359
- - One line only: "type: description" (feat, fix, docs, refactor, test, chore)
360
- - Lowercase, no period at end
361
- - NEVER co-author or mention AI/assistant/model
362
- - NEVER add "Generated by" or attribution lines
363
-
364
- Slash commands (tell user to type these):
365
- - /model <name> - switch model
366
- - /help - list all commands
367
- When user asks to switch models, tell them the slash command to type.`,m=hO(n);if(m&&(p+=`
368
-
369
- <project-files>
370
- ${m}
371
- </project-files>`),c&&(p+=`
372
-
373
- ${c}`),l.length>0){let y=l.map(E=>`- ${E.name}: ${E.description||"no description"}`).join(`
374
- `);p+=`
375
-
376
- Installed skills (use /skills to manage):
377
- ${y}`}if(d.length>0){let y=d.map(E=>`<skill name="${E.name}">
378
- ${E.content}
379
- </skill>`).join(`
380
-
381
- `);p+=`
382
-
383
- Active skills for this query:
384
- ${y}`}let g=fm().filter(y=>y.connected);if(g.length>0){let y=g.map(E=>`- ${E.name}`).join(`
385
- `);p+=`
386
-
387
- MCP servers connected (tools prefixed with server name):
388
- ${y}`}return t&&(p+=`
389
-
390
- Previous session context:
391
- ${t}`),o?.planMode&&(p+=`
392
-
393
- Plan mode is ACTIVE:
394
- - FIRST use read-only tools (readFile, searchInFiles, codeOutline, findFiles, listDirectory, semanticSearch) to understand the relevant code before planning
395
- - Read the key files related to the request so your plan is grounded in the actual codebase
396
- - THEN output a numbered plan of specific steps you would take
397
- - Do NOT make any changes \u2014 only describe what you would do
398
- - Be specific: mention exact files, functions, and changes
399
- - Keep it concise \u2014 one line per step
400
- - End with "ready to execute" so the user knows the plan is complete`),o?.appendSystem&&(p+=`
401
-
402
- ${o.appendSystem}`),p}var o0={readFile:"reading...",writeFile:"writing...",editFile:"editing...",deleteFile:"deleting...",copyFile:"copying...",renameFile:"renaming...",createFolder:"creating...",listDirectory:"listing...",findFiles:"searching...",searchInFiles:"searching...",codeOutline:"analyzing...",semanticSearch:"searching...",fileInfo:"checking...",runCommand:"running...",startProcess:"starting...",readProcessLogs:"waiting for output...",killProcess:"stopping...",memory:"remembering...",weather:"checking weather...",fetchUrl:"fetching...",perplexity_search:"searching...",parallel_search:"searching..."};function i0(){return({steps:e})=>!!(e.length>=3&&e.slice(-3).every(n=>{let i=n.toolResults;return!i||i.length===0?!1:i.every(a=>a.output?.error!=null)}))}var a0=null;function HH(e,t){if(!process.env.AI_SDK_DEBUG)return;if(!a0){let n=n1.join(QO.homedir(),".ai-sdk");s0.mkdirSync(n,{recursive:!0}),a0=s0.createWriteStream(n1.join(n,"stream.log"),{flags:"a"}),a0.write(`
403
- --- session ${new Date().toISOString()} ---
404
- `)}let r=new Date().toISOString(),o=t!==void 0?` ${JSON.stringify(t)}`:"";a0.write(`${r} ${e}${o}
405
- `)}function Td(e){return new Promise(t=>setTimeout(t,e))}var o1={anthropic:{cacheControl:{type:"ephemeral"}}};function i1(e){return e.startsWith("anthropic/")}function qO(e,t){return i1(t)?{role:"system",content:e,providerOptions:o1}:e}function WH(e,t){if(!i1(t)||e.length===0)return;let r=e[e.length-1];(r.role==="user"||r.role==="assistant")&&(r.providerOptions={...r.providerOptions,...o1})}function qH(e,t){if(!i1(t)||e.length===0)return;let r=e[e.length-1];if(r.providerOptions&&"anthropic"in r.providerOptions&&r.providerOptions.anthropic===o1.anthropic){let{anthropic:o,...n}=r.providerOptions;r.providerOptions=Object.keys(n).length>0?n:void 0}}function r1(e){return{inputTokens:e.inputTokens??0,outputTokens:e.outputTokens??0,cacheReadTokens:e.inputTokenDetails?.cacheReadTokens??0,cacheWriteTokens:e.inputTokenDetails?.cacheWriteTokens??0,reasoningTokens:e.outputTokenDetails?.reasoningTokens??0}}var JO=50,KO=0;async function Cd(e){let{model:t,message:r,history:o,tokens:n,summary:i,pm:a,callbacks:s}=e,c=e.chat??(e.save===!1?{id:Jg(),title:"New chat",messages:[],model:t,tokens:0,cost:0,createdAt:Date.now(),updatedAt:Date.now()}:W_(t));if(process.env.AI_CLI_TEST_SCENARIO==="spacing-running")return s.onBusy(!0),s.onStatus("thinking..."),s.onPending(""),await Td(40),s.onStatus("Running cd blog && npm install"),await Td(200),s.onStatus(""),s.onMessage("tool",`$ cd blog && npm install
406
- installed`),s.onBusy(!1),s.onStatus(""),c.messages.push({role:"user",content:r}),c;if(process.env.AI_CLI_TEST_SCENARIO==="spacing-leading-newlines"){s.onBusy(!0),s.onStatus("thinking..."),s.onPending(""),await Td(40),s.onStatus("");let C=`
407
-
408
-
409
- There is no node_modules directory visible in the project.`;return s.onPending(C),s.onRecord("assistant",C),s.onBusy(!1),s.onStatus(""),c.messages.push({role:"user",content:r}),c}if(process.env.AI_CLI_TEST_SCENARIO==="spacing-sequence")return s.onBusy(!0),s.onStatus("thinking..."),s.onPending(""),await Td(30),s.onStatus(""),KO===0?(s.onMessage("error","not found: blog/node_modules"),s.onMessage("assistant","No node_modules directory found in the blog folder.")):(s.onStatus("Running cd blog && npm install"),await Td(180),s.onStatus(""),s.onMessage("tool",`$ cd blog && npm install
410
- installed`)),KO+=1,s.onBusy(!1),s.onStatus(""),c.messages.push({role:"user",content:r}),c;Re(`input: ${r.slice(0,50)}${r.length>50?"...":""}`);let l=o.length;s.onBusy(!0),s.onStatus("thinking..."),s.onPending("");let d=await e0(t);if(gO(n,d)){s.onStatus("compressing...");let C=await t0(o);C&&(s.onSummary(C),o.length=0,s.onTokens(()=>Math.round(C.length/4)),c.summary=C,c.messages=[],c.tokens=Math.round(C.length/4),e.save!==!1&&jr(c),s.onMessage("info","context compressed"))}s.onStatus("thinking...");let f=WO(a,i,r,{planMode:e.planMode,appendSystem:e.appendSystem}),p=[{type:"text",text:r}];e.image&&p.unshift({type:"image",image:e.image.data,mimeType:e.image.mimeType}),o.push({role:"user",content:e.image?p:r});let m=e.hasTools!==!1,v=!1,g="",y="",E=0,I="",h="",N=!1,L=0,b=null,M="",P=null,Q=null;WH(o,t);let O=await(async()=>{try{let C=m?await q3():{},V=m?e.planMode?J3(C):Zg(C):void 0;return xa({model:t,system:qO(f,t),messages:o,tools:V,stopWhen:i0(),providerOptions:{openai:{reasoningEffort:"high",reasoningSummary:"detailed"}},headers:zn,abortSignal:e.abortSignal,onError:()=>{}})}catch(C){throw o.length=l,C}})();qH(o,t);let ne=()=>{y&&E&&(s.onReasoning(y,Date.now()-E),y="",E=0)};try{for await(let C of O.fullStream){let V=C.type;if(HH(V,C),V==="start-step"&&(g&&(s.onRecord("assistant",g),s.onPending(""),g=""),v=!1),!(v&&V!=="tool-call"&&V!=="tool-result"&&V!=="tool-error"&&V!=="tool-input-start"&&V!=="tool-input-delta"&&V!=="finish-step")){switch(V){case"error":{b=C.error??new Error("unknown error");break}case"tool-error":{Re(`tool error: ${JSON.stringify(C)}`);let Y=C;Y.error&&Nt(Y.error),N=!1,s.onStatus("thinking...");break}case"reasoning-delta":{let Y=C;Y.text&&(E||(E=Date.now()),y+=Y.text,s.onStatus(y.replace(/\s+/g," ").trim().slice(-80)));break}case"tool-input-start":{let Y=C;typeof Y.toolName=="string"&&Y.toolName==="editFile"&&s.onEditStream?(ne(),N=!0,h="",L=0,s.onStatus("Editing...")):(N=!1,typeof Y.toolName=="string"&&Y.toolName==="writeFile"&&(ne(),s.onStatus("Writing...")));break}case"tool-input-delta":{if(N&&s.onEditStream){let Y=C,J=typeof Y.delta=="string"?Y.delta:"";h+=J;let k=ra(h,"filePath");if(k){let re=ra(h,"oldText"),se=ra(h,"newText"),it=re?re.value.split(`
411
- `).slice(0,5):[],X=se?se.value.split(`
412
- `).slice(0,5):[],Ct=it.length+X.length;if(Ct>L){L=Ct;let cr=re?re.value.split(`
413
- `).length:0,Mt=se?se.value.split(`
414
- `).length:0,Kr=Math.max(cr,Mt)-5;s.onEditStream(k.value,it,X,Kr>0?Kr:0)}}}break}case"tool-call":{ne();let Y=C;Re(`tool-call: ${Y.toolName}`);let J=Y.input,k,re=N&&Y.toolName==="editFile";if(re&&(N=!1),Y.toolName==="listDirectory"){let se=J?.dirPath||".";k=`Listing ${se}`,I=`Listed ${se}`}else if(Y.toolName==="readFile"){let se=J?.filePath||"file";k=`Reading ${se}`,I=`Read ${se}`}else if(Y.toolName==="runCommand"&&J?.command)k=`Running ${J.command.slice(0,70)}`,I="";else if(Y.toolName==="writeFile")k=`Writing ${J?.filePath||"file"}`,I="";else if(Y.toolName==="editFile")k=`Editing ${J?.filePath||"file"}`,I="";else if(Y.toolName==="deleteFile")k="Deleting",I="";else if(Y.toolName==="copyFile")k="Copying file",I="";else if(Y.toolName==="renameFile")k="Renaming file",I="";else if(Y.toolName==="codeOutline"){let se=J?.filePath||"code";k=`Analyzing ${se}`,I=`Analyzed ${se}`}else if(Y.toolName==="searchInFiles"){let se=J?.query?String(J.query).slice(0,60):"code",it=J?.directory||"",X=it?`"${se}" in ${it}`:`"${se}"`;k=`Searching: ${X}`,I=`Searched: ${X}`}else if(Y.toolName==="semanticSearch"){let se=J?.query?String(J.query).slice(0,60):"code";k=`Searching: ${se}`,I=`Searched: ${se}`}else Y.toolName==="perplexity_search"&&J?.query?(k=`Searching: ${J.query.slice(0,60)}`,I=`Searched: ${J.query.slice(0,60)}`):Y.toolName==="parallel_search"&&J?.objective?(k=`Searching: ${J.objective.slice(0,60)}`,I=`Searched: ${J.objective.slice(0,60)}`):Y.toolName==="fetchUrl"?(k="Fetching URL",I="Fetched URL"):(k=o0[Y.toolName]??"Working",I="");re||s.onStatus(k);break}case"tool-result":{let Y=C;Re(`tool-result: ${Y.toolName}`);let J=Y.output;if(J?.tree&&typeof J.tree=="string"){let k=J.tree.split(`
415
- `),re=k[0]||".",se=k.slice(1).join(`
416
- `),it=I||`Listed ${re}`;s.onMessage("tool",`> ${it}
417
- ${se}`),v=!0}else if(J?.results&&Array.isArray(J.results))P=J.results;else if(J?.content&&typeof J.content=="string")Q=J.content;else if(J?.output&&typeof J.output=="string")!J.output.startsWith("$ ")&&I?s.onMessage("tool",`> ${I}
418
- ${J.output}`):s.onMessage("tool",J.output),v=!0;else if(J?.answer&&typeof J.answer=="string"){let k=I||"Result";s.onMessage("tool",`> ${k}
419
- ${J.answer}`),v=!0}else J?.message&&typeof J.message=="string"?(s.onMessage("info",J.message),v=J.silent===!0):J?.error&&typeof J.error=="string"?(s.onMessage("error",J.error),v=!1):J?.silent===!0&&(v=!0);v&&s.onStatus("");break}case"text-delta":{ne();let Y=C;s.onStatus(""),g+=Y.text,s.onPending(g);break}case"finish-step":{ne(),Re(`finish-step: ${C.finishReason}`),s.onStepFinish?.();break}case"finish":{M=C.finishReason??"";break}}if(b)break}}}catch(C){b=C instanceof Error?C:new Error(String(C))}if(ne(),s.onBusy(!1),s.onStatus(""),b)throw o.length=l,b;if(M==="tool-calls"&&!g&&s.onMessage("info","Stopped: agent appeared stuck (repeated errors). Try rephrasing or checking tool output."),g&&(v?s.onRecord("assistant",g):s.onMessage("assistant",g),s.onPending("")),v)return c.messages.push({role:"user",content:r}),c.messages.length===2&&c.title==="New chat"&&(c.title=r.slice(0,JO).trim()),Promise.resolve(O.response).then(C=>{for(let V of C.messages)(V.role==="assistant"||V.role==="tool")&&o.push(V)}).catch(C=>Re(`response resolve error: ${C}`)),Promise.resolve(O.usage).then(C=>{C?.totalTokens&&s.onTokens(V=>V+(C.totalTokens??0)),C&&s.onUsage(r1(C))}).catch(C=>Re(`usage resolve error: ${C}`)),Promise.resolve(O.providerMetadata).then(C=>{C?.gateway?.cost&&s.onCost(V=>V+(Number.parseFloat(C.gateway?.cost??"0")||0))}).catch(C=>Re(`metadata resolve error: ${C}`)),c;let we=await O.response.then(C=>C,C=>{throw o.length=l,C});if(!g&&(P||Q)){s.onStatus("thinking...");let C="";P&&P.length>0?C=`Search results:
420
- ${P.slice(0,5).map(se=>`- ${se.title??"untitled"}: ${se.snippet??se.excerpt??""} (${se.url??""})`).join(`
421
- `)}`:Q&&(C=`Fetched content:
422
- ${Q.slice(0,4e3)}`);let V=[...o,{role:"assistant",content:`I found this information:
423
-
424
- ${C}`},{role:"user",content:"Please summarize and explain what you found."}],Y=xa({model:t,system:qO(f,t),messages:V,stopWhen:tu(1),providerOptions:{openai:{reasoningEffort:"high",reasoningSummary:"detailed"}},headers:zn,abortSignal:e.abortSignal,onError:()=>{}}),J="";try{for await(let se of Y.fullStream)se.type==="text-delta"?(s.onStatus(""),J+=se.text,s.onPending(J)):se.type==="reasoning-delta"&&se.text&&s.onStatus(se.text.replace(/\s+/g," ").trim().slice(-80))}catch(se){Re(`continuation error: ${se}`)}s.onStatus(""),J&&(g=J,s.onMessage("assistant",J),s.onPending(""));let k=await Y.usage,re=await Y.providerMetadata;k?.totalTokens&&s.onTokens(se=>se+(k.totalTokens??0)),k&&s.onUsage(r1(k)),re?.gateway?.cost&&s.onCost(se=>se+(Number.parseFloat(re.gateway?.cost??"0")||0))}let ge=new Set,xe=new Set,Ie={};for(let C of we.messages)if(C.role==="assistant"&&Array.isArray(C.content))for(let V of C.content)V.type==="tool-call"&&V.toolCallId&&(ge.add(V.toolCallId),Ie[V.toolCallId]=V.toolName??V.toolCallId),V.type==="tool-result"&&V.toolCallId&&xe.add(V.toolCallId);else if(C.role==="tool"&&Array.isArray(C.content))for(let V of C.content)V.type==="tool-result"&&V.toolCallId&&xe.add(V.toolCallId);let K=[...ge].filter(C=>!xe.has(C));if(K.length>0){let C=K.map(V=>Ie[V]??V).join(", ");throw Re(`unpaired tools: ${C}`),o.length=l,new Error(`tool failed: ${C}`)}for(let C of we.messages)(C.role==="assistant"||C.role==="tool")&&o.push(C);c.messages.push({role:"user",content:r});let ae=await O.usage,ye=await O.providerMetadata;if(ae?.totalTokens&&s.onTokens(C=>C+(ae.totalTokens??0)),ae&&s.onUsage(r1(ae)),ye?.gateway?.cost&&s.onCost(C=>C+(Number.parseFloat(ye.gateway?.cost??"0")||0)),!v){let C="";for(let Y of we.messages)if(Y.role==="assistant"&&Array.isArray(Y.content))for(let J of Y.content)J.type==="text"&&J.text&&(C+=J.text);C&&!g&&s.onMessage("assistant",C);let V=g||C;V&&c.messages.push({role:"assistant",content:V})}if(c.messages.length===2&&c.title==="New chat"){let C=c.messages.find(V=>V.role==="user");C&&(c.title=C.content.slice(0,JO).trim())}return c}import{execSync as a1,spawnSync as JH}from"node:child_process";import*as bo from"node:fs";import*as u0 from"node:os";import*as YO from"node:path";function XO(){let e=u0.platform(),t=YO.join(u0.tmpdir(),`ai-cli-clipboard-${Date.now()}.png`);try{if(e==="darwin"){let r=`
425
- use framework "AppKit"
426
- set pb to current application's NSPasteboard's generalPasteboard()
427
- set imgData to pb's dataForType:(current application's NSPasteboardTypePNG)
428
- if imgData is missing value then return "none"
429
- set filePath to POSIX file "${t}"
430
- imgData's writeToFile:filePath atomically:true
431
- return "ok"
432
- `;if(JH("osascript",["-l","AppleScript"],{input:r,encoding:"utf-8"}).stdout?.trim()!=="ok")return null}else if(e==="linux")try{a1(`xclip -selection clipboard -t image/png -o > "${t}" 2>/dev/null`,{shell:"/bin/sh"})}catch{try{a1(`wl-paste --type image/png > "${t}" 2>/dev/null`,{shell:"/bin/sh"})}catch{return null}}else if(e==="win32"){let r=`
433
- Add-Type -AssemblyName System.Windows.Forms
434
- $img = [System.Windows.Forms.Clipboard]::GetImage()
435
- if ($img -ne $null) { $img.Save("${t.replace(/\\/g,"\\\\")}") }
436
- `;a1(`powershell -command "${r}"`,{encoding:"utf-8"})}else return null;if(bo.existsSync(t)&&bo.statSync(t).size>0){let r=bo.readFileSync(t);return bo.unlinkSync(t),r}}catch{bo.existsSync(t)&&bo.unlinkSync(t)}return null}import*as Qa from"node:fs";import*as Hu from"node:path";function c0(){let e=process.cwd();if(Qa.existsSync(Hu.join(e,"pnpm-lock.yaml")))return{pm:"pnpm",run:"pnpm"};if(Qa.existsSync(Hu.join(e,"bun.lockb")))return{pm:"bun",run:"bun"};if(Qa.existsSync(Hu.join(e,"yarn.lock")))return{pm:"yarn",run:"yarn"};if(Qa.existsSync(Hu.join(e,"package-lock.json")))return{pm:"npm",run:"npm run"};try{let t=JSON.parse(Qa.readFileSync(Hu.join(e,"package.json"),"utf-8"));if(t.packageManager){let r=t.packageManager.split("@")[0];return{pm:r,run:r==="npm"?"npm run":r}}}catch{}return{pm:"npm",run:"npm run"}}import{execSync as KH}from"node:child_process";import*as Nd from"node:fs";import*as Rd from"node:path";xr();var $d="REVIEW_COMPLETE";function eD(e){let t=e.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);return t?t[1].trim():e}function QH(){let e=Rd.join(Nr,"agent-browser","SKILL.md");try{return eD(Nd.readFileSync(e,"utf-8"))}catch{}try{let t=KH("npm root -g",{encoding:"utf-8"}).trim(),r=Rd.join(t,"agent-browser","skills","agent-browser","SKILL.md");return eD(Nd.readFileSync(r,"utf-8"))}catch{}return null}function YH(e){let t=process.cwd(),r=`You are a strict code reviewer. You are reviewing changes made by another AI coding agent.
437
-
438
- You must find and fix ONLY severe and high-priority issues.
439
-
440
- REVIEW (fix immediately with editFile):
441
- - Bugs, logic errors, off-by-one errors
442
- - Security vulnerabilities (injection, auth bypass, secrets in code)
443
- - Missing error handling that causes crashes or silent data loss
444
- - Type errors, unsafe casts, unchecked nulls
445
- - Race conditions or data corruption
446
- - Breaking changes to public APIs
447
- - Incorrect implementations that don't match the stated goal
448
-
449
- IGNORE (do not flag or fix):
450
- - Style, formatting, naming preferences
451
- - Comment quality or missing docs
452
- - Code organization or file structure
453
- - Performance (unless it causes a hang or OOM)
454
- - "Nice to have" improvements
455
-
456
- Rules:
457
- - For each issue: state the file and problem in one line, then fix it immediately with editFile
458
- - Be terse. No preamble, no summaries unless you found issues.
459
- - When no severe/high issues remain, output exactly: ${$d}
460
- - If you find nothing wrong on first read, output ${$d} immediately
461
- - Do NOT re-implement or rewrite working code
462
- - Do NOT add features or improvements beyond fixing bugs
463
- - NEVER use markdown formatting
464
-
465
- Environment:
466
- - Directory: ${t}
467
- - Package manager: ${e.pm} (use "${e.run}" to run scripts)`,o=QH();return o&&(r+=`
468
-
469
- MANUAL VERIFICATION:
470
- When changes are user-facing (UI components, pages, styles, routes, layouts, API endpoints), manually verify them:
471
- 1. Use startProcess to start the dev server (e.g. "${e.run} dev")
472
- 2. Use agent-browser via runCommand to navigate to the app, interact with it, and visually verify the changes work correctly
473
- 3. If something is broken, fix it with editFile and re-verify
474
- 4. ALWAYS use killProcess to stop the dev server when verification is complete
475
-
476
- Skip verification for non-user-facing changes (config files, type definitions, internal logic, test files, build scripts).
477
-
478
- <skill name="agent-browser">
479
- ${o}
480
- </skill>`),r}function tD(e,t){let r=[];r.push(`Original task: ${e}`),r.push(""),r.push(`Files changed (${t.length}):`);for(let o of t){let n=Rd.relative(process.cwd(),o.path);o.original===null?(r.push(`
481
- --- NEW FILE: ${n} ---`),r.push(o.current)):(r.push(`
482
- --- MODIFIED: ${n} ---`),r.push(`BEFORE:
483
- ${o.original}`),r.push(`AFTER:
484
- ${o.current}`))}return r.push(`
485
- Review these changes for severe/high-priority issues. Fix any you find with editFile. Output REVIEW_COMPLETE when done.`),r.join(`
486
- `)}function XH(e){return e.startsWith("anthropic/")}var eW={anthropic:{cacheControl:{type:"ephemeral"}}};async function l0(e){let{model:t,originalTask:r,changedFiles:o,maxIterations:n,callbacks:i,abortSignal:a,pm:s,onPhase:c}=e,l={iterations:0,issuesFound:0,issuesFixed:0};if(o.map(v=>{let g="";try{g=Nd.readFileSync(v.path,"utf-8")}catch{g="(file not found or unreadable)"}return{...v,current:g}}).length===0)return l;let f=YH(s),p=XH(t)?{role:"system",content:f,providerOptions:eW}:f,m={readFile:fd,editFile:xm,writeFile:Fg,searchInFiles:gd,runCommand:Dg,startProcess:Ug,readProcessLogs:Ng,killProcess:Tg,fetchUrl:ld};for(let v=0;v<n&&!a?.aborted;v++){l.iterations=v+1,Re(`review: iteration ${v+1}/${n}`),c?.(`review pass ${v+1}/${n}`);let g=o.map(xe=>{let Ie="";try{Ie=Nd.readFileSync(xe.path,"utf-8")}catch{Ie="(file not found or unreadable)"}return{...xe,current:Ie}}),E=[{role:"user",content:v===0?tD(r,g):`Previous review pass made fixes. Review the current state of changed files again for any remaining severe/high-priority issues.
487
-
488
- ${tD(r,g)}`}],I="",h=!1,N=!1,L=null,b="",M="",P=0,Q=!1,O="",ne=0,we=()=>{M&&P&&(i.onReasoning(M,Date.now()-P),M="",P=0)};i.onStatus("thinking...");let De=xa({model:t,system:p,messages:E,tools:m,stopWhen:i0(),headers:zn,abortSignal:a,onError:()=>{}});try{for await(let xe of De.fullStream){let Ie=xe.type;if(Ie==="start-step"&&(I&&(i.onRecord("assistant",I),i.onPending(""),I=""),h=!1),!(h&&Ie!=="tool-call"&&Ie!=="tool-result"&&Ie!=="tool-error"&&Ie!=="tool-input-start"&&Ie!=="tool-input-delta"&&Ie!=="finish-step")){switch(Ie){case"error":{L=xe.error??new Error("unknown review error");break}case"tool-error":{Re(`review tool error: ${JSON.stringify(xe)}`),Q=!1,i.onStatus("thinking...");break}case"reasoning-delta":{let K=xe;K.text&&(P||(P=Date.now()),M+=K.text,i.onStatus(M.replace(/\s+/g," ").trim().slice(-80)));break}case"tool-input-start":{let K=xe;typeof K.toolName=="string"&&K.toolName==="editFile"&&i.onEditStream?(we(),Q=!0,O="",ne=0,i.onStatus("Editing...")):(Q=!1,typeof K.toolName=="string"&&K.toolName==="writeFile"&&(we(),i.onStatus("Writing...")));break}case"tool-input-delta":{if(Q&&i.onEditStream){let K=xe,ae=typeof K.delta=="string"?K.delta:"";O+=ae;let ye=ra(O,"filePath");if(ye){let C=ra(O,"oldText"),V=ra(O,"newText"),Y=C?C.value.split(`
489
- `).slice(0,5):[],J=V?V.value.split(`
490
- `).slice(0,5):[],k=Y.length+J.length;if(k>ne){ne=k;let re=C?C.value.split(`
491
- `).length:0,se=V?V.value.split(`
492
- `).length:0,it=Math.max(re,se)-5;i.onEditStream(ye.value,Y,J,it>0?it:0)}}}break}case"tool-call":{we();let K=xe;Re(`review tool-call: ${K.toolName}`);let ae=K.input,ye,C=Q&&K.toolName==="editFile";if(C&&(Q=!1),(K.toolName==="editFile"||K.toolName==="writeFile")&&(N=!0),K.toolName==="readFile"){let V=ae?.filePath||"file";ye=`Reading ${V}`,b=`Read ${V}`}else if(K.toolName==="runCommand"&&ae?.command)ye=`Running ${ae.command.slice(0,70)}`,b="";else if(K.toolName==="writeFile")ye=`Writing ${ae?.filePath||"file"}`,b="";else if(K.toolName==="editFile")ye=`Editing ${ae?.filePath||"file"}`,b="";else if(K.toolName==="searchInFiles"){let V=ae?.query?String(ae.query).slice(0,60):"code",Y=ae?.directory||"",J=Y?`"${V}" in ${Y}`:`"${V}"`;ye=`Searching: ${J}`,b=`Searched: ${J}`}else K.toolName==="startProcess"?(ye=`Starting ${(ae?.command||"server").slice(0,60)}`,b=""):K.toolName==="readProcessLogs"?(ye="Reading logs...",b=""):K.toolName==="killProcess"?(ye="Stopping server...",b=""):K.toolName==="fetchUrl"?(ye="Fetching URL...",b=""):(ye=o0[K.toolName]??"Working",b="");C||i.onStatus(ye);break}case"tool-result":{let K=xe;Re(`review tool-result: ${K.toolName}`);let ae=K.output;if(ae?.message&&!ae.message.startsWith("User denied")&&l.issuesFixed++,ae?.tree&&typeof ae.tree=="string"){let ye=ae.tree.split(`
493
- `),C=ye[0]||".",V=ye.slice(1).join(`
494
- `),Y=b||`Listed ${C}`;i.onMessage("tool",`> ${Y}
495
- ${V}`),h=!0}else if(ae?.output&&typeof ae.output=="string")!ae.output.startsWith("$ ")&&b?i.onMessage("tool",`> ${b}
496
- ${ae.output}`):i.onMessage("tool",ae.output),h=!0;else if(ae?.answer&&typeof ae.answer=="string"){let ye=b||"Result";i.onMessage("tool",`> ${ye}
497
- ${ae.answer}`),h=!0}else ae?.message&&typeof ae.message=="string"?(i.onMessage("info",ae.message),h=ae.silent===!0):ae?.error&&typeof ae.error=="string"?(i.onMessage("error",ae.error),h=!1):ae?.silent===!0&&(h=!0);h&&i.onStatus("");break}case"text-delta":{we();let K=xe;i.onStatus(""),I+=K.text,I.includes($d)||i.onPending(I);break}case"finish-step":{we(),Re(`review finish-step: ${xe.finishReason}`);break}}if(L)break}}}catch(xe){L=xe instanceof Error?xe:new Error(String(xe))}if(we(),i.onStatus(""),L){Re(`review: error in iteration ${v+1}: ${L.message}`);break}let ge=I.replace($d,"").trim();if(ge&&(h?i.onRecord("assistant",ge):i.onMessage("assistant",ge)),i.onPending(""),N&&(l.issuesFound+=l.issuesFixed),I.includes($d)){Re(`review: complete after ${v+1} iteration(s)`),c?.("review complete");break}if(!N){Re("review: no edits made, stopping"),c?.("review complete");break}}return l}function d0(e,t){let r=(t||process.stdout.columns||80)-1,o=[];for(let n of e.split(`
498
- `)){if(n.length<=r){o.push(n);continue}let i=n.split(" "),a="";for(let s of i)a.length===0?a=s:a.length+1+s.length<=r?a+=` ${s}`:(o.push(a),a=s);a&&o.push(a)}return o.join(`
499
- `)}function rD(){let e=0,t="";return{write(r){let o=(process.stdout.columns||80)-1,n="";for(let i of r){if(i===`
500
- `){n+=`${t}
501
- `,t="",e=0;continue}if(i===" "){let a=t.length;e+a>o&&e>0?(n+=`
502
- ${t} `,e=a+1):(n+=`${t} `,e+=a+1),t=""}else t+=i}return n},flush(){let r=t;return t="",e=0,r},reset(){e=0,t=""}}}var tW=["const","let","var","function","return","if","else","for","while","class","interface","type","import","export","from","default","async","await","new","this","try","catch","throw","finally","switch","case","break","continue","typeof","instanceof","in","of","true","false","null","undefined","void","static","public","private","protected","readonly","extends","implements","super","yield","delete","debugger","enum"];function rW(e){if(!Go())return e;let t=e;t=t.replace(/(\/\/[^\n]*)/g,(o,n)=>q(n)),t=t.replace(/(\/\*[\s\S]*?\*\/)/g,(o,n)=>q(n)),t=t.replace(/("[^"]*"|'[^']*'|`[^`]*`)/g,(o,n)=>VN(n)),t=t.replace(/\b(\d+\.?\d*)\b/g,(o,n)=>HN(n));let r=new RegExp(`\\b(${tW.join("|")})\\b`,"g");return t=t.replace(r,(o,n)=>Mw(n)),t}function nD(e){if(!Go())return e;let t=e;return t=t.replace(/```[\w]*\n?([\s\S]*?)```/g,(r,o)=>rW(o.trim()).split(`
503
- `).map(a=>` ${a}`).join(`
504
- `)),t=t.replace(/`([^`]+)`/g,(r,o)=>Mw(o)),t=t.replace(/\*\*([^*]+)\*\*/g,(r,o)=>Pw(o)),t=t.replace(/^#{1,6}\s+(.+)$/gm,(r,o)=>Pw(o)),t}function Od(e){return e.replace(/^(?:\r?\n)+/,"")}function nW(e){let r=e.split(`
505
- `);if(r[0]?.startsWith("$ ")){let o=r[0].slice(2),n=r.slice(1),i=`Ran ${o}`;if(n.length===0)return i;if(n.length>5){let a=n.length-5,s=n.slice(-5).map(c=>` ${c}`);return`${i}
506
- ... ${a} lines ...
507
- ${s.join(`
508
- `)}`}return`${i}
509
- ${n.map(a=>` ${a}`).join(`
510
- `)}`}if(r[0]?.startsWith("> ")){let o=r[0].slice(2),n=r.slice(1);if(n.length===0)return o;if(n.length>5){let i=n.length-5,a=n.slice(-5).map(s=>` ${s}`);return`${o}
511
- ... ${i} lines ...
512
- ${a.join(`
513
- `)}`}return`${o}
514
- ${n.map(i=>` ${i}`).join(`
515
- `)}`}if(r.length>5){let o=r.length-5,n=r.slice(-5).map(i=>` ${i}`);return` ... ${o} lines ...
516
- ${n.join(`
517
- `)}`}return r.map(o=>` ${o}`).join(`
518
- `)}function oD(e,t,r=!0){let o=go("markdown");switch(e.type){case"user":{let a=d0(e.content).split(`
519
- `).map((s,c)=>c===0?`${q("\u203A ")}${s}`:`${q(" ")}${s}`).join(`
520
- `);t(`${a}
521
- ${r?`
522
- `:""}`);break}case"assistant":{let n=Od(e.content),i=o?nD(n):n;t(`${d0(si(i))}
523
- `);break}case"tool":{let n=nW(si(e.content)),i=n.indexOf(`
524
- `);if(i>=0){let a=n.slice(0,i),s=n.slice(i+1);t(`${q(a)}
525
- ${GN(s)}
526
- ${r?`
527
- `:""}`)}else t(`${q(n)}
528
- ${r?`
529
- `:""}`);break}case"info":{let n=e.content.indexOf(`
530
- `),i=n>=0?e.content.slice(0,n):e.content;t(`${q(i)}
531
- `),n>=0&&t(`${e.content.slice(n+1)}
532
- `),r&&t(`
533
- `);break}case"error":t(`${q(`error: ${d0(e.content)}`)}
534
- `);break}}function iD(e,t,r){let o=go("spacing")??1,n="";for(let i=0;i<e.length;i++){let a=e[i],s=i===e.length-1;n==="info"&&a.type!=="info"&&t(`
535
- `.repeat(o)),r(a.type,a.content),!s&&a.type!=="user"&&a.type!=="info"&&t(`
536
- `.repeat(o)),n=a.type}}function s1(e){return e.display?.length?e.display:e.messages.map(t=>({type:t.role,content:t.content}))}function aD(e){return(t,r)=>new Promise(o=>{e.flushStream();let n=e.out.lock();if(!n){o(!1);return}e.setConfirmMode(!0);let i=r?.noAlways?["yes","no"]:["yes","no","always"],a=0,s=t.split(`
537
- `),c=s[0],l=s.slice(1),d=l.length>0,f=0,p=e.getEditStreamState();if(p.rendered)f=p.lineCount+1,e.resetEditStreamState(),n.write(`
538
- `);else{let y=c.lastIndexOf("?"),E=c.indexOf(" ");if(E>0&&y>E){let I=c.slice(0,E+1),h=c.slice(E+1,y),N=c.slice(y);n.write(`${q(I)}${h}${q(N)}
539
- `)}else n.write(`${q(c)}
540
- `);if(f=1,d){for(let I of l)n.write(` ${I}
541
- `);n.write(`
542
- `),f+=l.length+1}}let m=()=>{let y=i.map((E,I)=>I===a?`${q("[")}${E}${q("]")}`:q(` ${E} `));n.write(`\r${ie.eraseLine}${q("\u203A ")}${y.join(q(" "))}`)};m();let v=y=>{e.stdin.removeListener("keypress",g);let E=y==="yes"||y==="always";if(E){n.write(`\r${ie.eraseLine}`);for(let h=0;h<f;h++)n.write(`${ie.cursorUp(1)}${ie.eraseLine}`);e.spacing.markAfterConfirmAccepted()}else n.write(`\r${ie.eraseLine}${q(`\u203A ${y}`)}
543
- `),e.spacing.markAfterConfirm();e.setConfirmMode(!1),n.release();let I=e.getPendingStatusText();E&&I&&e.showStatus(I),y==="always"?(r?.tool&&e4(r.tool,e.getCwd(),r.command),o(!0)):o(y==="yes")},g=(y,E)=>{let I=E?.name;if(I==="left"||I==="up"){a=Math.max(0,a-1),m();return}if(I==="right"||I==="down"){a=Math.min(i.length-1,a+1),m();return}if(I==="return")return v(i[a]);if(I==="escape"||E?.ctrl&&I==="c")return v("no");let h=(y??"").toLowerCase();if(h==="y")return v("yes");if(h==="n")return v("no");if(h==="a")return v("always")};e.stdin.on("keypress",g)})}var Wu=class{items;filtered=[];selectedIndex=0;lineCount=0;_isOpen=!1;maxVisible;filterFn;filterAndSortFn;constructor(t,r){this.items=t,this.maxVisible=r?.maxVisible??8,this.filterFn=r?.filter??((o,n)=>o.startsWith(n)),this.filterAndSortFn=r?.filterAndSort??null}get isOpen(){return this._isOpen}setItems(t){this.items=t}open(t){this._isOpen=!0,this.applyFilter(t),this.render()}close(){this.clear(),this._isOpen=!1,this.selectedIndex=0,this.filtered=[]}setFilter(t){this._isOpen&&(this.applyFilter(t),this.selectedIndex=0,this.render())}moveUp(){!this._isOpen||this.filtered.length===0||(this.selectedIndex=Math.max(0,this.selectedIndex-1),this.render())}moveDown(){!this._isOpen||this.filtered.length===0||(this.selectedIndex=Math.min(this.filtered.length-1,this.selectedIndex+1),this.render())}getSelected(){return this.filtered.length===0?null:this.filtered[this.selectedIndex]??null}getFiltered(){return this.filtered}applyFilter(t){t?this.filterAndSortFn?this.filtered=this.filterAndSortFn(this.items,t):this.filtered=this.items.filter(r=>this.filterFn(r,t)):this.filtered=this.items.slice()}clear(){if(this.lineCount>0){for(let t=0;t<this.lineCount;t++)process.stdout.write(`
544
- ${ie.eraseLine}`);process.stdout.write(`${ie.cursorUp(this.lineCount)}\r`),this.lineCount=0}}render(){if(this.clear(),this.filtered.length===0){this.lineCount=0;return}let t=this.filtered.length,r=Math.min(Math.max(0,this.selectedIndex-this.maxVisible+1),Math.max(0,t-this.maxVisible)),o=this.filtered.slice(r,r+this.maxVisible);for(let n=0;n<o.length;n++){let i=n+r===this.selectedIndex,a=o[n];i?process.stdout.write(`
545
- ${ie.eraseLine} \u203A ${a}`):process.stdout.write(`
546
- ${ie.eraseLine}${q(` ${a}`)}`)}if(t>this.maxVisible){let n=t-o.length;process.stdout.write(`
547
- ${ie.eraseLine}${q(` ... ${n} more`)}`),this.lineCount=o.length+1}else this.lineCount=o.length;process.stdout.write(`${ie.cursorUp(this.lineCount)}\r`)}};var p0=class{active=!1;buffer="";write;menu=new Wu([],{maxVisible:10,filterAndSort:(t,r)=>t.map(o=>({id:o,score:vd(o,r)})).filter(o=>o.score>0).sort((o,n)=>n.score-o.score).map(o=>o.id)});constructor(t){this.write=t??process.stdout.write.bind(process.stdout)}enter(t,r){this.active=!0,this.buffer="",this.menu.setItems(t),this.menu.open("");let o=t.indexOf(r);if(o>0)for(let n=0;n<o;n++)this.menu.moveDown();this.redraw()}exit(){this.active=!1,this.buffer="",this.menu.close(),this.write(`\r${ie.eraseLine}`)}getSelected(){return this.menu.getSelected()}handleInput(t){if(t==="\x1B"&&t.length===1||t===""||this.buffer===""&&(t==="\x7F"||t==="\b"))return"cancel";if(t==="\x7F"||t==="\b")return this.buffer=this.buffer.slice(0,-1),this.menu.setFilter(this.buffer),this.redraw(),"handled";if(t==="\x1B[A")return this.menu.moveUp(),this.redraw(),"handled";if(t==="\x1B[B")return this.menu.moveDown(),this.redraw(),"handled";if(t===" "){let r=this.menu.getSelected();return r&&(this.buffer=r,this.menu.setFilter(this.buffer),this.redraw()),"handled"}return t==="\r"||t===`
548
- `?"select":(t.length===1&&t>=" "&&(this.buffer+=t,this.menu.setFilter(this.buffer),this.redraw()),"handled")}redraw(){this.write(`\r${ie.eraseLine}${q("model \u203A ")}${this.buffer||q("type to filter...")}`)}};var f0=class{_locked=!1;get locked(){return this._locked}write(t){this._locked||process.stdout.write(t)}lock(){return this._locked?null:(this._locked=!0,{write:t=>process.stdout.write(t),release:()=>{this._locked=!1}})}};var m0=class{constructor(t){this.write=t}needsGapBeforeOutput=!1;firstStatusAfterUser=!1;markUserSubmit(){this.needsGapBeforeOutput=!0,this.firstStatusAfterUser=!0}markAfterConfirm(){this.needsGapBeforeOutput=!0,this.firstStatusAfterUser=!1}markAfterConfirmAccepted(){this.needsGapBeforeOutput=!1,this.firstStatusAfterUser=!1}markAfterBareMessage(){this.needsGapBeforeOutput=!0,this.firstStatusAfterUser=!1}beforeOutput(){this.needsGapBeforeOutput&&(this.needsGapBeforeOutput=!1,this.firstStatusAfterUser=!1,this.write(`
549
- `))}beforeStatus(){if(this.firstStatusAfterUser){this.firstStatusAfterUser=!1,this.needsGapBeforeOutput=!1,this.write(`
550
- `);return}this.beforeOutput()}};var uD=e=>process.stdout.write(`\x1B]0;${e}\x07`);async function cD(e,t,r,o){let n=new f0,i=new m0(R=>n.write(R)),a=e,s=null,c=[],l=[],d=0,f=0,p={inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheWriteTokens:0,reasoningTokens:0},m="",v=!1,g=null,y=c0(),E="",I="",h=null,N=!1,L=!1,b="",M=!1,P=-1,Q=[],O=new Wu([],{maxVisible:8,filter:(R,T)=>R.startsWith(T)}),ne=new p0(R=>process.stdout.write(R)),we=!1,De=0,ge=o?.planMode??!1,xe=null,Ie={vision:!0,tools:!0,reasoning:!1};function K(){return ge?"plan \u203A ":"\u203A "}function ae(){let[R]=t1("/");O.setItems(R.map(T=>T.slice(1)))}function ye(){L=!0,b="",X.setPrompt(q("/ ")),ae(),O.open(""),V()}function C(){L=!1,b="",M=!1,P=-1,O.close(),X.setPrompt(q(K())),process.stdout.write(`\r${ie.eraseLine}${q(K())}`)}function V(){process.stdout.write(`\r${ie.eraseLine}${q("/ ")}${b}`)}function Y(R){let T=X.history,me=R==="up"?P+1:P-1;if(me<0){L=!1,M=!1,b="",P=-1,O.close(),X.setPrompt(q(K())),X.line="",X.cursor=0,process.stdout.write(`\r${ie.eraseLine}${q(K())}`);return}if(me>=T.length)return;P=me;let ue=T[me];ue.startsWith("/")?(b=ue.slice(1),V()):(L=!1,b="",O.close(),X.setPrompt(q(K())),X.line=ue,X.cursor=ue.length,process.stdout.write(`\r${ie.eraseLine}${q(K())}${ue}`))}function J(R){ne.enter(R,a)}function k(){ne.exit(),X.setPrompt(q(K())),process.stdout.write(`${q(K())}`)}async function re(R){try{Ie=await jg(R)}catch{Ie={vision:!0,tools:!0,reasoning:!1}}}re(a);function se(){let R=sD("git",["branch","--show-current"],{encoding:"utf-8"}),T=R.status===0?R.stdout?.trim():"";if(T){let ue=sD("git",["diff","--shortstat"],{encoding:"utf-8"}).stdout?.trim()||"",pe=ue.match(/(\d+) insertion/)?.[1]||"0",Ve=ue.match(/(\d+) deletion/)?.[1]||"0",$=ue?` +${pe} -${Ve}`:"";uD(`${T}${$}`)}else{let me=a.split("/").pop()||a,ue=f>0?` $${f.toFixed(2)}`:"";uD(`${me}${ue}`)}}let it=new oW,X=h0.createInterface({input:it,output:process.stdout,prompt:q(K()),terminal:!0,escapeCodeTimeout:50,completer:R=>t1(R)});process.stdin.isTTY&&process.stdin.setRawMode(!0),s4(aD({out:n,spacing:i,stdin:process.stdin,getCwd:()=>process.cwd(),getEditStreamState:()=>({rendered:we,lineCount:De}),resetEditStreamState:()=>{we=!1,De=0},setConfirmMode:R=>{N=R},flushStream:()=>{if(at(),I&&h){let R=h.flush();R&&n.write(R),I="",h.reset(),n.write(`
551
- `)}},getPendingStatusText:()=>$t,showStatus:xt})),process.stdin.on("data",R=>{let T=R.toString();if(!N){if(v&&(T==="\x1B"||T==="")&&g){T_(),g.abort();return}if(v){it.write(R);return}if(ne.active){let me=ne.handleInput(T);if(me==="cancel")k(),Z();else if(me==="select"){let ue=ne.getSelected();k(),ue&&ue!==a?(process.stdout.write(`\r${ie.eraseLine}`),Pg(ue),a=ue,re(ue).then(()=>{se(),ke("info",`switched to ${ue}`),Z()})):ue?(process.stdout.write(`\r${ie.eraseLine}`),ke("info",`already using ${ue}`),Z()):(process.stdout.write(`\r${ie.eraseLine}`),Z())}return}if(T===""){if(!Ie.vision){process.stdout.write("\r"+ie.eraseLine+q(K())+q("[model does not support images]")),setTimeout(()=>{process.stdout.write(`\r${ie.eraseLine}${q(K())}${X.line}`)},1500);return}let me=XO();if(me){xe={data:me.toString("base64"),mimeType:"image/png"};let ue=X,pe=ue.line,Ve=ue.cursor,$="[image]",fe=pe.slice(0,Ve)+$+pe.slice(Ve);ue.line=fe,ue.cursor=Ve+$.length;let Ae=L?"/ ":K();process.stdout.write(`\r${ie.eraseLine}${q(Ae)}${fe}`)}return}if(!L&&Q.length===0&&X.line===""&&T==="/"){ye();return}if(L){if(T==="\x1B"&&T.length===1){xe=null,X.line="",X.cursor=0,C();return}if(b===""&&(T==="\x7F"||T==="\b")){C();return}if(T==="\x7F"||T==="\b"){M&&(M=!1,P=-1,ae()),b=b.slice(0,-1),O.isOpen?O.setFilter(b):O.open(b),V();return}if(T==="\x1B[A"){M?Y("up"):(O.moveUp(),V());return}if(T==="\x1B[B"){M?Y("down"):(O.moveDown(),V());return}if(T===" "){M&&(M=!1,P=-1,ae(),O.open(b));let me=O.getSelected();me&&(b=`${me} `,O.setFilter(b.trimEnd())),V();return}if(T==="\r"||T===`
552
- `){let ue=(O.getSelected()??b).trimEnd();if(O.close(),L=!1,b="",M=!1,P=-1,!ue){X.setPrompt(q(K())),process.stdout.write(`\r${ie.eraseLine}${q(K())}`);return}let pe=`/${ue}`;X.history.unshift(pe),X.line="",X.cursor=0,X.setPrompt(q(K())),process.stdout.write(`\r${ie.eraseLine}${q("/ ")}${ue}
553
- `),Yt(pe);return}if(T===""){C();return}if(T.length===1&&T>=" "){M&&(M=!1,P=-1,ae()),b+=T,O.isOpen?O.setFilter(b):O.open(b),V();return}return}if(T==="\x1B"&&T.length===1){if(Q.length>0){for(let me=0;me<Q.length;me++)process.stdout.write(ie.cursorUp(1)+ie.eraseLine);Q=[]}xe=null,X.setPrompt(q(K())),X.line="",X.cursor=0,process.stdout.write(`\r${ie.eraseLine}${q(K())}`);return}if(T==="\x1B[1;3D"||T==="\x1Bb"){it.write("\x1Bb");return}if(T==="\x1B[1;3C"||T==="\x1Bf"){it.write("\x1Bf");return}if(!(T==="\r"&&Q.length===0&&X.line.trim()==="")){if(T===""&&Q.length>0){for(let me=0;me<Q.length;me++)process.stdout.write(ie.cursorUp(1)+ie.eraseLine);Q=[],X.setPrompt(q(K())),X.line="",X.cursor=0,process.stdout.write(`\r${ie.eraseLine}${q(K())}`);return}if((T==="\x7F"||T==="\b")&&Q.length>0&&X.cursor===0){let me=X,ue=Q.pop()??"",pe=me.line,Ve=ue+pe;process.stdout.write(`\r${ie.eraseLine}`),process.stdout.write(`${ie.cursorUp(1)}${ie.eraseLine}\r`),me.line=Ve,me.cursor=ue.length;let $=Q.length===0?"\u203A ":" ";X.setPrompt(q($)),process.stdout.write(`${q($)}${Ve}`),pe.length>0&&process.stdout.write(ie.cursorBackward(pe.length));return}if(T===`
554
- `||T==="\x1B\r"||T==="\x1B[13;2u"){let me=X,ue=me.line;Q.push(ue),process.stdout.write(`\r${ie.eraseLine}`);let pe=Q.length===1?"\u203A ":" ";process.stdout.write(`${q(pe)}${ue}
555
- `),me.line="",me.cursor=0,X.setPrompt(q(" ")),process.stdout.write(q(" "));return}if(M&&(T==="\x1B[A"||T==="\x1B[B")){Y(T==="\x1B[A"?"up":"down");return}M&&(M=!1,P=-1),it.write(R)}}});let Ct=!1;function cr(R){return R>=1e6?`${(R/1e6).toFixed(1)}M`:R>=1e3?`${(R/1e3).toFixed(1)}k`:String(R)}function Mt(){if(!Ct){if(Ct=!0,b3(),process.stdout.write(`
556
- ${ie.cursorShow}`),d>0){let{inputTokens:R,outputTokens:T,cacheReadTokens:me}=p,ue=cr(R);me>0&&(ue+=` (${cr(me)} cached)`),process.stdout.write(`${q(`total: ${ue} input \xB7 ${cr(T)} output`)}
557
- `)}s?.id&&s.messages.length>0&&process.stdout.write(`${q(`session: ${s.id} \u2014 resume with`)} ai --resume ${s.id}
558
- `),X.close(),process.exit(0)}}function Kr(){if(v||ne.active||N)return;process.stdout.write(ie.clearTerminal+ie.cursorTo(0,0));for(let T of l)Ze(T);let R=go("spacing")??1;process.stdout.write(`
559
- `.repeat(R)),X.prompt()}process.stdout.on("resize",Kr);let Ur=null,Qr=-Ha,$t=null;function at(){$t=null,Ur&&(clearInterval(Ur),Ur=null),E&&(n.write(ie.cursorUp(1)+ie.eraseLine+ie.cursorLeft),E="")}function xt(R){if(n.locked){$t=R;return}if($t=null,!!E){E=R;return}i.beforeStatus(),n.write(`${xd(R,Qr)}
560
- `),E=R,Ur=setInterval(()=>{E&&(Qr=Wg(Qr,E.length),n.write(ie.cursorUp(1)+ie.eraseLine+ie.cursorLeft),n.write(`${xd(E,Qr)}
561
- `))},50)}let Yr=R=>n.write(R);function Ze(R,T=!0){oD(R,Yr,T)}function ze(R,T){l.push({type:R,content:T})}function ke(R,T){ze(R,T),Ze({type:R,content:T})}function ct(R){iD(R,T=>process.stdout.write(T),ke)}function de(){return new Promise(R=>{i.beforeOutput(),n.write(`${q("execute plan? (y/n) ")}`),N=!0;let T=me=>{let ue=me.toString().toLowerCase();ue==="y"||ue==="\r"||ue===`
562
- `?(N=!1,process.stdin.removeListener("data",T),n.write(`y
563
- `),R(!0)):(ue==="n"||ue==="\x1B"||ue==="")&&(N=!1,process.stdin.removeListener("data",T),n.write(`n
564
- `),R(!1))};process.stdin.on("data",T)})}async function pt(R,T,me){if(!Uu()||!Am())return;let ue=bm();if(ue.length!==0)try{await l0({model:a,originalTask:R,changedFiles:ue,maxIterations:Lu(),callbacks:T,abortSignal:me,pm:y})}catch(pe){pe.name!=="AbortError"&&ke("error",ea(pe))}}async function Yt(R){if(ne.active)return;let T=R.trim();L&&(O.close(),L=!1,b="",M=!1,P=-1,X.setPrompt(q(K())),T&&(T=`/${T}`,X.history.unshift(T)));let me=Q.length>0;if(me&&(T=[...Q,R].join(`
565
- `).trim(),Q=[],X.setPrompt(q(K()))),!T){Z();return}if(T.toLowerCase()==="exit"||T.toLowerCase()==="quit"){Mt();return}if(v)return;if(T.startsWith("/")&&!me){let $=T.slice(1).split(" "),fe=$[0].toLowerCase(),Ae=$.slice(1).join(" ");if((fe==="model"||fe==="m")&&!Ae){process.stdout.write(q(`loading models...
566
- `));try{let mi=(await Va(!0)).map(xo=>xo.id);process.stdout.write(`${ie.cursorUp(1)}${ie.eraseLine}\r`),J(mi)}catch{ke("info","failed to load models"),Z()}return}if(fe==="purge"){if(vo().length===0){ke("info","no chats to delete"),Z();return}let mi=_d();s=pi(a),l.length=0,c.length=0,d=0,f=0,process.stdout.write(ie.clearTerminal+ie.cursorTo(0,0)),ke("info",`ai ${t} [${a}]`),ke("info",`deleted ${mi} chat(s)`),Z();return}let nt=VO(fe),Xt=e1[nt];if(!Xt){ke("info","unknown command. type /help"),Z();return}let Vt={model:a,version:t,chat:s,history:c,tokens:d,cost:f,tokenUsage:p,rl:X,createRl:()=>X,printHeader:()=>{}},ft=nt==="git"&&Ae?.startsWith("commit");X.pause(),ft&&process.stdout.write(q("checking changes..."));let Je=await Xt(Vt,Ae);ft&&process.stdout.write(`\r${ie.eraseLine}`),X.resume(),Je&&(Je.clearScreen&&(process.stdout.write(ie.clearTerminal+ie.cursorTo(0,0)),l.length=0,ke("info",`ai ${t} [${Je.model||a}]`)),Je.output&&ke("info",Je.output),Je.model&&(a=Je.model,await re(Je.model)),Je.chat!==void 0&&(s=Je.chat),Je.tokens!==void 0&&(d=Je.tokens),Je.cost!==void 0&&(f=Je.cost),(Je.model||Je.cost!==void 0)&&se(),Je.clearHistory&&(c.length=0),Je.summary&&(m=Je.summary),Je.planMode!==void 0&&(ge=!ge,ke("info",ge?"plan mode on":"plan mode off")),Je.chat&&fe==="chat"&&Je.chat?(m=Je.chat.summary||"",Id({chat:Je.chat},c),process.stdout.write(ie.clearTerminal+ie.cursorTo(0,0)),l.length=0,ct(s1(Je.chat))):s&&(s.display=l.map(Gn=>({type:Gn.type,content:Gn.content})),jr(s))),Z();return}ze("user",T),v=!0,i.markUserSubmit();let ue=new AbortController;g=ue,I="";let pe=rD();h=pe,process.stdout.write(ie.cursorHide),X.pause();function Ve(){return{onStatus:$=>{if($){if(!E&&I){let fe=pe.flush();n.write(`${fe}
567
- `),I="",i.markAfterBareMessage()}xt($)}else at()},onPending:$=>{let fe=Od($);if(fe.length>I.length){at(),I||i.beforeOutput();let Ae=fe.slice(I.length),nt=pe.write(si(Ae));n.write(nt),I=fe}},onMessage:($,fe)=>{at(),i.beforeOutput();let Ae=$==="assistant"?Od(fe):fe;if($==="assistant"){if(I){let nt=pe.flush();n.write(`${nt}
568
- `)}else Ze({type:$,content:Ae},!1);I="",pe.reset()}else Ze({type:$,content:Ae},!1);ze($,Ae),i.markAfterBareMessage()},onRecord:($,fe)=>{let Ae=$==="assistant"?Od(fe):fe;if($==="assistant"&&I){let nt=pe.flush();nt&&n.write(nt),n.write(`
569
- `),I="",pe.reset(),i.markAfterBareMessage()}ze($,Ae)},onReasoning:($,fe)=>{at(),i.beforeOutput();let Ae=Math.round(fe/1e3),nt=Ae>0?`thought for ${Ae}s`:"thought briefly",Xt=$.replace(/\s+/g," ").trim().slice(0,80);n.write(`${q(nt)}
570
- `),Xt&&n.write(`${q(` ${Xt}`)}
571
- `),i.markAfterBareMessage(),ze("info",`${nt}${Xt?`
572
- ${Xt}`:""}`)},onEditStream:($,fe,Ae,nt)=>{at(),i.beforeOutput();for(let ft=0;ft<De;ft++)n.write(ie.cursorUp(1)+ie.eraseLine+ie.cursorLeft);let Xt=$.includes("/")?$.split("/").pop()??$:$,Vt=[];Vt.push(q(`Edit ${Xt}?`));for(let ft of fe)Vt.push(` ${au(`- ${ft}`)}`);for(let ft of Ae)Vt.push(` ${Sa(`+ ${ft}`)}`);nt>0&&Vt.push(q(` ... ${nt} more lines`));for(let ft of Vt)n.write(`${ft}
573
- `);De=Vt.length,we=!0},onTokens:$=>{d=$(d)},onCost:$=>{f=$(f),se()},onUsage:$=>{p.inputTokens+=$.inputTokens,p.outputTokens+=$.outputTokens,p.cacheReadTokens+=$.cacheReadTokens,p.cacheWriteTokens+=$.cacheWriteTokens,p.reasoningTokens+=$.reasoningTokens},onSummary:$=>{m=$},onBusy:$=>{v=$}}}try{let $=await Cd({model:a,message:T,history:c,chat:s,tokens:d,summary:m,pm:y,callbacks:Ve(),abortSignal:ue.signal,image:xe,hasTools:Ie.tools,planMode:ge,appendSystem:o?.system});if(ge&&!ue.signal.aborted){process.stdout.write(ie.cursorShow);let fe=await de();if(process.stdout.write(ie.cursorHide),fe){I="",pe.reset(),v=!0;let Ae=await Cd({model:a,message:"Execute the plan above. Proceed step by step.",history:c,chat:$,tokens:d,summary:m,pm:y,callbacks:Ve(),abortSignal:ue.signal,hasTools:Ie.tools,appendSystem:o?.system});xe=null,s=Ae,Ae.display=l.map(nt=>({type:nt.type,content:nt.content})),Ae.tokens=d,Ae.cost=f,jr(Ae),ue.signal.aborted||await pt(T,Ve(),ue.signal)}else ke("info","plan discarded"),xe=null,s=$,$.display=l.map(Ae=>({type:Ae.type,content:Ae.content})),$.tokens=d,$.cost=f,jr($)}else xe=null,s=$,$.display=l.map(fe=>({type:fe.type,content:fe.content})),$.tokens=d,$.cost=f,jr($),ue.signal.aborted||await pt(T,Ve(),ue.signal)}catch($){at(),$.name!=="AbortError"&&(i.beforeOutput(),ke("error",ea($)))}v=!1,g=null,h=null,process.stdout.write(ie.cursorShow),X.resume(),Z()}function Z(){let R=go("spacing")??1;process.stdout.write(`
574
- `.repeat(R)),X.setPrompt(q(K())),X.prompt()}if(se(),r){let R=V_(r);R?(s=R,m=R.summary||"",d=R.tokens||0,f=R.cost||0,R.model&&(a=R.model,await re(R.model)),Id({chat:R},c),ct(s1(R)),se()):(ke("info",`ai ${t} [${a}]`),ke("error",`session ${r} not found`))}else ke("info",`ai ${t} [${a}]`),ze("info","type /help for commands \xB7 ctrl+j for newline"),n.write(`${q("type /help for commands \xB7 ctrl+j for newline")}
575
- `);h0.emitKeypressEvents(process.stdin),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on("keypress",(R,T)=>{if(!(ne.active||v||N)&&!L){if(T?.name==="escape"){X.setPrompt(q(K())),X.write(null,{ctrl:!0,name:"u"}),process.stdout.write(`\r${ie.eraseLine}${q(K())}`);return}(T?.name==="up"||T?.name==="down")&&setImmediate(()=>{let me=X.line;me.startsWith("/")&&!L&&(L=!0,M=!0,b=me.slice(1),P=X.history.indexOf(me),X.line="",X.cursor=0,X.setPrompt(q("/ ")),V())})}}),X.on("line",Yt),X.on("close",Mt),X.on("SIGINT",()=>{v&&g?(T_(),g.abort(),g=null,v=!1,at(),process.stdout.write(`
576
- ${q("cancelled")}
577
- `),process.stdout.write(ie.cursorShow),X.resume(),Z()):Mt()}),Z()}async function g0(e){await cD(e.model,e.version,e.resume,{planMode:e.planMode,system:e.system})}async function lD(){let e=zu();e.start("fetching models...");try{let t=await Va();e.stop();let r=new Map;for(let o of t){let n=o.id.split("/")[0]??"unknown",i=r.get(n)??[];i.push(o),r.set(n,i)}console.log(su(`available models:
578
- `));for(let[o,n]of r){console.log(q(` ${o}`));for(let i of n)console.log(` ${i.id}`);console.log()}console.log(q('usage: ai -m <model> "message"'))}catch{e.stop(),console.error("failed to fetch models"),process.exit(1)}}fi();var Dd=class extends Error{constructor(r){super(`exit ${r}`);this.code=r}};function iW(e){if(!(process.stdout.writableNeedDrain||process.stderr.writableNeedDrain)){process.exit(e);return}let r=0,o=()=>{--r===0&&process.exit(e)};setTimeout(()=>process.exit(e),1e3).unref(),process.stdout.writableNeedDrain&&(r++,process.stdout.once("drain",o)),process.stderr.writableNeedDrain&&(r++,process.stderr.once("drain",o))}var dD=86400;async function pD(e){let{force:t=!1}=e,r=()=>aW(e);return t?a4(r):r()}async function aW(e){let{message:t,model:r,image:o,json:n=!1,save:i=!0,quiet:a=!1,verbose:s,system:c,plan:l=!1,resume:d,timeout:f,version:p}=e,m=s??(!n&&!a),v=0;try{let y=function(k,re){if(n){let se={output:"",model:r,tokens:re?.tokens??0,cost:re?.cost??0,steps:0,toolCalls:0,exitCode:1,error:k,chatId:re?.chatId,usage:re?.usage};process.stdout.write(`${JSON.stringify(se)}
579
- `)}else process.stderr.write(`error: ${k}
580
- `);throw new Dd(1)};var g=y;let E=f!==void 0?Math.floor(f):void 0;E!==void 0&&(Number.isNaN(E)||E<=0||E>dD)&&y(`timeout must be between 1 and ${dD} seconds`),!t&&!d&&y("no message provided"),m&&process.stderr.write(su(`ai ${p} [${r}]
581
- `));let I=null;if(o)try{I=Hg(o)}catch(k){y(k instanceof Error?k.message:String(k))}let h=c0(),N=await jg(r),b=m&&!n?zu(process.stderr):null,M=0,P=0,Q=0,O=0,ne="",we=!1,De=!1,ge=null,xe=[],Ie=null,K=0,ae="";if(d){let{loadChat:k}=await Promise.resolve().then(()=>(fi(),cO)),re=k(d);re||y(`session ${d} not found`),Ie=re,ae=re.summary||"",K=re.tokens||0;let{restoreHistory:se}=await Promise.resolve().then(()=>(K_(),lO));se({chat:re},xe)}let ye=E?AbortSignal.timeout(E*1e3):void 0,C=k=>{if(k){if(n)ne=k;else if(k!==ne){if(ne&&k.startsWith(ne)){let re=k.slice(ne.length);process.stdout.write(re),we=re.endsWith(`
582
- `)}else ne&&!we?(process.stdout.write(`
583
- ${k}`),we=k.endsWith(`
584
- `)):(process.stdout.write(k),we=k.endsWith(`
585
- `));ne=k}}},V=k=>{m&&process.stderr.write(`${k}
586
- `)},Y={onStatus:k=>{b&&k&&b.update(k),b&&!k&&b.stop(),!b&&m&&k&&V(`[status] ${k}`)},onPending:k=>{if(!k){n||(ne="",we=!1);return}C(k)},onMessage:(k,re)=>{k==="assistant"?C(re):k==="info"&&re.startsWith("Stopped:")?(De=!0,V(re)):k==="error"?V(re):k==="tool"&&(O++,V(re))},onRecord:(k,re)=>{k==="assistant"&&C(re)},onReasoning:(k,re)=>{if(b){let se=k.replace(/\s+/g," ").trim().slice(-80);b.update(se)}},onTokens:k=>{M=k(M)},onCost:k=>{P=k(P)},onUsage:k=>{ge=k},onSummary:()=>{},onBusy:()=>{},onStepFinish:()=>{Q++}},J=null;try{if(m&&V("[phase] coding agent"),b?b.start("thinking..."):m&&V("[status] thinking..."),J=await Cd({model:r,message:t,history:xe,chat:Ie,tokens:K,summary:ae,pm:h,callbacks:Y,image:I,hasTools:N.tools,planMode:l,appendSystem:c,abortSignal:ye,save:i}),b?.stop(),Am()&&Uu()){let k=bm();if(k.length>0){m&&V("[phase] review agent"),b?.start("reviewing...");try{await l0({model:r,originalTask:t,changedFiles:k,maxIterations:Lu(),callbacks:Y,abortSignal:ye,pm:h,onPhase:m?re=>V(`[phase] ${re}`):void 0})}catch(re){re.name!=="AbortError"&&m&&process.stderr.write(`review error: ${ea(re)}
587
- `)}b?.stop()}}m&&V("[phase] done"),!n&&ne&&process.stdout.write(`
588
- `),i&&J&&jr(J)}catch(k){if(k instanceof Dd)throw k;b?.stop();let re=k instanceof Error&&k.name==="TimeoutError";re&&process.stderr.write("warning: timed out during tool execution; workspace may contain partial changes\nhint: run `git diff` to inspect changes, `git checkout .` to revert\n");let se=re?`timed out after ${E}s`:ea(k);y(se,{tokens:M,cost:P,usage:ge??void 0,chatId:Ie?.id})}if(n){let k={output:ne,model:r,tokens:M,cost:P,steps:Q,toolCalls:O,exitCode:De?2:0,chatId:i&&J?J.id:void 0,usage:ge??void 0};process.stdout.write(`${JSON.stringify(k)}
589
- `)}v=De?2:0}catch(y){if(y instanceof Dd)v=y.code;else throw y}iW(v)}async function fD(){let e=[];for await(let t of process.stdin)e.push(t.toString());return e.join("").trim()}function mD(e){console.log(`ai - AI-powered chat interface
590
-
591
- Usage:
592
- ai [options] <message>
593
- ai init
594
- ai -m <model> <message>
595
- ai -p <message>
596
-
597
- Options:
598
- -m, --model Specify AI model (default: ${Fu})
599
- --image Attach an image file (png, jpg, gif, webp)
600
- -r, --resume Resume a previous chat by ID
601
- --plan Start in plan mode (think before acting)
602
- -p, --print Headless mode: full agent, output to stdout, then exit
603
- --json Structured JSON output (implies --print)
604
- --system Append custom text to the system prompt
605
- --force Auto-approve all tool actions (--print only)
606
- --no-save Don't persist the chat to history (--print only)
607
- --timeout <s> Abort after N seconds (--print only)
608
- -q, --quiet Suppress stderr status output (--print only)
609
- -l, --list List available models
610
- --no-color Disable color output
611
- -v, --version Show version
612
- -h, --help Show this help message
613
-
614
- Commands:
615
- init Setup AI CLI with API key
616
-
617
- Examples:
618
- ai "whats up bro"
619
- ai -m claude-opus-4.5 "hello"
620
- ai --image ./screenshot.png "what is this?"
621
- ai -p "explain this codebase"
622
- ai -p --json --force "fix all type errors" > result.json
623
- git diff | ai -p "review this for bugs"
624
- ai -p --timeout 60 "fix type errors"
625
- ai -p -r <chatId> "continue"
626
- ai --system "respond in Spanish" "hola"
627
- ai -l`)}var Ya="0.0.12";async function sW(){let e;try{e=(0,hD.default)({"--model":String,"--help":Boolean,"--version":Boolean,"--list":Boolean,"--image":String,"--no-color":Boolean,"--resume":String,"--plan":Boolean,"--print":Boolean,"--json":Boolean,"--system":String,"--force":Boolean,"--no-save":Boolean,"--timeout":Number,"--quiet":Boolean,"--verbose":Boolean,"-m":"--model","-h":"--help","-v":"--version","-l":"--list","-r":"--resume","-p":"--print","-q":"--quiet"})}catch(c){c instanceof Error&&(console.error(c.message),process.exit(1)),console.error("unknown error"),process.exit(1)}e["--no-color"]&&(process.env.NO_COLOR="1"),e["--version"]&&(console.log(Ya),process.exit(0)),e["--help"]&&(mD(Ya),process.exit(0)),e["--list"]&&(await lD(),process.exit(0));let t=go("model"),r=O3()||t||Fu;if(e._.includes("init")){await Y3();let c=hd();c&&process.stdin.isTTY&&(process.env.AI_GATEWAY_API_KEY=c,globalThis.AI_SDK_LOG_WARNINGS=!1,console.log(),await g0({model:r,version:Ya,system:e["--system"]}));return}let o=hd();o||(console.error("no key. run: ai init"),process.exit(1)),process.env.AI_GATEWAY_API_KEY=o,globalThis.AI_SDK_LOG_WARNINGS=!1;let n=e["--model"],i=n?await U3(n):r,a=e["--print"]||e["--json"];if(!a&&(e["--force"]||e["--timeout"]||e["--no-save"]||e["--quiet"])&&(console.error("--force, --timeout, --no-save, and --quiet require --print or --json"),process.exit(1)),e["--resume"]&&!a&&process.stdin.isTTY){await g0({model:i,version:Ya,resume:e["--resume"],planMode:e["--plan"],system:e["--system"]});return}let s=e._.join(" ");if(!s&&(process.stdin.isTTY||(s=await fD()),!s)){if(!a&&process.stdin.isTTY){await g0({model:i,version:Ya,planMode:e["--plan"],system:e["--system"]});return}console.error("no message"),process.exit(1)}if(a){await pD({message:s,model:i,image:e["--image"],json:e["--json"],force:e["--force"],save:!e["--no-save"],quiet:e["--quiet"],verbose:e["--verbose"],system:e["--system"],plan:e["--plan"],resume:e["--resume"],timeout:e["--timeout"],version:Ya});return}await K3({message:s,model:i,image:e["--image"],isPiped:!process.stdout.isTTY,version:Ya})}sW().catch(e=>{console.error("error:",e instanceof Error?e.message:"unknown"),process.exit(1)});